:root {
    --color-bg-light: #ffffff;
    --color-bg-dark: #000000;
    --color-text-dark: #000000;
    --color-text-light: #ffffff;
    --color-accent: #3d2500;
    --color-secondary: #d8d8d9;
    --color-border-soft: rgba(61, 37, 0, 0.16);
    --color-surface: rgba(61, 37, 0, 0.04);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-elevated: 0 18px 45px rgba(0, 0, 0, 0.16);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f9fafb;
    color: #374151;
    font-family: 'Niramit', sans-serif;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(61, 37, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--font-heading, 'Lovelo', 'Montserrat', sans-serif);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 1rem;
    color: var(--color-text-dark);
    text-decoration: none;
}

.site-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: grayscale(100%);
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    padding: 0.34rem 0.46rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.58));
    backdrop-filter: blur(22px) saturate(210%);
    -webkit-backdrop-filter: blur(22px) saturate(210%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 12px 28px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    --bubble-x: 0px;
    --bubble-y: 0px;
    --bubble-w: 0px;
    --bubble-h: 0px;
    --bubble-o: 0;
}

/* Gloss layer for the nav glass panel */
.site-nav__links::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(155deg,
        rgba(255, 255, 255, 0.76) 0%,
        rgba(255, 255, 255, 0.34) 36%,
        rgba(255, 255, 255, 0.06) 74%);
    z-index: 0;
}

/* Animated active bubble that moves between nav items */
.site-nav__links::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: var(--bubble-w);
    height: var(--bubble-h);
    transform: translate(var(--bubble-x), var(--bubble-y));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.98);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.84));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.55),
        0 10px 20px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px) saturate(170%);
    -webkit-backdrop-filter: blur(10px) saturate(170%);
    filter: saturate(132%) brightness(1.03);
    opacity: var(--bubble-o);
    z-index: 0;
    transition:
        transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.22s ease;
}

/* iPhone/iPad WebKit fallback for crash-prone blur/compositing stack */
.is-ios-safari .site-nav,
.is-ios-webkit .site-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff;
}

.is-ios-safari .site-nav__links,
.is-ios-webkit .site-nav__links {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff;
    isolation: auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 10px 20px rgba(15, 23, 42, 0.12);
}

.is-ios-safari .site-nav__links::before,
.is-ios-webkit .site-nav__links::before {
    background: none;
}

.is-ios-safari .site-nav__links::after,
.is-ios-webkit .site-nav__links::after {
    display: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
}

.is-ios-safari .mobile-bottom-nav,
.is-ios-webkit .mobile-bottom-nav {
    backdrop-filter: blur(38px) saturate(230%);
    -webkit-backdrop-filter: blur(38px) saturate(230%);
    background: rgba(255, 255, 255, 0.18);
}

.is-ios-safari .mobile-bottom-nav::after,
.is-ios-webkit .mobile-bottom-nav::after {
    display: block;
}

.is-ios-safari .site-main,
.is-ios-webkit .site-main {
    transition: none;
    will-change: auto;
}

.is-ios-safari .site-main.is-page-switching,
.is-ios-webkit .site-main.is-page-switching {
    opacity: 1;
    transform: none;
    filter: none;
}

@supports (view-transition-name: none) {
    .is-ios-safari .site-main,
    .is-ios-webkit .site-main {
        view-transition-name: none;
    }
}

/* Early iPhone/iPad Safari fallback before JS class hydration */
@supports (-webkit-touch-callout: none) {
    @media (hover: none) and (pointer: coarse) {
        .site-nav {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            background: #ffffff;
        }

        .site-nav__links {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            background: #ffffff;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.96),
                0 10px 20px rgba(15, 23, 42, 0.12);
        }

        .site-nav__links::after {
            display: none;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            filter: none;
        }
    }
}

.site-nav__links a {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.56rem 0.95rem;
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
}

.site-nav__links a:hover,
.site-nav__links a.active {
    color: #1f2937;
}

.site-nav__links a.active {
    font-weight: 700;
}

.nav-cta {
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: var(--color-text-light) !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--color-bg-dark);
    border-color: var(--color-bg-dark);
    color: var(--color-text-light) !important;
}

.site-top-login {
    margin-left: 0.6rem;
    white-space: nowrap;
    text-decoration: none;
}

.site-nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(61, 37, 0, 0.2);
    background: transparent;
    color: var(--color-text-dark);
}

.site-nav__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-text-dark);
    position: relative;
}

.site-nav__toggle span::before,
.site-nav__toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--color-text-dark);
}

.site-nav__toggle span::before {
    top: -6px;
}

.site-nav__toggle span::after {
    top: 6px;
}

.mobile-bottom-nav {
    display: none;
}

.mobile-bottom-nav--hidden {
    display: none !important;
}

/* Profile avatar dropdown in header (frontend-only menu) */
.site-profile {
    position: relative;
    margin-left: 0.6rem;
}

.site-profile__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    width: auto;
    min-width: 44px;
    height: 44px;
    padding: 0.24rem 0.48rem 0.24rem 0.24rem;
    border: 1px solid rgba(61, 37, 0, 0.18);
    background: rgba(61, 37, 0, 0.04);
    color: var(--color-text-dark);
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.site-profile__trigger:hover {
    background: rgba(61, 37, 0, 0.09);
    border-color: rgba(61, 37, 0, 0.28);
}

.site-profile__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(61, 37, 0, 0.24);
    background: #f5f5f5;
}

/* Avatar-only trigger: dropdown exposes dashboard/admin/logout */
.site-profile__label {
    display: none;
}

.site-profile__caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    line-height: 1;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.site-profile__dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid rgba(61, 37, 0, 0.16);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
    padding: 0.45rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1080;
}

.site-profile__dropdown a {
    display: flex;
    align-items: center;
    border-radius: 10px;
    padding: 0.58rem 0.72rem;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.83rem;
    color: var(--color-text-dark);
    text-decoration: none;
}

.site-profile__dropdown a:hover {
    background: rgba(61, 37, 0, 0.08);
    color: var(--color-accent);
    text-decoration: none;
}

.site-profile__dropdown .site-profile__logout {
    margin-top: 0.28rem;
    border-top: 1px solid rgba(220, 38, 38, 0.22);
    padding-top: 0.65rem;
    color: #b91c1c;
    font-weight: 700;
}

.site-profile__dropdown .site-profile__logout:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
}

.site-profile.is-open .site-profile__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-profile.is-open .site-profile__caret {
    transform: rotate(180deg);
}

.btn-primary-bw {
    background-color: var(--color-accent);
    color: var(--color-text-light);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary-bw:hover {
    background-color: var(--color-bg-dark);
    border-color: var(--color-bg-dark);
    color: var(--color-text-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-outline-dark {
    --bs-btn-color: #000000;
    --bs-btn-border-color: #000000;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--color-accent);
    --bs-btn-hover-border-color: var(--color-accent);
    border-width: 2px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-outline-dark:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.site-main {
    flex: 1 0 auto;
    /* Reserve fixed navbar space for all pages (desktop + mobile) */
    padding-top: calc(var(--site-nav-height, 72px) + env(safe-area-inset-top, 0px));
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), filter 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: auto;
}

/* Smooth visual transition when switching sections */
.site-main.is-page-switching {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(1px) saturate(0.95);
    will-change: opacity, transform;
}

.page-view {
    display: none;
    animation: fadeUp 0.6s ease both;
}

.page-view.is-active {
    display: block;
}

/* Keep Services subnav truly fixed under top navbar.
   The page-level transform animation creates a containing block that makes
   fixed children scroll away; disable it for services view. */
.page-view[data-page="services"] {
    animation: none;
    transform: none !important;
}

/* Native section transition in supported browsers (fallback keeps existing class-based behavior) */
@supports (view-transition-name: none) {
    .site-main {
        view-transition-name: site-main;
    }

    ::view-transition-old(site-main),
    ::view-transition-new(site-main) {
        animation-duration: 0.34s;
        animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    }

    ::view-transition-old(site-main) {
        animation-name: pageSwitchOld;
    }

    ::view-transition-new(site-main) {
        animation-name: pageSwitchNew;
    }
}

.page-header {
    max-width: 960px;
    margin: 0 auto 3rem;
    text-align: center;
}

.page-header .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(61, 37, 0, 0.2);
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: rgba(61, 37, 0, 0.04);
}

.page-header h1,
.page-header h2 {
    font-family: var(--font-heading, 'Lovelo', 'Montserrat', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1rem;
}

.page-header p {
    color: #555555;
    font-size: 1.05rem;
    margin-top: 0.8rem;
}

.summary-grid,
.services-grid,
.values-grid,
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.summary-card,
.service-detail-card,
.value-card,
.support-card-shell {
    background: var(--color-bg-light);
    border: 1px solid rgba(61, 37, 0, 0.12);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover,
.service-detail-card:hover,
.value-card:hover,
.support-card-shell:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.summary-card h4,
.service-detail-card h4,
.value-card h4,
.support-card-shell h4 {
    font-family: var(--font-heading, 'Lovelo', 'Montserrat', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.summary-card p,
.service-detail-card p,
.value-card p,
.support-card-shell p {
    color: #555555;
    margin-bottom: 0;
}

.summary-card--service {
    position: relative;
    overflow: hidden;
}

.summary-card--service::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.summary-card--service:hover::after,
.summary-card--service:focus-within::after {
    transform: scaleX(1);
}

.summary-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(61, 37, 0, 0.16);
    background: rgba(61, 37, 0, 0.06);
    color: var(--color-accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.1rem;
    font-size: 1.25rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.summary-card--service:hover .summary-card__icon,
.summary-card--service:focus-within .summary-card__icon {
    transform: translateY(-2px) scale(1.03);
    background: rgba(61, 37, 0, 0.1);
    border-color: rgba(61, 37, 0, 0.28);
}

.page-view[data-page="home"].is-active .summary-grid .summary-card--service {
    animation: fadeUp 0.65s ease both;
}

.page-view[data-page="home"].is-active .summary-grid .summary-card--service:nth-child(1) {
    animation-delay: 0.05s;
}

.page-view[data-page="home"].is-active .summary-grid .summary-card--service:nth-child(2) {
    animation-delay: 0.12s;
}

.page-view[data-page="home"].is-active .summary-grid .summary-card--service:nth-child(3) {
    animation-delay: 0.19s;
}

.service-detail-card ul {
    margin: 1.1rem 0 0;
    padding-left: 0;
    list-style: none;
    color: #555555;
}

.service-detail-card li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.55rem;
}

.service-detail-card li:last-child {
    margin-bottom: 0;
}

.service-detail-card li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--color-accent);
    opacity: 0.9;
    font-size: 0.85rem;
}

.service-detail-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(61, 37, 0, 0.06), rgba(61, 37, 0, 0.01));
}

.service-detail-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.service-detail-card:hover::after,
.service-detail-card:focus-within::after {
    transform: scaleX(1);
}

.service-detail-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
}

.service-detail-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(61, 37, 0, 0.16);
    background: rgba(61, 37, 0, 0.06);
    color: var(--color-accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.service-detail-card:hover .service-detail-icon,
.service-detail-card:focus-within .service-detail-icon {
    transform: translateY(-2px) scale(1.03);
    background: rgba(61, 37, 0, 0.1);
    border-color: rgba(61, 37, 0, 0.28);
}

.service-detail-card__head h4 {
    margin-bottom: 0.15rem;
}

.service-detail-card__head p {
    margin-bottom: 0;
}

.services-subnav-sentinel {
    width: 100%;
    height: 24px;
}

.services-subnav-wrap {
    position: fixed !important;
    top: calc(var(--site-nav-height, 72px) + env(safe-area-inset-top, 0px) + 4px);
    left: 0;
    right: 0;
    z-index: 1048;
    margin: 0;
    pointer-events: none;
    transform: none !important;
}

.services-subnav-wrap .container {
    display: flex;
    justify-content: center;
}

.services-subnav {
    --services-bubble-x: 0px;
    --services-bubble-y: 0px;
    --services-bubble-w: 0px;
    --services-bubble-h: 0px;
    --services-bubble-o: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.42rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(36px) saturate(210%);
    -webkit-backdrop-filter: blur(36px) saturate(210%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 12px 24px rgba(15, 23, 42, 0.12);
    width: min(100%, 340px);
    overflow-x: auto;
    scrollbar-width: none;
    pointer-events: auto;
    position: relative;
    isolation: isolate;
}

.services-subnav::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: none;
    z-index: 0;
}

.services-subnav::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: var(--services-bubble-w);
    height: var(--services-bubble-h);
    transform: translate(var(--services-bubble-x), var(--services-bubble-y));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.98);
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.6),
        0 10px 18px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px) saturate(170%);
    -webkit-backdrop-filter: blur(10px) saturate(170%);
    opacity: var(--services-bubble-o);
    z-index: 0;
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.18s ease;
}

.services-subnav::-webkit-scrollbar {
    display: none;
}

.services-subnav__item {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.66rem;
    padding: 0.5rem 0.84rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.services-subnav__item:hover,
.services-subnav__item:focus-visible {
    color: var(--color-accent);
    transform: translateY(-1px);
}

.services-subnav__item.active {
    color: var(--color-accent);
}

.page-view[data-page="services"] .section-title,
.page-view[data-page="services"] .section-lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.page-view[data-page="services"] .section-title {
    margin-bottom: 0.85rem;
}

.page-view[data-page="services"] .section-lead {
    max-width: 760px;
    margin-bottom: 1.75rem;
}

/* Services hero spacing:
   - push Solutions block downward from fixed subnav
   - tighten the gap before Corporate & B2B section */
.page-view[data-page="services"] .services-subnav-wrap+section {
    padding-top: 4.2rem !important;
    padding-bottom: 1.1rem !important;
}

.page-view[data-page="services"] .services-subnav-wrap+section .page-header {
    margin-bottom: 1.1rem;
}

.page-view[data-page="services"] #b2b,
.page-view[data-page="services"] #students,
.page-view[data-page="services"] #events {
    scroll-margin-top: calc(var(--site-nav-height, 72px) + 112px);
}

.page-view[data-page="services"] .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.page-view[data-page="services"].is-active .services-grid .service-detail-card {
    animation: fadeUp 0.65s ease both;
}

.page-view[data-page="services"].is-active .services-grid .service-detail-card:nth-child(1) {
    animation-delay: 0.05s;
}

.page-view[data-page="services"].is-active .services-grid .service-detail-card:nth-child(2) {
    animation-delay: 0.1s;
}

.page-view[data-page="services"].is-active .services-grid .service-detail-card:nth-child(3) {
    animation-delay: 0.15s;
}

.page-view[data-page="services"].is-active .services-grid .service-detail-card:nth-child(4) {
    animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
    .site-main {
        transition: none !important;
    }

    .site-main.is-page-switching {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    ::view-transition-old(site-main),
    ::view-transition-new(site-main) {
        animation: none !important;
    }

    .page-view[data-page="home"].is-active .summary-grid .summary-card--service {
        animation: none;
    }

    .summary-card--service:hover,
    .summary-card--service:focus-within,
    .summary-card--service:hover .summary-card__icon,
    .summary-card--service:focus-within .summary-card__icon {
        transform: none;
    }

    .page-view[data-page="services"].is-active .services-grid .service-detail-card {
        animation: none;
    }

    .service-detail-card:hover,
    .service-detail-card:focus-within,
    .service-detail-card:hover .service-detail-icon,
    .service-detail-card:focus-within .service-detail-icon {
        transform: none;
    }
}

@media (max-width: 991px) {
    .services-subnav-sentinel {
        height: 68px;
    }

    .services-subnav-wrap {
        top: calc(var(--site-nav-height, 72px) + env(safe-area-inset-top, 0px) + 4px);
        margin-bottom: 0;
    }

    .services-subnav {
        width: min(90vw, 300px);
        justify-content: center;
        gap: 0.32rem;
        padding: 0.24rem;
    }

    .services-subnav__item {
        font-size: 0.62rem;
        padding: 0.46rem 0.74rem;
    }

    .page-view[data-page="services"] .services-subnav-wrap+section {
        padding-top: 3.4rem !important;
        padding-bottom: 0.85rem !important;
    }

    .page-view[data-page="services"] .services-subnav-wrap+section .page-header {
        margin-bottom: 0.9rem;
    }

    .page-view[data-page="services"] #b2b,
    .page-view[data-page="services"] #students,
    .page-view[data-page="services"] #events {
        scroll-margin-top: calc(var(--site-nav-height, 72px) + 102px);
    }
}

.site-footer {
    background: var(--color-bg-light);
    border-top: 1px solid rgba(61, 37, 0, 0.12);
    padding: 2.75rem 0 1.75rem;
    min-height: unset;
    height: auto;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: flex-start;
    height: auto;
}

.footer-section {
    background: var(--color-bg-light);
}

.site-footer__divider {
    border: 0;
    border-top: 1px solid rgba(61, 37, 0, 0.12);
    margin: 0;
    opacity: 1;
}

.social-icon {
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border-radius: 50%;
    background: rgba(61, 37, 0, 0.08);
    color: var(--color-accent);
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

.social-icon:hover {
    background: rgba(61, 37, 0, 0.16);
}

.back-to-top {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--color-accent);
    color: var(--color-bg-light);
    border: 1px solid var(--color-accent);
    font-size: 1.2rem;
    margin-left: 1rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    margin-top: 0;
}

.back-to-top:hover {
    background-color: #333333;
    color: #ffffff;
}

.form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: var(--color-accent) !important;
}

/* Contact page glass treatment */
.page-view[data-page="contact"] .summary-card.h-100 {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.24));
    border: 1px solid rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    box-shadow:
        0 20px 34px rgba(15, 23, 42, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.page-view[data-page="contact"] .summary-card.h-100::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.52) 0%,
            rgba(255, 255, 255, 0.2) 44%,
            rgba(255, 255, 255, 0.04) 100%);
    z-index: 0;
}

.page-view[data-page="contact"] .summary-card.h-100>* {
    position: relative;
    z-index: 1;
}

.page-view[data-page="contact"] .summary-card.h-100 h4,
.page-view[data-page="contact"] .summary-card.h-100 h6 {
    color: #111827;
}

.page-view[data-page="contact"] .summary-card.h-100 p,
.page-view[data-page="contact"] .summary-card.h-100 a {
    color: #374151 !important;
}

.page-view[data-page="contact"] #contactForm .form-label {
    font-weight: 600;
    color: #1f2937;
}

.page-view[data-page="contact"] #contactForm .form-control {
    border-radius: 12px;
    border: 1px solid rgba(61, 37, 0, 0.28);
    background: rgba(255, 255, 255, 0.44);
    color: #111827;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.page-view[data-page="contact"] #contactForm .form-control::placeholder {
    color: #6b7280;
}

.page-view[data-page="contact"] #contactForm .form-control:focus {
    border-color: rgba(61, 37, 0, 0.45) !important;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 0 0 3px rgba(61, 37, 0, 0.1) !important;
}

.page-view[data-page="contact"] .alert.alert-light {
    background: rgba(255, 255, 255, 0.48);
    border-color: rgba(255, 255, 255, 0.68);
    color: #374151;
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.modal-content {
    background: var(--color-bg-light) !important;
    color: var(--color-text-dark) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(61, 37, 0, 0.12);
    box-shadow: var(--shadow-elevated);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageSwitchOld {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes pageSwitchNew {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991px) {
    /* Mobile header keeps brand/profile; links move to fixed bottom glass bar. */
    .site-nav__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand profile";
        align-items: center;
        column-gap: 0.75rem;
        row-gap: 0;
        padding: 0.75rem 1rem;
    }

    .site-brand {
        grid-area: brand;
        min-width: 0;
        font-size: 0.92rem;
        letter-spacing: 0.14em;
    }

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

    .site-nav__toggle {
        display: none !important;
    }

    .site-profile {
        grid-area: profile;
        justify-self: end;
        margin-left: 0;
        width: auto;
    }

    .site-profile__trigger {
        width: auto;
        min-width: 42px;
        height: 42px;
        gap: 0.32rem;
        padding: 0.2rem 0.4rem 0.2rem 0.2rem;
    }

    .site-profile__avatar {
        width: 32px;
        height: 32px;
    }

    .site-profile__dropdown a {
        justify-content: flex-start;
    }

    .site-profile__label {
        display: none;
    }

    .site-profile__caret {
        display: inline-flex;
        font-size: 0.62rem;
    }

    .site-profile__dropdown {
        right: 0;
        left: auto;
        top: calc(100% + 0.55rem);
        min-width: 190px;
    }

    .site-top-login {
        grid-area: profile;
        justify-self: end;
        margin-left: 0;
        padding: 0.52rem 1rem;
        font-size: 0.7rem;
        letter-spacing: 0.11em;
    }

    .site-nav__links {
        display: none !important;
    }

    .mobile-bottom-nav {
        --mobile-bubble-x: 0px;
        --mobile-bubble-y: 0px;
        --mobile-bubble-w: 0px;
        --mobile-bubble-h: 0px;
        --mobile-bubble-o: 0;
        display: flex;
        position: fixed;
        left: 50%;
        bottom: calc(15px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        width: min(calc(100% - 24px), 520px);
        height: 68px;
        padding: 0.38rem;
        align-items: stretch;
        justify-content: space-between;
        gap: 0.18rem;
        border-radius: 22px;
        border: 1px solid rgba(255, 255, 255, 0.56);
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(38px) saturate(230%);
        -webkit-backdrop-filter: blur(38px) saturate(230%);
        box-shadow:
            0 20px 38px rgba(15, 23, 42, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.52),
            inset 0 -1px 0 rgba(255, 255, 255, 0.26);
        z-index: 1060;
        isolation: isolate;
        overflow: hidden;
        touch-action: none;
    }

    .mobile-bottom-nav::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        border-radius: inherit;
        background: none;
    }

    .mobile-bottom-nav::after {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: var(--mobile-bubble-w);
        height: var(--mobile-bubble-h);
        transform: translate(var(--mobile-bubble-x), var(--mobile-bubble-y));
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.99);
        background: rgba(255, 255, 255, 0.9);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 1),
            inset 0 -1px 0 rgba(255, 255, 255, 0.62),
            0 14px 28px rgba(15, 23, 42, 0.22),
            0 0 0 1px rgba(255, 255, 255, 0.48);
        backdrop-filter: blur(14px) saturate(185%);
        -webkit-backdrop-filter: blur(14px) saturate(185%);
        filter: saturate(140%) brightness(1.08);
        opacity: var(--mobile-bubble-o);
        z-index: 0;
        transition:
            transform 0.62s cubic-bezier(0.2, 0.9, 0.25, 1),
            width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
            height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.22s ease;
        will-change: transform, width, height, opacity;
    }

    .mobile-bottom-nav.is-dragging::after {
        transition:
            transform 0.06s linear,
            width 0.16s ease,
            height 0.16s ease,
            opacity 0.12s linear;
    }

    .mobile-nav-item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.18rem;
        text-decoration: none;
        color: #111827;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        opacity: 0.72;
        position: relative;
        z-index: 1;
        border-radius: 16px;
        transition: color 0.25s ease, opacity 0.25s ease, transform 0.2s ease;
        user-select: none;
        -webkit-user-select: none;
    }

    .mobile-nav-item i {
        font-size: 1.16rem;
        color: #111827;
        transition: color 0.25s ease;
    }

    .mobile-nav-item span {
        line-height: 1;
        font-size: 0.6rem;
    }

    .mobile-nav-item.active,
    .mobile-nav-item:active {
        opacity: 1;
        color: #111827;
    }

    .mobile-nav-item.active i,
    .mobile-nav-item:active i {
        color: #111827;
    }

    .mobile-nav-item:active {
        transform: scale(0.95);
    }

    .mobile-nav-item--whatsapp i {
        color: #25d366;
    }

    .mobile-nav-item--whatsapp span {
        letter-spacing: 0.05em;
    }

    .site-main {
        padding-bottom: calc(98px + env(safe-area-inset-bottom, 0px));
    }

    .whatsapp-button {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .site-profile:hover .site-profile__dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-profile:hover .site-profile__caret {
        transform: rotate(180deg);
    }
}
