/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --primary: #0b1e33;
    --primary-light: #1a3552;
    --primary-dark: #06121f;
    --accent: #f0b429;
    --accent-light: #fcd97a;
    --accent-dark: #d49a1a;
    --gold-gradient: linear-gradient(135deg, #f0b429 0%, #f5c84a 100%);
    --white: #ffffff;
    --off-white: #f6f8fc;
    --gray-100: #f0f2f6;
    --gray-200: #e2e6ee;
    --gray-300: #c5cad4;
    --gray-400: #9aa1b0;
    --gray-500: #6f7788;
    --gray-600: #4a5266;
    --gray-700: #2d3445;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font: 'Inter', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    color: var(--gray-700);
    background: var(--white);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 0.6rem 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
    max-width: 100%;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
    transition: var(--transition);
    position: relative;
    padding: 0.2rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2.5px;
    background: var(--gold-gradient);
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-links a.active {
    color: var(--accent-dark);
    font-weight: 600;
}

.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--primary);
    background: none;
    border: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section i {
    width: 1.4rem;
    color: var(--accent);
}

.footer-section .social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.footer-section .social-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.4rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all var(--transition);
}

.footer-section .social-links a:hover {
    color: var(--white);
    background: var(--gold-gradient);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(240, 180, 41, 0.3);
}

.footer-logo img {
    max-height: 48px;
    width: auto;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ============================================================
   SCROLL-TO-TOP BUTTON
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 32px;
    z-index: 998;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--primary-dark);
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, opacity 0.4s ease, visibility 0.4s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   FLOATING WHATSAPP BUTTON
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 2.2rem;
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    animation: pulse-wa 2.4s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.65);
    color: #fff;
}

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--primary-dark);
    box-shadow: 0 8px 24px rgba(240, 180, 41, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(240, 180, 41, 0.5);
}

.btn-white {
    background: var(--white);
    color: var(--primary-dark);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.3);
}

/* ============================================================
   EXIT-INTENT POPUP
   ============================================================ */
.exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    animation: popupFadeIn 0.3s ease;
}

.exit-popup.active {
    display: block !important;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: popupSlideUp 0.4s ease;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: var(--primary);
    background: var(--gray-100);
    transform: rotate(90deg);
}

.popup-content {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
}

.popup-icon {
    width: 70px;
    height: 70px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.2rem;
    color: var(--primary-dark);
    box-shadow: 0 8px 30px rgba(240, 180, 41, 0.3);
}

.popup-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.popup-content h2 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-content > p {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.popup-benefits {
    text-align: left;
    margin: 1rem 0 1.5rem;
    padding: 0 0.5rem;
}

.popup-benefits li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-benefits li i {
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.popup-form-group {
    margin-bottom: 0.8rem;
}

.popup-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.popup-form-group input::placeholder {
    color: var(--gray-400);
}

.popup-form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.08);
}

.popup-footer {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 1rem;
}

/* Popup Animations */
@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Popup Responsive */
@media (max-width: 480px) {
    .popup-content {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .popup-content h2 {
        font-size: 1.3rem;
    }
    
    .popup-icon {
        width: 56px;
        height: 56px;
        font-size: 1.8rem;
    }
    
    .popup-benefits li {
        font-size: 0.85rem;
    }
}

/* Scrollbar styling for popup */
.popup-container::-webkit-scrollbar {
    width: 4px;
}

.popup-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.popup-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .logo img {
        height: 50px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section p {
        justify-content: center;
    }

    .footer-section .social-links {
        justify-content: center;
    }

    .scroll-top {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        bottom: 82px;
        right: 24px;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.8rem;
        bottom: 20px;
        right: 20px;
    }
}