/* Media and Achievements Section Styles */
.media-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 120px;
}

.media-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding-bottom: 89.08%;
    /* Height ratio: 1069/1200 = 89.08% */
}

/* Text Content - Top right */
.media-text-content {
    position: absolute;
    right: 0;
    top: 0;
    width: 31.67%;
    /* 380/1200 */
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    z-index: 2;
}

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

.media-heading strong {
    font-family: 'IvyOra Display', serif;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: 'wght' 700;
}

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

/* Media button now uses centralized button component (type: outline) */

.media-button-mobile {
    display: none;
}

/* Image Grid - Absolutely positioned */
.media-grid {
    position: absolute;
    inset: 0;
}

.media-image-wrapper {
    position: absolute;
    overflow: hidden;
}

.media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image 1 - Top left, rounded corners */
.media-image-1 {
    left: 0;
    top: 0;
    width: 31.67%;
    /* 380/1200 */
    height: 34.02%;
    /* 363.574/1069 */
    border-radius: 23.41px;
}

/* Image 2 - Center, tall with rounded top */
.media-image-2 {
    left: 34.17%;
    /* 410/1200 */
    top: 11.18%;
    /* 119.54/1069 */
    width: 31.67%;
    /* 380/1200 */
    height: 45.73%;
    /* 488.895/1069 */
    border-radius: 200px 200px 23.415px 23.415px;
}

/* Image 3 - Right middle */
.media-image-3 {
    left: 68.33%;
    /* 820/1200 */
    top: 28.96%;
    /* 309.54/1069 */
    width: 31.67%;
    /* 380/1200 */
    height: 24.11%;
    /* 257.667/1069 */
    border-radius: 23.415px;
}

/* Image 4 - Right bottom, rounded bottom */
.media-image-4 {
    left: 68.33%;
    /* 820/1200 */
    top: 56.06%;
    /* 599.203/1069 */
    width: 31.67%;
    /* 380/1200 */
    height: 43.91%;
    /* 469.482/1069 */
    border-radius: 23.415px 23.415px 200px 200px;
}

/* Image 5 - Left middle, rounded bottom */
.media-image-5 {
    left: 0;
    top: 36.96%;
    /* 395.11/1069 */
    width: 31.67%;
    /* 380/1200 */
    height: 34.02%;
    /* 363.574/1069 */
    border-radius: 23.415px 23.415px 200px 200px;
}

/* Image 6 - Center bottom */
.media-image-6 {
    left: 34.17%;
    /* 410/1200 */
    top: 59.9%;
    /* 640.43/1069 */
    width: 31.67%;
    /* 380/1200 */
    height: 24.11%;
    /* 257.667/1069 */
    border-radius: 23.415px;
}

.media-button-mobile-wrapper {
    display: none;
}

/* Tablet - Below 1200px: Switch to mobile layout */
@media (max-width: 1200px) {
    .media-section {
        padding: 0 60px;
        flex-direction: column;
        align-items: center;
    }

    .media-container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        padding-bottom: 0;
    }

    /* Text Content - normal flow above grid on tablet/mobile */
    .media-text-content {
        position: static;
        width: 100%;
        gap: 16px;
    }

    /* Image grid gets its own aspect-ratio box */
    .media-grid {
        position: relative;
        inset: auto;
        width: 100%;
        padding-bottom: 189.66%;
        /* Mobile height ratio: 620/327 */
    }


    .media-button-desktop {
        display: none;
    }

    .media-button-mobile {
        display: inline-flex;
        height: 48px;
        width: auto;
        padding: 13.663px 20.495px;
        border-radius: 30px;
    }

    /* Wrapper placed below the image container so the mobile button
       sits under the grid (left-aligned), mirroring blog layout. */
    .media-button-mobile-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 40px auto 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Reposition images for mobile - Based on mobile Figma coordinates */
    .media-image-1 {
        left: 0;
        top: 0;
        width: 47.4%;
        /* 155/327 */
        height: 25.48%;
        /* 158.132/620.421 */
        border-radius: 8px;
    }

    .media-text-content {
        gap: 16px;
    }

    .media-image-2 {
        left: 52.6%;
        /* 172/327 */
        top: 8.54%;
        /* 53/620.421 */
        width: 47.4%;
        /* 155/327 */
        height: 34.3%;
        /* 212.744/620.421 */
        border-radius: 200px 200px 8px 8px;
    }

    .media-image-5 {
        left: 0;
        top: 28.53%;
        /* 177/620.421 */
        width: 47.4%;
        /* 155/327 */
        height: 25.48%;
        /* 158.132/620.421 */
        border-radius: 8px 8px 200px 200px;
    }

    .media-image-3 {
        left: 0;
        top: 57.07%;
        /* 354/620.421 */
        width: 47.4%;
        /* 155/327 */
        height: 18.07%;
        /* 112.124/620.421 */
        border-radius: 8px;
    }

    .media-image-6 {
        left: 52.6%;
        /* 172/327 */
        top: 45.13%;
        /* 280/620.421 */
        width: 47.4%;
        /* 155/327 */
        height: 18.07%;
        /* 112.124/620.421 */
        border-radius: 8px;
    }

    .media-image-4 {
        left: 52.6%;
        /* 172/327 */
        top: 67.05%;
        /* 416/620.421 */
        width: 47.4%;
        /* 155/327 */
        height: 32.93%;
        /* 204.297/620.421 */
        border-radius: 23.415px 23.415px 200px 200px;
    }
}

/* Mobile adjustments */
@media (max-width: 899px) {
    .media-section {
        flex-direction: column;
        align-items: center;
        padding: 0 24px;
    }

    .media-heading {
        font-size: 24px;
    }

    .media-text-content {
        gap: 16px;
    }
}