/* ==========================================================================
   Responsive rules (loaded last). Breakpoints follow Bootstrap 5:
   xl ≥1200 · lg ≥992 · md ≥768 · sm ≥576
   ========================================================================== */

/* Laptop / iPad landscape (≤1199) */
@media (max-width: 1199.98px) {
    :root { --ph-section-y: 84px; }

    .site-nav__link { padding-inline: .6rem !important; font-size: .9rem; }
    .site-nav__item--cta { margin-inline-start: .4rem; }
    .site-brand { margin-inline-end: .75rem; }


    .stats-strip__inner { grid-template-columns: 1fr; gap: 1.25rem; }
    .stats-strip__text { max-width: 70ch; }

    .sectors__grid { gap: 1.5rem; }

    .country-grid { gap: 1rem; }
}

/* Tablet / iPad portrait (≤991) */
@media (max-width: 991.98px) {
    :root {
        --ph-header-h: 72px;
        --ph-section-y: 72px;
    }

    .site-brand img { width: 56px; height: 56px; }

    .hero { --hero-h: 560px; }
    .hero__shade {
        background:
            linear-gradient(90deg, rgba(8, 11, 18, .9) 0%, rgba(8, 11, 18, .7) 60%, rgba(8, 11, 18, .35) 100%),
            linear-gradient(0deg, rgba(8, 11, 18, .5) 0%, rgba(8, 11, 18, 0) 40%);
    }

    .hero__caption { margin-inline-start: 96px; max-width: calc(100% - 270px); }

    .profile__photo { aspect-ratio: 16 / 9; max-height: none; }

    .sectors__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sectors__grid > .sector-card,
    .sectors__grid > .sector-card:nth-child(n + 4) { grid-column: auto; }
    .sectors__grid > .sector-card:last-child:nth-child(odd) { grid-column: 1 / -1; }


    .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .leader-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    .world-map { width: 130%; opacity: .5; }
}

/* Large phones / small tablets (≤767) */
@media (max-width: 767.98px) {
    :root { --ph-section-y: 60px; }

    .hero {
        --hero-h: 540px;
        --hero-bar-h: 112px;
    }

    .hero__shade {
        background: linear-gradient(0deg, rgba(8, 11, 18, .94) 0%, rgba(8, 11, 18, .78) 55%, rgba(8, 11, 18, .45) 100%);
    }

    .hero__content { align-items: flex-end; padding-bottom: 2rem; }
    .hero__body { -webkit-line-clamp: 4; margin-bottom: 1.4rem; }

    .hero__bar { align-items: flex-start; padding-top: .9rem; }

    .hero__caption {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        max-width: none;
        margin: 0;
        padding: 0;
        background: none;
        white-space: normal;
        font-size: .7rem;
        line-height: 1.5;
    }

    .hero__caption-dot { display: none; }

    .hero__controls-inner { align-items: flex-end; padding-bottom: .75rem; }

    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }

    .feature-grid { grid-template-columns: 1fr; }
    .feature-card:last-child:nth-child(odd) { grid-column: auto; }

    .sectors__grid { gap: 1rem; }
    .sector-card { padding: 1.25rem 1.25rem 1rem; }
    .sector-card__top, .sector-card__title { margin-bottom: 1.1rem; }

    .section-head { margin-bottom: 2rem; }

    .country-card { min-height: 0; }
    .country-card__name { font-size: 1.05rem; }

    .leader-card { padding: 1.5rem; }
    .leader-card__head { gap: 1rem; }
    .leader-card__photo { width: 96px; }
    .leader-card__name { font-size: 1.2rem; }

    .inquiry-card { padding: 1.5rem; }

    .cookie-alert__inner { flex-direction: column; align-items: stretch; gap: .6rem; }
    .cookie-alert__actions { align-self: flex-end; }
}

/* Phones (≤575) */
@media (max-width: 575.98px) {
    .container-xl {
        padding-inline-start: max(16px, env(safe-area-inset-left));
        padding-inline-end: max(16px, env(safe-area-inset-right));
    }

    .hero { --hero-h: 560px; }

    .hero__actions { gap: .75rem; }
    .hero__actions .btn { flex: 1 1 100%; }

    .sectors__grid { grid-template-columns: 1fr; }
    .sectors__grid > .sector-card:last-child:nth-child(odd) { grid-column: auto; }

    .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .country-card { padding: 1rem; }
    .country-card__name { font-size: 1rem; }
    .world-map { width: 170%; }

    .office-panel { padding: 1.25rem; }
    .leader-card__head { flex-direction: column; }
}

/* Very small phones (≤374, e.g. iPhone SE 1st gen) */
@media (max-width: 374.98px) {
    .hero__title { -webkit-line-clamp: 5; }
    .stat__value { font-size: 1.4rem; }
}

/* Short landscape phones */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 991.98px) {
    .hero { --hero-h: 440px; }
    .hero__body { -webkit-line-clamp: 2; }
    .hero__actions .btn { flex: 0 0 auto; }
}
