/* =========================================================
   HEADER & FOOTER PREMIUM STYLES
   Site header, navbar, footer, floating buttons
   Uses --color-brand-* from color_loader
   ========================================================= */

/* Scroll fix: Body is sole scroll container - single scrollbar */
html {
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-behavior: smooth;
}
body {
    overflow-x: hidden;
}
main,
.home-v3-alive {
    overflow: visible;
}

/* Uses --color-brand-* from color_loader (output in header) */

/* =========================================================
   LAYOUT - CONTAINER (site-wide)
   ========================================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* =========================================================
   SITE HEADER & NAVBAR — Premium Fixed Header
   ========================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(20, 30, 45, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header nav.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1rem;
}

/* Logo — Premium glass-style container */
.logo.logo-premium {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 0 12px rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.4s ease;
}

.logo-container:hover {
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35),
        0 0 12px rgba(0, 210, 190, 0.4),
        inset 0 0 12px rgba(255, 255, 255, 0.05);
}

.logo-image,
.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text-fallback {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.logo-mark {
    color: var(--color-brand-teal);
    font-weight: 800;
}

/* Nav Links — 24px gap, hover underline */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-brand-teal);
    transition: width 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--color-brand-teal);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-links .nav-link.nav-login {
    color: rgba(255, 255, 255, 0.7);
}

/* CTA Button — 30px radius, soft glow, scale hover */
.btn-primary.btn-premium-cta {
    position: relative;
    overflow: hidden;
    background: var(--color-brand-teal);
    color: var(--color-brand-navy);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(13, 148, 136, 0.35);
}

.btn-primary.btn-premium-cta:hover {
    background: var(--color-brand-aqua);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.45);
}

.btn-shine {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   SITE FOOTER
   ========================================================= */
.site-footer {
    background: var(--color-brand-navy);
    color: var(--color-brand-light);
    padding: 4rem 0 2rem;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand .footer-logo {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo-image {
    max-height: 36px;
    height: 36px;
    width: auto;
    object-fit: contain;
    display: block;
}

.footer-logo .logo-text-fallback {
    font-size: 1.1rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.9);
    font-weight: 600;
    margin: 0;
}

.footer-description {
    font-size: 0.875rem;
    color: rgba(248, 250, 252, 0.7);
    line-height: 1.6;
    margin: 0;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(248, 250, 252, 0.95);
    margin: 0 0 0.5rem 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(248, 250, 252, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-brand-teal);
}

.footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-icon {
    flex-shrink: 0;
    color: var(--color-brand-teal);
}

.contact-item a {
    color: rgba(248, 250, 252, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: var(--color-brand-teal);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(248, 250, 252, 0.9);
    transition: background 0.2s, color 0.2s;
}

.social-link:hover {
    background: var(--color-brand-teal);
    color: var(--color-brand-navy);
}

.footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-brand-teal);
    color: var(--color-brand-navy);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: fit-content;
}

.footer-cta-btn:hover {
    background: var(--color-brand-aqua);
    transform: translateY(-2px);
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-legal-link {
    color: rgba(248, 250, 252, 0.65);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-legal-link:hover {
    color: var(--color-brand-teal);
}

.footer-separator {
    color: rgba(248, 250, 252, 0.4);
    font-size: 0.85rem;
}

.footer-gradient-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-brand-teal), transparent);
    opacity: 0.5;
}

/* =========================================================
   PRELOADER
   ========================================================= */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--color-brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

.loader-line {
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--color-brand-teal);
    animation: loader-move 1.5s ease-in-out infinite;
}

@keyframes loader-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* =========================================================
   SCROLL PROGRESS BAR
   ========================================================= */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 10001;
}

#scroll-progress-bar {
    height: 100%;
    width: 0;
    background: var(--color-brand-teal);
    transition: width 0.1s ease-out;
}

/* =========================================================
   FLOATING BUTTONS
   ========================================================= */
.whatsapp-button {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.back-to-top {
    position: fixed;
    bottom: 92px;
    right: 88px;
    width: 48px;
    height: 48px;
    background: var(--color-brand-navy);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-brand-teal);
    transform: translateY(-2px);
}

/* =========================================================
   ANIMATE ON SCROLL
   ========================================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s ease;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 0.75rem 1rem;
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-header .container,
    .site-footer .container {
        padding: 0 1rem;
    }

    .site-header nav.container {
        min-height: 64px;
    }

    .logo-container {
        padding: 6px 16px;
    }

    .logo-image,
    .logo-img {
        height: 36px;
    }

    .whatsapp-button {
        bottom: 84px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .back-to-top {
        bottom: 84px;
        right: 72px;
        width: 44px;
        height: 44px;
    }
}
