/* ==========================================================================
   ISKCON Hare Krishna Fields - breakpoint overrides
   ========================================================================== */

/* Laptop */
@media (max-width: 1399px) {
    .hkd-nav { padding-left: 12px; }
    .hkd-dropdown a { font-size: 17px; }
    .hkd-seva-card { min-height: 0; }
}

@media (max-width: 1199px) {
    :root,
    .hkd-container--narrow { --hkd-gutter: 40px; }

    .hkd-split,
    .hkd-temple .hkd-split { grid-template-columns: minmax(0, 1fr) minmax(0, 48%); }
    .hkd-seva__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hkd-connect__inner { grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 180px); }

    .hkd-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
    .hkd-footer__col--policies { padding-top: 0; }
    .hkd-footer__col--address { margin-left: 0; }
    .hkd-footer__col--social { text-align: left; padding-top: 0; }
}

/* Tablet - collapsible navigation */
@media (max-width: 991px) {
    :root,
    .hkd-container--narrow { --hkd-gutter: 24px; }

    .hkd-header__main { position: relative; height: 84px; }
    .hkd-logo { width: 84px; }
    .hkd-nav-toggle { display: block; }

    .hkd-nav {
        position: absolute;
        top: 100%;
        left: calc(var(--hkd-gutter) * -1);
        right: calc(var(--hkd-gutter) * -1);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px var(--hkd-gutter) 24px;
        background: var(--hkd-sky);
        border-top: 1px solid #75828C;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
    }
    .hkd-nav.is-open { display: flex; }
    .hkd-nav__list { flex-direction: column; align-items: stretch; }
    .hkd-nav__list > li { flex-direction: column; align-items: stretch; }
    .hkd-nav__list > li + li::before { display: none; }
    .hkd-nav__list > li > a,
    .hkd-nav__list > li > span {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
        font-size: 17px;
    }
    .hkd-dropdown {
        position: static;
        min-width: 0;
        padding: 0 0 0 16px;
        background: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .hkd-dropdown a {
        padding: 10px 0;
        color: var(--hkd-black);
        font-size: 15px;
        border-bottom: 1px solid rgba(0, 0, 0, .06);
    }
    .hkd-dropdown a:hover { color: var(--hkd-brown); }
    .hkd-nav__donate { align-self: flex-start; margin-top: 18px; }

    .hkd-split,
    .hkd-temple .hkd-split,
    .hkd-gurukul__top { grid-template-columns: 1fr; gap: 32px; }
    .hkd-split__media,
    .hkd-gurukul__img { max-width: 640px; }
    .hkd-prabhupada .hkd-split__media { justify-self: center; }

    .hkd-events__grid { display: flex; flex-wrap: wrap; justify-content: center; }
    .hkd-event-card { flex: 0 1 calc(50% - 9px); }

    .hkd-connect__inner { grid-template-columns: 1fr; gap: 0; }
    .hkd-connect__art { justify-self: center; max-width: 360px; }
    .hkd-connect__body { padding-block: 16px 20px; }
    .hkd-connect__qr { justify-self: center; width: 180px; margin-bottom: 32px; }

    .hkd-volunteer__inner { grid-template-columns: 1fr; gap: 0; }
    .hkd-volunteer__img { margin-inline: calc(var(--hkd-gutter) * -1); }
}

/* Large phones */
@media (max-width: 767px) {
    :root,
    .hkd-container--narrow { --hkd-gutter: 16px; }

    .hkd-hero__cta .hkd-btn { min-height: 28px; padding: 4px 14px; font-size: 12px; }
    .hkd-hero__arrow { width: 34px; height: 34px; margin-top: 0; font-size: 15px; }

    .hkd-event-card { flex-basis: 100%; max-width: 520px; }

    .hkd-gurukul__meta { flex-direction: column; gap: 4px; }
    .hkd-gurukul__meta span + span::before { display: none; }
    .hkd-gurukul__copy { line-height: 1.35; }
    .hkd-gurukul__copy p + p { margin-top: 16px; }
    .hkd-temple__text,
    .hkd-concept__text,
    .hkd-volunteer__text p { line-height: 1.35; }
    .hkd-event-card p { line-height: 1.3; }

    .hkd-concept__grid { flex-direction: column; }
    .hkd-concept__item,
    .hkd-concept__item.is-featured { flex-basis: auto; width: 100%; max-width: 470px; }

    .hkd-seva__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
    .hkd-seva-card { padding: 0 10px 20px; }
    .hkd-seva-card h3 { margin: 14px 0 10px; padding-inline: 4px; line-height: 1.05; }
    .hkd-seva-card .hkd-more { padding-inline: 4px; }

    .hkd-facilities__grid { grid-template-columns: 1fr; max-width: 510px; }
}

/* Phones */
@media (max-width: 575px) {
    .hkd-mantra { padding: 8px 0; font-size: 11px; }
    .hkd-header__main { height: 72px; }
    .hkd-logo { width: 72px; }

    .hkd-tag { gap: 12px; }
    .hkd-tag__icon { width: 30px; height: 25px; }

    .hkd-footer__grid { grid-template-columns: 1fr; }
    .hkd-footer__copy { margin-top: 40px; font-size: 14px; }
}

/* Seva enquiry: stack the intro above the form */
@media (max-width: 991px) {
    .hkd-enquiry { grid-template-columns: 1fr; }
    .hkd-enquiry__intro { margin: 0 clamp(24px, 3vw, 56px); padding-inline: 0; border-right: 0; border-bottom: 1px solid rgba(247, 220, 122, .35); }
}
@media (max-width: 575px) {
    .hkd-enquiry__checks,
    .hkd-enquiry__row { grid-template-columns: 1fr; }
    .hkd-enquiry__btn { justify-self: stretch; }
}

@media (max-width: 420px) {
    .hkd-seva__grid,
    .hkd-seva__grid.hkd-seva__grid--pair { grid-template-columns: 1fr; }
    .hkd-seva-card { padding: 0 16px 24px; }
}

/* ---------- Inner pages ---------- */
@media (max-width: 991px) {
    :root { --hkd-header-h: 135px; }
    .hkd-page-banner { min-height: calc(var(--hkd-header-h) + 160px); }
    .hkd-about-row,
    .hkd-about-row--media-left { grid-template-columns: 1fr; gap: 28px; }
    .hkd-about-row--media-left .hkd-about-row__media { order: 0; }
    .hkd-about-row__media { max-width: 710px; }
    .hkd-about-feature .hkd-about-row__text { padding-top: 0; }
    .hkd-about-row__text p { line-height: 1.4; }
    .hkd-about-row__text p + p { margin-top: 16px; }
}

@media (max-width: 767px) {
    .hkd-page-banner { min-height: calc(var(--hkd-header-h) + 130px); }
    /* Keep the title on open sky: show the left part of the banner, building at the right edge */
    .hkd-page-banner__bg img { object-position: 33% 31.5%; }
    /* Title spans most of the width on phones - keep it on clean sky */
    .hkd-page-banner--veiled .hkd-page-banner__bg::after {
        -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 62%, transparent 88%);
        mask-image: linear-gradient(90deg, #000 0%, #000 62%, transparent 88%);
    }
    .hkd-about-feature__heading { margin-bottom: 24px; }
}

@media (max-width: 575px) {
    :root { --hkd-header-h: 112px; }
}

/* ---------- About Srila Prabhupada ---------- */
@media (max-width: 1199px) {
    .hkd-pp-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
}

@media (max-width: 991px) {
    .hkd-pp-row,
    .hkd-pp-row--media-left,
    .hkd-pp-row--pair,
    .hkd-pp-row--video { grid-template-columns: 1fr; gap: 28px; }
    /* Text first, then its picture - same order as the other stacked sections */
    .hkd-pp-row--media-left .hkd-pp-media,
    .hkd-pp-row--pair .hkd-pp-pair { order: 1; }
    .hkd-pp-media,
    .hkd-pp-pair { max-width: 700px; }
    .hkd-pp-text p,
    .hkd-pp-list,
    .hkd-pp-achievements__list p { line-height: 1.4; }
    .hkd-pp-stats__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .hkd-pp-gallery { grid-template-columns: 1fr; max-width: 520px; }
    .hkd-pp-achievements__list { columns: 1; }
    .hkd-pp-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
    .hkd-pp-title { margin-bottom: 28px; }
}

@media (max-width: 420px) {
    .hkd-pp-pair { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hkd-pp-stats__grid { grid-template-columns: 1fr; }
}
/* ---------- Temple Construction Progress ---------- */
@media (max-width: 767px) {
    .hkd-milestone__head { flex-wrap: wrap; }
    .hkd-milestone__status { padding: 2px 18px; font-size: 14px; }
    .hkd-milestone__body { line-height: 1.4; }
    .hkd-milestone__photos { gap: 8px; }
    .hkd-milestone__thumb img { height: 72px; max-width: 140px; }
    .hkd-landmark { padding-inline: 12px; }
    .hkd-landmark__title { position: static; margin-bottom: 12px; }
    .hkd-landmark__grid { grid-template-columns: 1fr; }
    .hkd-landmark__grid > li { padding: 12px 16px; }
    .hkd-lightbox { padding: 16px; }
    .hkd-lightbox__frame { padding: 8px; }
    .hkd-lightbox__close { top: -12px; right: -8px; width: 34px; height: 34px; font-size: 17px; }
    .hkd-lightbox__nav--prev { left: 14px; }
    .hkd-lightbox__nav--next { right: 14px; }
}
/* ---------- Donation ---------- */
@media (max-width: 991px) {
    .hkd-donate__cols { grid-template-columns: 1fr; row-gap: 20px; }
    .hkd-donate__form .hkd-donate__cols { row-gap: 28px; }
}
@media (max-width: 767px) {
    .hkd-donate,
    .hkd-form-card { padding-inline: 16px; }
    .hkd-donate__fields,
    .hkd-volunteer-page__fields { grid-template-columns: 1fr; }
    .hkd-seva-acc__item summary { min-height: 54px; padding-inline: 16px; }
    .hkd-seva-acc__body { padding-inline: 16px; }
    .hkd-check { align-items: flex-start; }
    .hkd-check input { flex-shrink: 0; margin-top: 2px; }
    .hkd-donate__submit .hkd-donate__btn { width: 100%; }
}
/* ---------- Our Courses ---------- */
@media (max-width: 1199px) {
    .hkd-br-lg { display: none; }
    .hkd-gk-pillars__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hkd-gk-pillars__grid .hkd-gk-card { min-height: 0; }
    .hkd-gk-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 991px) {
    .hkd-gk-info__grid { grid-template-columns: 1fr; }
    .hkd-gk-features { gap: 28px; }
    .hkd-gk-modalities__card { grid-template-columns: 1fr; }
    .hkd-gk-form__row--3 { grid-template-columns: 1fr 1fr; }
    .hkd-gk-form__row { margin-bottom: 24px; }
    .hkd-gk-register { padding-top: 56px; }
}
@media (max-width: 767px) {
    .hkd-gk-pillars__grid { grid-template-columns: 1fr; max-width: 420px; }
    .hkd-gk-card--wide { grid-template-columns: 1fr; max-width: 420px; }
    .hkd-gk-gallery__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hkd-gk-form__row--3,
    .hkd-gk-form__row--2 { grid-template-columns: 1fr; gap: 18px; }
    .hkd-gk-form__field--date input { max-width: none; }
    .hkd-gk-form__child legend { margin-bottom: 20px; font-size: 22px; }
    .hkd-gk-form__terms { margin-bottom: 32px; font-size: 17px; }
    .hkd-gk-form__terms input { width: 26px; height: 26px; margin-left: 0; }
    .hkd-gk-form__submit { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
