/* Stats Section Styles */
/* Based on Figma node-id: 2301-22551 (desktop) and 2301-22658 (mobile) */

.stats-section {
    background: #fdf5f1;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: center;
}

/* Header Section */
.stats-header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
    max-width: 880px;
    width: 100%;
    padding: 0 40px;
}

.stats-title {
    font-family: 'IvyOra Display', serif;
    font-size: 32px;
    font-weight: 500;
    font-style: italic;
    line-height: 1;
    color: #005b68;
    margin: 0;
}

.stats-title .title-bold {
    font-weight: 700;
    font-style: normal;
}

.stats-title .title-italic {
    font-weight: 500;
    font-style: italic;
}

.stats-description {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #403936;
}

.stats-description p {
    margin: 0 0 16px 0;
}

.stats-description p:last-child {
    margin-bottom: 0;
}

/* Stats Grid Wrapper */
.stats-grid-wrapper {
    position: relative;
    width: 100%;
    height: 614px;
    overflow: hidden;
}

/* Background Image */
.stats-background {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1120px;
    height: 614px;
    opacity: 0.25;
    overflow: hidden;
    pointer-events: none;
}

.stats-background-image {
    position: absolute;
    top: -10.26%;
    left: 0;
    width: 100%;
    height: 121.66%;
    max-width: none;
    object-fit: cover;
}

/* Stats Grid */
.stats-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 38px;
    min-width: 1120px;
    text-align: center;
}

/* Individual Stat Item */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-item:nth-child(1) {
    width: 290px;
}

.stat-item:nth-child(2) {
    width: 190px;
}

.stat-item:nth-child(3) {
    width: 294px;
}

.stat-item:nth-child(4) {
    width: 231px;
}

.stat-number {
    font-family: 'IvyOra Display', serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #ed6a59;
    margin: 0;
}

.stat-text {
    font-family: 'IvyOra Display', serif;
    font-size: 32px;
    line-height: 1;
    color: #005b68;
}

.stat-title {
    font-weight: 700;
    font-style: normal;
    margin: 0;
}

.stat-subtitle {
    font-weight: 500;
    font-style: italic;
    margin: 0;
}

/* ==================== TABLET/MEDIUM SCREENS (below 1200px) ==================== */
@media (max-width: 1199px) {
    .stats-header {
        padding: 0 60px;
    }

    .stats-container {
        gap: 40px;
    }

    /* Stats Grid becomes 2x2 grid */
    .stats-grid-wrapper {
        height: 450px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .stats-background {
        width: 800px;
        height: 450px;
    }

    .stats-grid {
        position: static;
        transform: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 32px;
        min-width: unset;
        max-width: 100%;
        gap: 24px;
    }

    .stat-item {
        width: calc(50% - 12px) !important;
        min-width: 250px;
    }

    .stat-number {
        font-size: 40px;
    }

    .stat-text {
        font-size: 24px;
    }
}

/* ==================== MOBILE STYLES (below 768px) ==================== */
@media (max-width: 767px) {
    .stats-container {
        gap: 40px;
    }

    /* Header Section */
    .stats-header {
        gap: 16px;
        padding: 0 16px;
        text-align: left;
        align-items: flex-start;
    }

    .stats-title {
        font-size: 24px;
    }

    .stats-description {
        font-size: 16px;
    }

    /* Stats Grid */
    .stats-grid-wrapper {
        height: 374px;
    }

    .stats-background {
        width: 682px;
        height: 374px;
    }

    .stats-grid {
        position: static;
        transform: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 32px;
        min-width: unset;
        max-width: 100%;
        padding: 87px 39px;
    }

    .stat-item {
        width: 132px !important;
        min-width: unset;
        gap: 6.589px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-text {
        font-size: 16px;
    }

    .stat-title {
        font-weight: 700;
    }

    .stat-subtitle {
        font-weight: 400;
    }
}

/* ==================== SMALL MOBILE (below 400px) ==================== */
@media (max-width: 399px) {
    .stats-grid {
        padding: 60px 20px;
        gap: 20px 16px;
    }

    .stat-item {
        width: 120px !important;
    }

    .stats-background {
        width: 100%;
    }
}
