/* ==========================================================================
   theme.css: global layer of the redesign. Loaded after site.css (and before page @push('styles') sheets).
   1. Tokens          2. Container widths      3. Section rhythm
   4. Header / nav    5. Minimal header        6. Reveal effect ([data-reveal])
   7. Back to top     8. Page tweaks (about, contact, faq, dgca medical, aircraft sale)
   ========================================================================== */

/* --- 1. Tokens ------------------------------------------------------------ */
:root {
    --vd-navy: #09212b;
    --vd-navy-soft: #0d2c39;
    --vd-sky: #33BDFF;
    --vd-sky-deep: #009ce3;
    --vd-surface: #f6f9fc;
    --vd-text: #4e4e4e;
    --vd-radius: 16px;
    --vd-shadow: 0 10px 30px rgba(9, 33, 43, 0.08);
    --vd-border: 1px solid rgba(9, 33, 43, 0.06);
    --vd-section-space: clamp(56px, 7vw, 104px);
    --vd-section-space-sm: clamp(40px, 5vw, 72px);
    --vd-header-height: 68px;
    --vd-gutter: 16px;
}

html {
    scroll-padding-top: calc(var(--vd-header-height) + 16px);
}

/* --- 2. Container widths ---------------------------------------------------
   Bootstrap stops at 1320px. Wide screens get a wider container and fluid gutters; below 1400px only the
   gutter grows to at least 16px. */
.container {
    padding-left: var(--vd-gutter);
    padding-right: var(--vd-gutter);
}

@media (min-width: 1400px) {
    .container {
        --vd-gutter: clamp(16px, 2vw, 32px);
        max-width: 1380px;
    }
}

@media (min-width: 1600px) {
    .container {
        --vd-gutter: clamp(16px, 3vw, 48px);
        max-width: 1480px;
    }
}

@media (min-width: 1800px) {
    .container {
        max-width: 1560px;
    }
}

/* --- 3. Section rhythm -----------------------------------------------------
   Every top-level section: var(--vd-section-space) top and bottom. .section--sm is the tighter variant.
   A .section nested in another section does not pad again. */
.section,
.modern-about-section,
.modern-course-section,
.modern-stats-section,
.reviews-section,
.modern-gallery-section,
.modern-requirements-section,
.modern-faq-section,
.modern-contact-section,
.modern-choose-section,
.modern-team-section {
    padding-top: var(--vd-section-space);
    padding-bottom: var(--vd-section-space);
}

.section--sm {
    padding-top: var(--vd-section-space-sm);
    padding-bottom: var(--vd-section-space-sm);
}

.section--top {
    padding-top: var(--vd-section-space);
}

.section--bottom {
    padding-bottom: var(--vd-section-space);
}

.section__head {
    padding-bottom: clamp(28px, 3.5vw, 48px);
}

/* Legacy template rule pulled .service-section 150px up over the previous section at >= 1920px. */
@media (min-width: 1920px) {
    .service-section {
        margin-top: 0;
    }
}

.section .section,
.section .section--sm {
    padding-top: 0;
    padding-bottom: 0;
}

/* --- 4. Header / main nav (partials/nav-full) ------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9990;
    background-color: var(--vd-navy);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(51, 189, 255, 0) 0%, rgba(51, 189, 255, 0.7) 50%, rgba(51, 189, 255, 0) 100%);
    opacity: 0.25;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.site-header.is-scrolled {
    background-color: rgba(9, 33, 43, 0.86);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 30px rgba(3, 14, 19, 0.22);
}

.site-header.is-scrolled::after {
    opacity: 1;
}

.site-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--vd-header-height);
}

.site-header__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 6px 0;
}

.site-header__logo img {
    height: 48px;
    width: auto;
}

.site-header__nav.nav-container {
    padding: 0;
    background: transparent;
}

.site-header .navs {
    background: transparent;
}

.site-header__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-header__toggle:hover,
.nav-toggler .site-header__toggle {
    background: var(--vd-sky);
    border-color: var(--vd-sky);
    color: var(--vd-navy);
}

.site-header .primary-menu__link {
    position: relative;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    text-transform: none;
}

.site-header .primary-menu__link:hover,
.site-header .primary-menu__link:focus-visible,
.site-header .primary-menu__list.is-current > .primary-menu__link {
    color: #ffffff;
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--vd-sky);
    color: var(--vd-navy);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(51, 189, 255, 0.28);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.site-header__cta i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.site-header__cta:hover,
.site-header__cta:focus-visible {
    background: #5ccbff;
    color: var(--vd-navy);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(51, 189, 255, 0.36);
}

.site-header__cta:hover i {
    transform: translateX(2px);
}

/* Desktop */
@media (min-width: 992px) {
    .site-header .navs {
        display: flex;
        align-items: center;
        gap: clamp(16px, 2vw, 28px);
    }

    .site-header .primary-menu {
        align-items: center;
    }

    .site-header .primary-menu__list {
        margin-right: clamp(14px, 1.5vw, 26px);
    }

    .site-header .primary-menu__list.has-sub {
        margin-right: clamp(30px, 2.6vw, 42px);
    }

    .site-header .primary-menu__list:last-child {
        margin-right: 0;
    }

    .site-header .primary-menu__link {
        padding: 23px 0;
        font-size: 0.95rem;
        font-weight: 500;
        line-height: 22px;
    }

    /* Hover / current underline */
    .site-header .primary-menu__link::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 15px;
        height: 2px;
        border-radius: 2px;
        background: var(--vd-sky);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 0.25s ease;
    }

    .site-header .primary-menu__link:hover::before,
    .site-header .primary-menu__list.has-sub:hover > .primary-menu__link::before,
    .site-header .primary-menu__list.is-current > .primary-menu__link::before {
        transform: scaleX(1);
    }

    .site-header .primary-menu__list.has-sub:hover > .primary-menu__link {
        color: #ffffff;
    }

    .site-header .primary-menu__list.has-sub .primary-menu__link::after {
        top: 50%;
        right: -20px;
        font-size: 16px;
        color: rgba(255, 255, 255, 0.6);
        transform: translateY(-50%);
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .site-header .primary-menu__list.has-sub:hover > .primary-menu__link::after,
    .site-header .primary-menu__list.has-sub:focus-within > .primary-menu__link::after {
        color: var(--vd-sky);
        transform: translateY(-50%) rotate(180deg);
    }

    /* Dropdown */
    .site-header .primary-menu__sub {
        top: 100%;
        min-width: 230px;
        padding: 8px;
        border-radius: 12px;
        border: 1px solid rgba(9, 33, 43, 0.06);
        box-shadow: 0 18px 40px rgba(9, 33, 43, 0.16), 0 2px 6px rgba(9, 33, 43, 0.06);
        transform: translate(-50%, 8px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    }

    .site-header .primary-menu__sub::after {
        top: -6px;
        width: 12px;
        height: 12px;
        border: 0;
        border-radius: 2px;
        background: #ffffff;
        box-shadow: -1px -1px 0 rgba(9, 33, 43, 0.06);
        transform: translateX(-50%) rotate(45deg);
    }

    .site-header .primary-menu__list.has-sub:hover > .primary-menu__sub,
    .site-header .primary-menu__list.has-sub:focus-within > .primary-menu__sub {
        visibility: visible;
        opacity: 1;
        z-index: 9999;
        transform: translate(-50%, 0);
    }

    .site-header .primary-menu__sub-list,
    .site-header .primary-menu__sub-list:hover {
        border-bottom: 0;
    }

    .site-header .primary-menu__sub-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border-radius: 8px !important;
        background: transparent;
        color: var(--vd-navy);
        font-size: 0.9rem;
        font-weight: 500;
        text-align: left;
        white-space: nowrap;
    }

    .site-header .primary-menu__sub-link::before {
        content: "";
        flex: 0 0 6px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(9, 33, 43, 0.18);
        transition: background-color 0.18s ease;
    }

    .site-header .primary-menu__sub-link:hover,
    .site-header .primary-menu__sub-link:focus-visible {
        background: rgba(51, 189, 255, 0.12);
        color: var(--vd-navy);
    }

    .site-header .primary-menu__sub-link:hover::before,
    .site-header .primary-menu__sub-list.is-current .primary-menu__sub-link::before {
        background: var(--vd-sky);
    }

    .site-header .primary-menu__sub-list.is-current .primary-menu__sub-link {
        color: var(--vd-sky-deep);
        font-weight: 700;
    }
}

/* Desktop below 1200px: tighter menu, the CTA moves to the drawer only. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .site-header .primary-menu__list {
        margin-right: 14px;
    }

    .site-header .primary-menu__list.has-sub {
        margin-right: 30px;
    }

    .site-header .primary-menu__link {
        font-size: 0.9rem;
    }

    .site-header__cta {
        display: none;
    }

    .site-header__logo img {
        height: 42px;
    }
}

/* Mobile drawer (body.nav-toggler is toggled by app.js) */
@media (max-width: 991.98px) {
    :root {
        --vd-header-height: 64px;
    }

    .site-header__logo img {
        height: 42px;
    }

    .site-header__nav.nav-container {
        position: static;
    }

    .site-header .navs {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        min-width: 0;
        max-height: calc(100vh - var(--vd-header-height) - 24px);
        overflow-y: auto;
        padding: 8px;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: #0c2a36;
        box-shadow: 0 24px 48px rgba(3, 14, 19, 0.4);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        z-index: 9997;
    }

    .nav-toggler .site-header .navs {
        top: calc(100% + 8px);
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .site-header .primary-menu__list {
        border-radius: 12px;
    }

    .site-header .primary-menu__link {
        margin: 0;
        padding: 13px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-align: left;
        font-size: 1rem;
    }

    .site-header .primary-menu__list:last-child > .primary-menu__link {
        border-bottom: 0;
    }

    .site-header .primary-menu__list.is-current > .primary-menu__link {
        color: var(--vd-sky);
    }

    .site-header .primary-menu__list.has-sub .primary-menu__link::after {
        top: 50%;
        right: 14px;
        font-size: 20px;
        transform: translateY(-50%);
        transition: transform 0.2s ease;
    }

    .site-header .primary-menu__list.has-sub.active > .primary-menu__link::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .primary-submenu-toggler .site-header .primary-menu__list.has-sub.active {
        padding-bottom: 6px;
        background: rgba(51, 189, 255, 0.08);
    }

    .site-header .primary-menu__sub {
        display: none;
        height: auto;
        margin: 0;
        padding: 2px 0 4px;
        visibility: visible;
        opacity: 1;
        z-index: auto;
    }

    .primary-submenu-toggler .site-header .primary-menu__list.has-sub.active .primary-menu__sub {
        display: block;
    }

    .site-header .primary-menu__sub-list {
        border-bottom: 0;
    }

    .site-header .primary-menu__sub-link {
        padding: 10px 14px 10px 28px;
        background: transparent;
        color: rgba(255, 255, 255, 0.8);
        text-align: left;
        font-size: 0.95rem;
    }

    .site-header .primary-menu__sub-link:hover,
    .site-header .primary-menu__sub-list.is-current .primary-menu__sub-link {
        color: var(--vd-sky);
    }

    .site-header__cta {
        display: flex;
        margin: 10px 6px 6px;
        padding: 12px 18px;
    }
}

/* --- 5. Minimal header (partials/nav-minimal) ----------------------------- */
.site-header__contact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header__contact-link:hover,
.site-header__contact-link:focus-visible {
    color: #ffffff;
    border-color: rgba(51, 189, 255, 0.6);
    background: rgba(51, 189, 255, 0.1);
}

.site-header__contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--vd-sky);
    color: var(--vd-navy);
    font-size: 1.1rem;
}

.site-header__contact-text small {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 767.98px) {
    .site-header__contact-link {
        padding: 4px;
    }

    .site-header__contact-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* --- 6. Reveal effect ------------------------------------------------------
   <div data-reveal> fades/slides in once when scrolled into view (theme.js). data-reveal="fade" skips the slide,
   data-reveal-delay="100" staggers (ms). Only active while html.js-reveal is set, so content shows without JS. */
html.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

html.js-reveal [data-reveal="fade"] {
    transform: none;
}

html.js-reveal [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* Slick clones are never observed: keep slider content visible. */
html.js-reveal .slick-slide[data-reveal],
html.js-reveal .slick-slide [data-reveal] {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html.js-reveal [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- 7. Back to top ------------------------------------------------------- */
.back-to-top {
    right: 20px;
    bottom: 20px;
    width: 46px;
    height: 46px;
    line-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(51, 189, 255, 0.45);
    background-color: var(--vd-navy);
    color: #ffffff;
    font-size: 22px;
    box-shadow: 0 10px 24px rgba(9, 33, 43, 0.28);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    transform: translateY(-3px);
    background-color: var(--vd-sky);
    color: var(--vd-navy);
    outline: none;
}

.back-to-top .back-top {
    display: block;
}

/* --- 8. Page tweaks (Track 1 pages) --------------------------------------- */
/* About: the team follows the same light background as "Why choose", so it does not need a full top space. */
.modern-choose-section + .modern-team-section {
    padding-top: var(--vd-section-space-sm);
}

/* About: section titles use the brand serif ('Outfit' is not loaded). */
.modern-choose-section .choose-title,
.modern-team-section .team-title {
    font-family: "DM Serif Display", serif;
    font-weight: 400;
}

/* Contact: map strip under the contact card. */
.gmap--contact {
    background: #eaf1f6;
}

.gmap--contact iframe {
    display: block;
    width: 100%;
    height: clamp(320px, 38vw, 450px);
    border: 0;
    filter: saturate(0.9);
}

/* Contact panel (<x-contact-panel>) on phones: icon left, text left, compact rows. */
@media (max-width: 767.98px) {
    .contact-info-panel {
        padding: 32px 20px;
        text-align: left;
        align-items: stretch;
    }

    .contact-info-panel .contact-heading,
    .contact-info-panel .contact-subtext {
        text-align: center;
    }

    .contact-info-panel .contact-details-list {
        gap: 18px;
        align-items: stretch;
    }

    .contact-info-panel .contact-detail-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
        margin: 0;
        text-align: left;
    }

    .contact-info-panel .contact-icon-circle {
        margin: 0;
    }

    .contact-info-panel .contact-item-content {
        padding-top: 2px;
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

/* FAQ page: the two-column vf-accordion as soft cards */
.faq-page .vf-accordion__item {
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 14px !important;
    border: 1px solid rgba(9, 33, 43, 0.08);
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(9, 33, 43, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-page .vf-accordion__item:last-child {
    margin-bottom: 0;
}

.faq-page .vf-accordion__item:has(.accordion-collapse.show) {
    border-color: rgba(51, 189, 255, 0.45);
    box-shadow: var(--vd-shadow);
}

.faq-page .vf-accordion__btn {
    gap: 16px;
    padding: 18px 20px;
    border: 0;
    border-radius: 14px !important;
    background: #ffffff;
    font-size: 1.1rem;
    line-height: 1.35;
}

.faq-page .vf-accordion__btn::after {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-left: auto;
    border-radius: 50%;
    background: rgba(51, 189, 255, 0.12);
    color: var(--vd-sky-deep);
    font-size: 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.faq-page .vf-accordion__btn:not(.collapsed)::after {
    background: var(--vd-sky);
    color: #ffffff;
}

.faq-page .vf-accordion__btn:focus-visible {
    outline: 2px solid var(--vd-sky);
    outline-offset: -2px;
}

.faq-page .vf-accordion__body {
    padding: 0 20px 20px;
    line-height: 1.7;
    color: var(--vd-text);
}

@media (max-width: 575.98px) {
    .faq-page .vf-accordion__btn {
        padding: 16px;
        font-size: 1rem;
    }

    .faq-page .vf-accordion__body {
        padding: 0 16px 16px;
    }
}

/* DGCA medical */
.dgca-medical__intro .t-short-para,
.dgca-medical__classes .t-short-para {
    max-width: 60ch;
}

.dgca-medical__media img {
    border-radius: var(--vd-radius);
}

.dgca-medical__classes h2 + .t-short-para {
    margin-bottom: 0.5rem;
}

.dgca-medical__classes ul {
    margin: 0.5rem 0 1.75rem;
    padding-left: 1.2rem;
}

.dgca-medical__classes ul li {
    margin-bottom: 4px;
}

.dgca-medical__classes h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

/* Aircraft sale (coming soon) */
.coming-soon {
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px);
    text-align: center;
    border-radius: 20px;
    border: var(--vd-border);
    background: #ffffff;
    box-shadow: var(--vd-shadow);
}

.coming-soon__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: rgba(51, 189, 255, 0.12);
    color: var(--vd-sky-deep);
    font-size: 30px;
}

.coming-soon h2 {
    margin: 0 0 24px;
}
