/* ==========================================================================
   CRRA Country Hero Image Module
   ========================================================================== */

.crra_country_hero_image.et_pb_module,
.crra_country_hero_image .et_pb_module_inner,
.crra-country-hero-image-module {
    height: 380px !important;
    display: block;
}

/* Shadow on the wrapper (clip-path on .crra-chi-img clips box-shadow, so use filter) */
.crra-country-hero-image-module {
    filter: drop-shadow(2px 2px 10px rgba(0, 0, 0, 0.24));
}

.crra-chi-img {
    position: relative;
    width: 100%;
    height: 380px;
    min-height: 380px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    /* Diagonal crop on right edge — matches CRRA ~6% diagonal ratio */
    clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%);
}

/* Status badge (top-left) */
.crra-chi-badge {
    position: absolute;
    top: 41px;
    left: 60px;
    height: 36px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.32px;
    color: #FFFFFF;
    text-transform: uppercase;
    z-index: 2;
}

/* Country name (below badge) */
.crra-chi-name {
    position: absolute;
    top: 92px;
    left: 60px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-style: italic;
    font-size: var(--crra-h1-size);
    line-height: 1.07em;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    word-break: normal;
    z-index: 2;
}

.crra-chi-subtitle {
    position: absolute;
    top: 172px;
    left: 60px;
    max-width: 60%;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 22px;
    line-height: 1.4em;
    color: #FFFFFF;
    margin: 0;
    z-index: 2;
}

/* When column bleeds to left viewport edge, badge/name shift right to stay
   at their Figma-specified canvas position (x=113px from viewport left) */
.crra-col-bleed-left .crra-chi-badge,
.crra-col-bleed-left .crra-chi-name,
.crra-col-bleed-left .crra-chi-subtitle {
    left: 113px;
}

body:has(.crra_country_hero_image) .et_pb_section_1 > .et_pb_row_1:not(.crra-row-wide) {
    width: calc(100% - clamp(40px, 6.625vw, 106px)) !important;
    max-width: var(--crra-content-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 981px) {
    body:has(.crra_country_hero_image) .et_pb_section_1 .et_pb_row_1 > .et_pb_column:last-child {
        padding-top: 30px;
    }

    body:has(.crra_country_hero_image) .et_pb_section_1 .et_pb_row_1 > .et_pb_column:last-child > .et_pb_text:not(:has(blockquote)) {
        display: none;
    }
}

/* ==========================================================================
   More Country Reports carousel — white nav buttons on beige background
   ========================================================================== */

.crra-subpage-carousel .crra-carousel-nav-btn {
    background: #FFFFFF;
}

.crra-subpage-carousel .crra-carousel-nav-btn:hover {
    background: #f0efe0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
    .crra-chi-name {
        font-size: var(--crra-h1-size);
    }

    .crra-col-bleed-left .crra-chi-badge,
    .crra-col-bleed-left .crra-chi-name,
    .crra-col-bleed-left .crra-chi-subtitle {
        left: 25px;
    }
}

@media (max-width: 767px) {
    .crra-chi-img {
        min-height: 280px;
    }
    .crra-chi-name {
        font-size: var(--crra-h1-size);
    }
    .crra-chi-badge {
        top: 24px;
        left: 24px;
    }
    .crra-chi-name {
        top: 70px;
        left: 24px;
    }
    .crra-chi-subtitle {
        left: 24px;
    }
}
