/* ========================================
   STATS SECTION - FINAL FIX
   Fixes overlapping numbers and labels
   Removes excess white space
   ======================================== */

/* CRITICAL: Override all previous stats styles with highest priority */

/* Stats Grid Container */
body .section-about .stats-grid,
.section-about .stats-grid,
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin: 32px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* Individual Stat Box */
body .section-about .stat-box,
.section-about .stat-box,
.stat-box {
    /* Layout */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;

    /* Sizing */
    min-height: 110px !important;
    height: auto !important;
    padding: 20px 16px !important;

    /* Visual */
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 33, 71, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;

    /* Remove any positioning */
    position: relative !important;

    /* Transitions */
    transition: all 0.3s ease !important;
}

.stat-box:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0, 33, 71, 0.12) !important;
    border-color: var(--gold) !important;
}

/* Stat Number - Top */
body .section-about .stat-number,
.section-about .stat-number,
.stat-number {
    /* Layout */
    display: block !important;
    width: 100% !important;

    /* Typography */
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;

    /* Color */
    color: var(--primary) !important;

    /* Spacing */
    margin: 0 0 8px 0 !important;
    padding: 0 !important;

    /* Remove positioning */
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Stat Label - Bottom */
body .section-about .stat-label,
.section-about .stat-label,
.stat-label {
    /* Layout */
    display: block !important;
    width: 100% !important;

    /* Typography */
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;

    /* Color */
    color: var(--gray) !important;

    /* Spacing */
    margin: 0 !important;
    padding: 0 !important;

    /* Remove positioning */
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Remove any pseudo-elements that might cause duplication */
.stat-number::before,
.stat-number::after,
.stat-label::before,
.stat-label::after {
    content: none !important;
    display: none !important;
}

/* ========================================
   SECTION SPACING - REMOVE EXCESS WHITE SPACE
   ======================================== */

/* Normalize all section padding */
.section-premium {
    padding: 70px 0 !important;
    margin: 0 !important;
}

/* Hero section - no extra padding */
.hero-premium {
    margin: 0 !important;
    padding-bottom: 0 !important;
}

/* Affiliation strip - compact */
.affiliation-strip-premium {
    padding: 24px 0 !important;
    margin: 0 !important;
}

/* About section - balanced spacing */
.section-about {
    padding: 70px 0 !important;
    margin: 0 !important;
}

/* Remove extra margins from containers */
.container-premium {
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Section titles - consistent spacing */
.section-title {
    margin-bottom: 50px !important;
    padding: 0 !important;
}

.section-title h2 {
    margin-bottom: 12px !important;
}

.section-title p {
    margin: 0 !important;
}

/* Remove extra spacing from rows */
.row {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* About content spacing */
.about-content {
    padding: 0 !important;
    margin: 0 !important;
}

.about-title {
    margin-bottom: 12px !important;
}

.about-subtitle {
    margin-bottom: 16px !important;
}

.about-description {
    margin-bottom: 28px !important;
}

.about-cta {
    margin-top: 28px !important;
    margin-bottom: 0 !important;
}

/* ========================================
   RESPONSIVE LAYOUT
   ======================================== */

/* Desktop - Image left, Content right */
@media (min-width: 992px) {
    .about-image-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 24px !important;
    }

    .about-content-col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 24px !important;
    }

    .section-about .row {
        align-items: center !important;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {

    /* Stack image and content */
    .about-image-col,
    .about-content-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 20px !important;
    }

    .about-image-col {
        margin-bottom: 40px !important;
    }

    /* Reduce section padding */
    .section-premium {
        padding: 60px 0 !important;
    }

    .section-about {
        padding: 60px 0 !important;
    }

    /* Stats grid adjustments */
    .stats-grid {
        gap: 14px !important;
        margin: 28px 0 !important;
    }

    .stat-box {
        min-height: 100px !important;
        padding: 18px 14px !important;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    .stat-label {
        font-size: 0.75rem !important;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {

    /* Stack layout */
    .about-image-col,
    .about-content-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 16px !important;
    }

    .about-image-col {
        margin-bottom: 32px !important;
    }

    /* Reduce section padding */
    .section-premium {
        padding: 50px 0 !important;
    }

    .section-about {
        padding: 50px 0 !important;
    }

    .affiliation-strip-premium {
        padding: 20px 0 !important;
    }

    /* Stats grid - maintain 2x2 */
    .stats-grid {
        gap: 12px !important;
        margin: 24px 0 !important;
    }

    .stat-box {
        min-height: 90px !important;
        padding: 16px 12px !important;
    }

    .stat-number {
        font-size: 1.75rem !important;
        margin-bottom: 6px !important;
    }

    .stat-label {
        font-size: 0.7rem !important;
    }

    /* Compact typography */
    .about-title {
        font-size: 1.75rem !important;
        margin-bottom: 10px !important;
    }

    .about-subtitle {
        font-size: 1rem !important;
        margin-bottom: 14px !important;
    }

    .about-description {
        font-size: 0.9375rem !important;
        margin-bottom: 24px !important;
    }
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 575px) {

    /* Very compact spacing */
    .section-premium {
        padding: 40px 0 !important;
    }

    .section-about {
        padding: 40px 0 !important;
    }

    .container-premium {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Stats grid - consider 1x4 on very small screens */
    .stats-grid {
        gap: 10px !important;
        margin: 20px 0 !important;
    }

    .stat-box {
        min-height: 80px !important;
        padding: 14px 10px !important;
    }

    .stat-number {
        font-size: 1.5rem !important;
        margin-bottom: 5px !important;
    }

    .stat-label {
        font-size: 0.65rem !important;
    }
}

/* ========================================
   VERTICAL RHYTHM - CONSISTENT SPACING
   ======================================== */

/* Remove extra spacing between sections */
.section-premium+.section-premium {
    margin-top: 0 !important;
}

/* Remove padding from first/last children */
.section-premium>*:first-child {
    margin-top: 0 !important;
}

.section-premium>*:last-child {
    margin-bottom: 0 !important;
}

/* Card grids - consistent spacing */
.row.g-4 {
    --bs-gutter-y: 24px !important;
}

.row.g-5 {
    --bs-gutter-y: 48px !important;
}

/* "View All" buttons */
.text-center.mt-5 {
    margin-top: 40px !important;
}

/* ========================================
   FINAL OVERRIDES - ABSOLUTE PRIORITY
   ======================================== */

/* Ensure flexbox layout for stats */
html body .section-about .stat-box {
    display: flex !important;
    flex-direction: column !important;
}

/* Ensure proper text display */
html body .section-about .stat-number,
html body .section-about .stat-label {
    display: block !important;
    position: static !important;
}

/* Remove any transforms or positioning */
html body .section-about .stat-number {
    transform: none !important;
}

html body .section-about .stat-label {
    transform: none !important;
}