:root {
    /* Neo-Health Palette */
    --bg-white: #FFFFFF;
    --bg-light: #F0FDFA;
    --bg-slate: #F8FAFC;
    /* Soft Mint tint for backgrounds */

    /* Text Colors */
    --text-primary: #0F172A;
    /* Deep Slate Navy */
    --text-secondary: #475569;
    /* Slate Grey */
    --border-light: #E2E8F0;

    /* Brand Colors */
    --primary-color: #00D2BE;
    /* Vibrant Mint/Teal */
    --primary-hover: #0F766E;
    /* Darker Teal for hover */
    --accent-blue: #3B82F6;
    --gradient-brand: linear-gradient(135deg, #0F766E 0%, #3B82F6 100%);
    /* Deep Teal to Blue */

    /* Spacing & Layout */
    --max-width: 1440px;
    --container-padding: 24px;
    --section-spacing: 120px;
    --border-radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* CRITICAL: Prevent horizontal scroll */
    -webkit-font-smoothing: antialiased;
    font-family: 'Google Sans', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background: var(--bg-white);
    line-height: 1.5;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Google Sans', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    /* Slightly bolder for headings */
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-spacing) 0;
    overflow: hidden;
}

.bg-slate {
    background-color: var(--bg-slate);
}

.text-center {
    text-align: center;
}

.pb-small {
    padding-bottom: 40px !important;
}

.pt-small {
    padding-top: 40px !important;
}

.hidden {
    display: none;
}

/* Section End Logo */
.section-end-logo {
    display: block;
    margin: 60px auto 0;
    width: 60px;
    height: auto;
    opacity: 0.8;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1280px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.85) 0%, rgba(59, 130, 246, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 28px;
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(15, 118, 110, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
}

.navbar:hover {
    box-shadow: 0 12px 40px rgba(15, 118, 110, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

/* Section label in compact header — hidden on desktop */
.nav-section-label {
    display: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    opacity: 0;
}

.nav-section-label.label-enter {
    animation: label-fade-in 0.4s ease forwards;
}

@keyframes label-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Language item inside mobile menu — hidden on desktop */
.nav-lang-item {
    display: none;
}

/* Navigation Logo Icon */
.nav-logo-icon {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@media (max-width: 1350px) {
    .nav-logo-icon {
        height: 36px;
    }
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #FFFFFF;
}

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

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1060;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Toggle Animation: 2px height + 5px gap = 7px offset */
.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Button Shine Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    transition: none;
}

.btn:hover::after {
    left: 200%;
    transition: left 0.4s ease-in-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2DD4BF 100%);
    color: #0F172A;
    /* Dark text on bright button for contrast */
    border: none;
    box-shadow: 0 4px 14px rgba(0, 210, 190, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 210, 190, 0.5);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 210, 190, 0.4);
}

/* Focus-visible styles for keyboard navigation */
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-links a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    border-radius: 4px;
}

.mobile-nav-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 190, 0.4);
    filter: brightness(1.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Button Loading State */
/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    overflow: hidden;
    /* Ensure bar respects border-radius */
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    /* Light progress overlay */
    animation: btn-progress 1.5s ease-out forwards;
    z-index: 1;
}

@keyframes btn-progress {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Mobile Navigation Breakpoint */
@media (max-width: 1350px) {
    .navbar {
        /* Use margin centering instead of transform to avoid
           creating a containing block that traps position:fixed children */
        width: fit-content;
        max-width: none;
        padding: 8px 20px;
        top: 12px;
        left: 0;
        right: 0;
        margin: 0 auto;
        transform: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(135deg, rgb(15, 118, 110) 0%, rgb(59, 130, 246) 100%);
    }

    .nav-container {
        gap: 12px;
    }

    .nav-section-label {
        display: block;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .mobile-nav-toggle.active {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1060;
    }

    /* Fullscreen Overlay Menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(135deg, rgba(15, 118, 110, 0.97) 0%, rgba(59, 130, 246, 0.97) 100%);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        padding-top: 80px;
        padding-bottom: 40px;
        z-index: 1050;
        visibility: hidden;
        opacity: 0;
        transform: none;
        border-radius: 0;
        transition: none;
    }

    .nav-links.active {
        visibility: visible;
        opacity: 1;
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.4s;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.08s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.12s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.16s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.20s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.24s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.28s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.32s; }
    .nav-links.active li:nth-child(8) { transition-delay: 0.36s; }
    .nav-links.active li:nth-child(9) { transition-delay: 0.40s; }

    /* Language selector inside the menu */
    .nav-lang-item {
        display: flex;
        justify-content: center;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .nav-lang-item .custom-select-wrapper {
        position: relative;
        margin: 0;
        z-index: 1060;
    }

    .nav-lang-item .custom-select-trigger {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 100px;
        padding: 8px 16px;
        min-width: 160px;
        color: rgba(255, 255, 255, 0.9);
    }

    .nav-lang-item .lang-text {
        display: inline;
    }

    .nav-lang-item .custom-options {
        background: rgba(255, 255, 255, 0.95);
        bottom: calc(100% + 8px);
        top: auto;
    }

    .nav-lang-item .custom-option {
        color: var(--text-primary);
    }

    .nav-lang-item .custom-option:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }

    .nav-links a {
        display: block;
        font-size: 1.3rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.85);
        padding: 6px 0;
        letter-spacing: -0.01em;
        transition: color 0.2s, transform 0.2s;
    }

    .nav-links a:hover {
        color: #FFFFFF;
        transform: scale(1.05);
    }

    .nav-cta {
        display: none;
    }

    .nav-links .nav-cta-mobile {
        display: inline-flex;
    }

    .nav-links .nav-cta-mobile a {
        color: var(--text-primary);
    }
}

/* --- Animations Utility --- */

/* Scroll Reveal Base */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delays (up to 10 items) */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

.stagger-6 {
    transition-delay: 0.6s;
}

.stagger-7 {
    transition-delay: 0.7s;
}