
/* =========================================================
   EXPLORE PAKISTAN  RESPONSIVE DESIGN   
========================================================= */


/* =========================================================
   01. LARGE SCREENS  UP TO 1200px
========================================================= */

@media (max-width: 1200px) {

    :root {
        --container-width: 1100px;
        --container-gutter: 24px;
    }

    .site-header__inner {
        gap: 18px;
    }

    .site-nav__list {
        gap: 15px;
    }

    .brand__mark {
        width: 42px;
        height: 42px;
    }

    .brand__name {
        font-size: 1.12rem;
    }

    .brand__tagline {
        font-size: 0.54rem;
    }

    .nav-link {
        font-size: 0.72rem;
    }

    .button--nav {
        padding-inline: 15px;
    }

    .destination-grid,
    .heritage-grid,
    .article-grid {
        gap: 22px;
    }

    .destination-card__content,
    .article-card__content,
    .heritage-card__content {
        padding: 21px;
    }

    .site-footer__main {
        gap: 32px;
    }
}


/* =========================================================
   02. TABLETS AND SMALL LAPTOPS — UP TO 1000px
========================================================= */

@media (max-width: 1000px) {

    :root {
        --container-gutter: 22px;
    }

    .site-header__inner {
        min-height: 82px;
        gap: 16px;
    }

    .site-nav__list {
        gap: 12px;
    }

    .nav-link {
        font-size: 0.69rem;
    }

    .button--nav {
        min-height: 41px;
        padding: 10px 12px;
        font-size: 0.72rem;
    }

    .brand__mark {
        width: 38px;
        height: 38px;
    }

    .brand__name {
        font-size: 1.03rem;
    }

    .brand__tagline {
        letter-spacing: 0.04em;
    }

    .section-heading {
        gap: 24px;
    }

    .destination-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .destination-search {
        width: 100%;
        max-width: 440px;
    }

    .filter-list {
        width: 100%;
    }

    .feature-layout {
        gap: 42px;
    }

    .feature-layout__image,
    .feature-layout__image img {
        min-height: 450px;
    }

    .culture-layout,
    .food-layout {
        gap: 42px;
    }

    .site-footer__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 45px;
        row-gap: 38px;
    }
}


/* =========================================================
   03. MOBILE NAVIGATION BREAKPOINT — UP TO 900px

   Matches the breakpoint used in navigation.js:
   window.matchMedia("(min-width: 901px)")
========================================================= */

@media (max-width: 900px) {

    /* ---------- Header ---------- */

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .site-header__inner {
        position: relative;
        min-height: 78px;
        gap: 15px;
    }

    .brand {
        min-width: 0;
    }

    .brand__mark {
        width: 42px;
        height: 42px;
    }

    .brand__name {
        font-size: 1.15rem;
    }

    .brand__tagline {
        font-size: 0.55rem;
    }


    /* ---------- Hamburger button ---------- */

    .nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 45px;
        height: 45px;
        flex-shrink: 0;
        padding: 10px;
        border: 1px solid var(--color-border);
        border-radius: 7px;
        background: var(--color-white);
        color: var(--color-forest);
        cursor: pointer;
        transition:
            border-color var(--transition-fast),
            background-color var(--transition-fast),
            box-shadow var(--transition-fast);
    }

    .nav-toggle:hover {
        border-color: var(--color-gold);
        background: var(--color-beige-light);
    }

    .nav-toggle:focus-visible {
        outline: 3px solid var(--color-gold);
        outline-offset: 3px;
    }

    .nav-toggle__line {
        width: 21px;
        height: 2px;
        flex: 0 0 2px;
        border-radius: 2px;
        background: currentColor;
        transform-origin: center;
        transition:
            transform var(--transition-fast),
            opacity var(--transition-fast);
    }

    /* Transform the hamburger into a close icon. */

    .nav-toggle.is-open .nav-toggle__line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.is-open .nav-toggle__line:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.is-open .nav-toggle__line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }


    /* ---------- Mobile navigation panel ---------- */

    .site-nav {
        position: absolute;
        z-index: 1001;
        top: 100%;
        right: calc(-1 * var(--container-gutter));
        left: calc(-1 * var(--container-gutter));
        display: block;

        max-height: 0;
        padding: 0;
        overflow: hidden;

        border: 0 solid var(--color-border);
        border-top: 0;

        background: var(--color-white);
        box-shadow: 0 16px 30px rgba(18, 61, 50, 0.10);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-8px);

        transition:
            max-height 280ms ease,
            opacity 200ms ease,
            transform 200ms ease,
            visibility 200ms ease;
    }

    /*
     * navigation.js adds .is-open after the hamburger is clicked.
     * The menu can then be scrolled when its contents exceed
     * the available screen height.
     */

    .site-nav.is-open {
        max-height: calc(100vh - 78px);
        max-height: calc(100svh - 78px);
        padding: 12px var(--container-gutter) 22px;

        overflow-x: hidden;
        overflow-y: auto;

        border-top-width: 1px;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);

        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }


    /* ---------- Mobile navigation links ---------- */

    .site-nav__list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        width: 100%;
        margin: 0;
        padding: 0;

        list-style: none;
    }

    .site-nav__list > li {
        width: 100%;
        margin: 0;
    }

    .nav-link {
        display: flex;
        align-items: center;

        width: 100%;
        min-height: 49px;
        padding: 12px 4px;

        border-bottom: 1px solid rgba(18, 61, 50, 0.08);

        color: var(--color-text);
        font-size: 0.88rem;
        font-weight: 600;
        white-space: normal;
    }

    .nav-link::after {
        right: auto;
        bottom: 7px;
        left: 4px;
        width: 28px;
        height: 2px;
    }

    .nav-link:hover,
    .nav-link--active {
        color: var(--color-emerald);
    }

    .nav-link--active::after {
        background: var(--color-gold);
    }

    .site-nav__contact {
        margin-top: 16px;
    }

    .button--nav {
        display: flex;
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 12px 18px;
        font-size: 0.84rem;
    }


    /* ---------- Shared spacing ---------- */

    .section {
        padding-block: 68px;
    }

    .section--intro {
        padding-block: 65px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 19px;
        margin-bottom: 30px;
    }

    .section-heading__link {
        margin-bottom: 0;
    }


    /* ---------- Hero ---------- */

    .hero--home {
        min-height: 610px;
        min-height: min(740px, 82svh);
    }

    .hero__container {
        padding-block: 70px;
    }

    .hero__content {
        max-width: 700px;
    }

    .hero__title {
        font-size: clamp(3rem, 7.2vw, 4.5rem);
    }

    .hero__description {
        max-width: 560px;
    }


    /* ---------- Intro ---------- */

    .intro-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .intro-layout__heading {
        max-width: 700px;
    }

    .intro-layout__body {
        max-width: 750px;
        padding-top: 0;
    }


    /* ---------- Destination cards ---------- */

    .destination-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .destination-card__image-link,
    .destination-card--featured .destination-card__image-link {
        height: 270px;
    }

    .destination-card__content {
        min-height: 250px;
        padding: 22px;
    }

    .destination-card__title {
        font-size: 1.45rem;
    }

    .destination-tools {
        gap: 18px;
        padding: 18px;
    }

    .filter-list {
        gap: 8px;
    }

    .filter-chip {
        padding-inline: 13px;
    }


    /* ---------- Editorial features ---------- */

    .feature-layout,
    .culture-layout,
    .food-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .feature-layout__image {
        min-height: 400px;
    }

    .feature-layout__image img {
        min-height: 400px;
    }

    .feature-layout__content {
        padding-block: 0;
    }

    .feature-layout__content .section-title {
        max-width: 650px;
    }

    .culture-layout__content {
        max-width: 740px;
    }

    .culture-layout__image,
    .food-layout__image {
        width: 100%;
        height: 420px;
    }


    /* ---------- Heritage and articles ---------- */

    .heritage-grid,
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .heritage-card > a:first-child {
        height: 230px;
    }

    .heritage-card__content,
    .article-card__content {
        padding: 22px;
    }

    .article-card__image-link {
        height: 225px;
    }

    .heritage-card h3,
    .article-card__title {
        font-size: 1.3rem;
    }


    /* ---------- Planning ---------- */

    .planning-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .planning-card {
        gap: 13px;
        padding: 19px;
    }

    .planning-card__number {
        width: 38px;
        height: 38px;
    }

    .planning-card__content strong {
        font-size: 1.1rem;
    }


    /* ---------- Newsletter ---------- */

    .newsletter {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 38px;
    }

    .newsletter__content .section-title {
        max-width: 650px;
    }


    /* ---------- Footer ---------- */

    .site-footer__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px;
    }
}


/* =========================================================
   04. MOBILE PHONES — UP TO 600px
========================================================= */

@media (max-width: 600px) {

    :root {
        --container-gutter: 18px;
    }

    body {
        font-size: 15px;
        line-height: 1.8;
    }

    .container {
        width: calc(100% - (var(--container-gutter) * 2));
    }


    /* ---------- Header ---------- */

    .site-header__inner {
        min-height: 72px;
        gap: 12px;
    }

    .brand {
        gap: 7px;
    }

    .brand__mark {
        width: 36px;
        height: 36px;
    }

    .brand__name {
        font-size: 1.03rem;
    }

    .brand__tagline {
        max-width: 190px;
        font-size: 0.49rem;
        letter-spacing: 0.035em;
    }

    .nav-toggle {
        width: 43px;
        height: 43px;
    }

    .site-nav {
        right: calc(-1 * var(--container-gutter));
        left: calc(-1 * var(--container-gutter));
    }

    .site-nav.is-open {
        max-height: calc(100vh - 72px);
        max-height: calc(100svh - 72px);
    }


    /* ---------- Section spacing ---------- */

    .section {
        padding-block: 54px;
    }

    .section--intro {
        padding-block: 49px;
    }

    .section-title {
        margin-bottom: 16px;
        font-size: clamp(1.9rem, 8vw, 2.45rem);
        letter-spacing: -0.04em;
    }

    .section-description {
        font-size: 0.9rem;
        line-height: 1.85;
    }

    .eyebrow {
        gap: 8px;
        margin-bottom: 13px;
        font-size: 0.65rem;
        letter-spacing: 0.11em;
    }

    .eyebrow::before {
        flex-basis: 22px;
        width: 22px;
    }

    .section-heading {
        gap: 15px;
        margin-bottom: 25px;
    }

    .section-footer {
        margin-top: 28px;
    }


    /* ---------- Buttons ---------- */

    .button {
        min-height: 49px;
        padding: 13px 18px;
        font-size: 0.8rem;
    }


    /* ---------- Hero ---------- */

    .hero--home {
        min-height: 600px;
        min-height: min(710px, 84svh);
    }

    .hero__image {
        object-position: 58% center;
    }

    .hero__overlay {
        background:
            linear-gradient(
                90deg,
                rgba(6, 28, 22, 0.85) 0%,
                rgba(10, 35, 28, 0.69) 65%,
                rgba(10, 35, 28, 0.42) 100%
            ),
            linear-gradient(
                0deg,
                rgba(5, 24, 19, 0.36),
                transparent 60%
            );
    }

    .hero__container {
        padding-block: 51px;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__eyebrow {
        margin-bottom: 18px;
    }

    .hero__title {
        margin-bottom: 19px;
        font-size: clamp(2.55rem, 10.5vw, 3.65rem);
        line-height: 1.1;
        letter-spacing: -0.05em;
    }

    .hero__title span {
        margin-top: 7px;
    }

    .hero__description {
        margin-bottom: 24px;
        font-size: 0.9rem;
        line-height: 1.85;
    }

    .hero__actions {
        align-items: stretch;
        flex-direction: column;
        gap: 11px;
    }

    .hero__actions .button {
        width: 100%;
    }

    .hero__note {
        margin-top: 19px;
        font-size: 0.7rem;
        line-height: 1.7;
    }


    /* ---------- Intro ---------- */

    .intro-layout {
        gap: 18px;
    }

    .intro-layout__heading .section-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .intro-layout__body {
        font-size: 0.89rem;
        line-height: 1.9;
    }

    .intro-layout__body p {
        margin-bottom: 15px;
    }

    .text-link {
        font-size: 0.81rem;
    }


    /* ---------- Destination search ---------- */

    .destination-tools {
        gap: 16px;
        margin-bottom: 24px;
        padding: 14px;
        border-radius: 10px;
    }

    .destination-search {
        min-height: 46px;
        padding-inline: 11px;
    }

    .destination-search input {
        font-size: 0.8rem;
    }

    .filter-list {
        gap: 8px;
    }

    .filter-chip {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 0.7rem;
    }


    /* ---------- Destination cards ---------- */

    .destination-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 19px;
    }

    .destination-card {
        border-radius: 11px;
    }

    .destination-card__image-link,
    .destination-card--featured .destination-card__image-link {
        height: clamp(220px, 68vw, 300px);
    }

    .destination-card__content {
        min-height: 0;
        padding: 20px;
    }

    .destination-card__category {
        margin-bottom: 8px;
        font-size: 0.63rem;
    }

    .destination-card__title {
        margin-bottom: 10px;
        font-size: 1.5rem;
    }

    .destination-card__description {
        margin-bottom: 18px;
        font-size: 0.83rem;
    }


    /* ---------- Feature photography ---------- */

    .feature-layout,
    .culture-layout,
    .food-layout {
        gap: 26px;
    }

    .feature-layout__image,
    .feature-layout__image img {
        min-height: 310px;
    }

    .feature-layout__image {
        border-radius: 11px;
    }

    .feature-layout__image-label {
        right: 19px;
        bottom: 19px;
        left: 19px;
        font-size: 1.65rem;
    }

    .feature-layout__content .section-title {
        font-size: 2.1rem;
    }

    .feature-layout__content > p:not(.eyebrow),
    .culture-layout__content > p:not(.eyebrow),
    .food-layout__content > p:not(.eyebrow) {
        font-size: 0.88rem;
        line-height: 1.9;
    }

    .feature-list {
        gap: 17px;
        margin-block: 25px;
    }

    .feature-list li {
        gap: 13px;
        padding-bottom: 17px;
    }

    .feature-list__marker {
        width: 38px;
        height: 38px;
    }

    .culture-layout__image,
    .food-layout__image {
        height: clamp(240px, 70vw, 330px);
        border-radius: 11px;
    }

    .food-layout__image-caption {
        right: 18px;
        bottom: 18px;
        left: 18px;
        font-size: 1.5rem;
    }


    /* ---------- Heritage cards ---------- */

    .heritage-grid,
    .article-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 19px;
    }

    .heritage-card,
    .article-card {
        border-radius: 11px;
    }

    .heritage-card > a:first-child {
        height: clamp(215px, 64vw, 285px);
    }

    .heritage-card__content,
    .article-card__content {
        padding: 20px;
    }

    .heritage-card h3,
    .article-card__title {
        font-size: 1.35rem;
    }

    .heritage-card__content > p:not(.eyebrow),
    .article-card__content > p {
        font-size: 0.83rem;
        line-height: 1.85;
    }

    .article-card__image-link {
        height: clamp(215px, 64vw, 285px);
    }


    /* ---------- Planning cards ---------- */

    .planning-header {
        margin-bottom: 27px;
        text-align: left;
    }

    .planning-header .eyebrow {
        justify-content: flex-start;
    }

    .planning-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
    }

    .planning-card {
        gap: 14px;
        padding: 18px;
        border-radius: 10px;
    }

    .planning-card__number {
        width: 36px;
        height: 36px;
        font-size: 0.69rem;
    }

    .planning-card__content strong {
        font-size: 1.05rem;
    }

    .planning-card__content > span {
        font-size: 0.79rem;
    }


    /* ---------- Newsletter ---------- */

    .section--newsletter {
        padding-block: 42px;
    }

    .newsletter {
        gap: 21px;
        padding: 25px 20px;
        border-radius: 13px;
    }

    .newsletter__content .section-title {
        font-size: 2rem;
    }

    .newsletter__content > p:last-child {
        font-size: 0.85rem;
    }

    .newsletter-form {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .newsletter-form input {
        min-height: 47px;
        padding-inline: 11px;
        font-size: 0.82rem;
    }

    .newsletter-form .button {
        width: 100%;
    }

    .newsletter__note {
        font-size: 0.69rem;
    }


    /* ---------- Footer ---------- */

    .site-footer {
        padding-top: 43px;
    }

    .site-footer__main {
        grid-template-columns: minmax(0, 1fr);
        gap: 29px;
        padding-bottom: 32px;
    }

    .site-footer__description {
        max-width: 390px;
        margin-top: 17px;
        font-size: 0.79rem;
    }

    .site-footer__heading {
        margin-bottom: 18px;
    }

    .site-footer__links {
        gap: 10px;
    }

    .site-footer__links a {
        font-size: 0.8rem;
    }

    .site-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        min-height: 0;
        padding-block: 20px;
    }

    .site-footer__bottom p {
        font-size: 0.7rem;
    }
}


/* =========================================================
   05. SMALL MOBILE SCREENS — UP TO 380px
========================================================= */

@media (max-width: 380px) {

    :root {
        --container-gutter: 15px;
    }

    .site-header__inner {
        min-height: 68px;
        gap: 8px;
    }

    .brand {
        gap: 5px;
    }

    .brand__mark {
        width: 31px;
        height: 31px;
    }

    .brand__name {
        font-size: 0.94rem;
    }

    .brand__tagline {
        font-size: 0.45rem;
        letter-spacing: 0.015em;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
    }

    .site-nav.is-open {
        max-height: calc(100vh - 68px);
        max-height: calc(100svh - 68px);
    }

    .hero--home {
        min-height: 570px;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__description {
        font-size: 0.86rem;
    }

    .button {
        padding-inline: 14px;
        font-size: 0.77rem;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .filter-list {
        gap: 7px;
    }

    .filter-chip {
        padding-inline: 10px;
        font-size: 0.67rem;
    }

    .destination-card__content,
    .article-card__content,
    .heritage-card__content {
        padding: 17px;
    }

    .planning-card {
        gap: 10px;
        padding: 15px;
    }

    .planning-card__number {
        width: 32px;
        height: 32px;
    }

    .newsletter {
        padding: 21px 15px;
    }
}


/* =========================================================
   06. LANDSCAPE PHONES
========================================================= */

@media (max-height: 500px) and (orientation: landscape)
       and (max-width: 900px) {

    .hero--home {
        min-height: 540px;
        min-height: max(480px, 100svh);
    }

    .hero__container {
        padding-block: 36px;
    }

    .hero__title {
        font-size: clamp(2.4rem, 6vw, 3.5rem);
    }

    .site-nav.is-open {
        max-height: calc(100vh - 70px);
        max-height: calc(100svh - 70px);
    }
}


/* =========================================================
   07. REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .site-nav,
    .nav-toggle__line,
    .destination-card,
    .destination-card__image,
    .article-card,
    .article-card__image-link img,
    .heritage-card,
    .heritage-card > a:first-child img,
    .feature-layout__image img,
    .culture-layout__image img,
    .food-layout__image img,
    .planning-card,
    .button {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }

}



/* =========================================================
   RESPONSIVE IMAGE GAP FIX — all screen sizes
========================================================= */
.destination-card__image-link {
    height: auto;
    aspect-ratio: 16 / 9;
}

.destination-card__image-link .destination-card__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    object-fit: cover;
}

@media (max-width: 600px) {
    .destination-card__image-link {
        aspect-ratio: 16 / 9;
    }
}
