/* Navigation Bar */
:root {
    --nav-height: 80px;
    --nav-font-size: 0.95rem;
    --container-max-width: 1480px;
    
    /* Colors */
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.2);
    --accent-soft: rgba(16, 185, 129, 0.1);
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --radius-md: 12px;
}

.navbar {
    height: var(--nav-height);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    /* Padding lives here (not on .navbar-container) so it mirrors how
       .section-divider + .container-max work: outer element pads,
       inner element max-width-centers. This keeps logo/links flush with
       body content at every viewport width. */
    padding: 0 20px;
}

.navbar-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 1001;
    justify-self: start;
    grid-column: 1;
}

.logo img {
    height: 34px;
    width: auto;
}

.logo span {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
}

/* Center section anchor links */
.nav-center {
    display: flex;
    gap: 4px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    grid-column: 2;
    justify-self: center;
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-self: end;
    grid-column: 3;
}

.nav-link {
    padding: 8px 18px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--nav-font-size);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scroll-link {
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-btn {
    padding: 0 26px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    font-weight: 600;
    font-size: var(--nav-font-size);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    margin-left: 8px;
}

.nav-btn-primary { background: var(--primary); color: white !important; box-shadow: 0 4px 12px var(--primary-glow); }
.nav-btn-danger { background: #fee2e2; color: #dc2626 !important; }

/* Mobile & Tablet Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* --- TABLET & MOBILE BREAKPOINT (1200px) --- */
@media (max-width: 1200px) {
    .navbar-container {
        display: flex;
        justify-content: flex-start;
    }

    /* Section links not needed on mobile — users scroll */
    .nav-center {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height); /* starts right at navbar's bottom edge */
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 0 28px 0;
        gap: 10px;
        z-index: 999; /* behind navbar (z-index: 1000) */

        /* Same frosted-glass surface as the floating pill */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        border-radius: 28px; /* all corners rounded */
        border: 1px solid rgba(255, 255, 255, 0.45);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.10),
            0 1px 4px  rgba(0, 0, 0, 0.05),
            inset 0 -1px 0 rgba(255, 255, 255, 0.70);

        /* Slides up behind navbar when hidden */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        justify-content: center;
        font-size: 1rem; /* Slightly larger for touch */
    }

    .nav-btn {
        margin-left: 0;
        margin-top: 10px;
        height: 48px; /* Larger tap target */
    }
}

/* ===== Floating scroll pill — all breakpoints ===== */

/* Smooth transitions for scroll-driven transformation */
.navbar {
    transition:
        background              0.35s ease,
        border-color            0.35s ease,
        backdrop-filter         0.35s ease,
        -webkit-backdrop-filter 0.35s ease,
        padding                 0.35s ease;
}

.navbar-container {
    transition:
        background    0.35s ease,
        border-radius 0.35s ease,
        box-shadow    0.35s ease,
        border        0.35s ease,
        padding       0.35s ease,
        height        0.35s ease;
}

/* Floating pill: JS adds .navbar--scrolled once user scrolls past threshold */
.navbar.navbar--scrolled {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 16px; /* default mobile inset */
}

.navbar.navbar--scrolled .navbar-container {
    height: 54px;
    padding: 0 20px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.09),
        0 1px 4px  rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

/* Keep hamburger button visible inside the pill on mobile */
.navbar.navbar--scrolled .mobile-menu-btn {
    color: var(--text-main);
}

/* ===== LAPTOP & TABLET: Width alignment (≥768px) ===== */
@media (min-width: 768px) {
    /* Match .section-divider's 42px horizontal padding so logo/links sit
       flush with body content at all viewport widths. */
    .navbar {
        padding: 0 42px;
    }

    .navbar.navbar--scrolled {
        padding: 0 clamp(20px, 3vw, 48px); /* wider padding = pill appears narrower/floating */
    }

    .navbar.navbar--scrolled .navbar-container {
        padding: 0 28px;
    }
}

/* Footer */
.footer {
    background: #022C22;
    color: #E2E8F0;
    padding: 80px 0 40px 0;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 34px;
    width: auto;
    display: block;
}

.footer-brand p {
    margin-top: 20px;
    color: #94A3B8;
    max-width: 320px;
    line-height: 1.6;
}

.footer-heading {
    color: var(--accent);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 14px; }
.footer-links a {
    color: #CBD5E1;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}
.footer-links a:hover { color: var(--accent); padding-left: 4px; }

/* Social Section */
.social-box {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}
.social-item:last-child { margin-bottom: 0; }
.social-item i {
    width: 32px;
    height: 32px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
}
.social-item:hover { color: var(--accent); }

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 8px;
}

.tagline {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

/* --- MOBILE BREAKPOINT (922px) --- */
@media (max-width: 992px) {
    .footer-grid { 
        grid-template-columns: 1fr 1fr; 
    }
}