/* COLOR THEME VARIABLES */
:root, [data-theme="light"] {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --border-highlight: #cbd5e1;
    --text-title: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --accent-light: #e0f2fe;
    --header-bg: rgba(255, 255, 255, 0.94);
    --header-border: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 12px 30px -10px rgba(29, 78, 216, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 20px 35px -10px rgba(29, 78, 216, 0.16), 0 8px 12px -4px rgba(0, 0, 0, 0.04);
    --input-bg: #f8fafc;
    --pill-bg: #f1f5f9;
    --pill-active-bg: #eff6ff;
    --pill-active-border: #1d4ed8;
    --ambient-1: rgba(29, 78, 216, 0.12);
    --ambient-2: rgba(2, 132, 199, 0.10);
    --logo-filter: none;
}

[data-theme="dark"] {
    --bg-page: #070b14;
    --bg-card: rgba(15, 23, 42, 0.8);
    --bg-card-subtle: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --text-title: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-light: rgba(56, 189, 248, 0.15);
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-light: rgba(96, 165, 250, 0.15);
    --header-bg: rgba(7, 11, 20, 0.92);
    --header-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
    --shadow-card-hover: 0 25px 50px -12px rgba(56, 189, 248, 0.25);
    --input-bg: rgba(0, 0, 0, 0.4);
    --pill-bg: rgba(15, 23, 42, 0.6);
    --pill-active-bg: rgba(56, 189, 248, 0.15);
    --pill-active-border: #38bdf8;
    --ambient-1: rgba(56, 189, 248, 0.16);
    --ambient-2: rgba(96, 165, 250, 0.12);
    --logo-filter: brightness(0) invert(1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

body, button, input, select, textarea, optgroup {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Ensure FontAwesome icons always render correctly */
.fa, .fas, .fa-solid, .far, .fa-regular, .fab, .fa-brands, [class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}
.fa-brands, [class*="fa-brands"] {
    font-family: "Font Awesome 6 Brands" !important;
}

html {
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100%;
    position: relative;
    line-height: 1.6;
}

/* Ambient Glow Lights Container */
.ambient-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ambient-glow-1 {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90vw;
    height: 500px;
    background: radial-gradient(circle, var(--ambient-1) 0%, var(--ambient-2) 40%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.ambient-glow-2 {
    position: absolute;
    top: 1300px;
    right: 0;
    width: 500px;
    max-width: 80vw;
    height: 500px;
    background: radial-gradient(circle, var(--ambient-1) 0%, transparent 70%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}

/* Container helper */
.container-custom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Modern Cards */
.modern-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modern-card-hover:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card-hover);
}

/* Modern Buttons */
.btn-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 8px 20px -4px rgba(29, 78, 216, 0.4);
    transition: all 0.25s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(29, 78, 216, 0.55);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 8px 20px -4px rgba(37, 211, 102, 0.4);
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(37, 211, 102, 0.6);
}

.btn-subtle {
    background: var(--bg-card);
    color: var(--text-title) !important;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-subtle:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary) !important;
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s ease;
}
.theme-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(20deg);
}

/* Operator Pill in Calculator */
.operator-pill {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--pill-bg);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}
.operator-pill:hover {
    border-color: var(--primary);
    background: var(--pill-active-bg);
}
.operator-pill.active {
    border-color: var(--pill-active-border);
    background: var(--pill-active-bg);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* Navigation Links (Desktop) */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    padding: 7px 11px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    font-size: 18px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-menu-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Fast WA Icon for Mobile Header */
.header-mobile-wa-icon {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white !important;
    font-size: 19px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* Mobile Drawer / Slide-out Menu */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--header-border);
    padding: 16px 20px 24px;
    z-index: 49;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-drawer.open {
    display: block;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-title);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.mobile-nav-item:hover, .mobile-nav-item:active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .desktop-nav {
        gap: 2px;
    }
    .nav-link {
        padding: 6px 8px;
        font-size: 12.5px;
    }
}

@media (max-width: 992px) {
    .desktop-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
    }
    .header-desktop-only {
        display: none !important;
    }
    .header-mobile-wa-icon {
        display: inline-flex !important;
    }
}

@media (max-width: 640px) {
    .container-custom {
        padding: 0 12px !important;
    }
    .header-bar-custom {
        padding: 10px 0 !important;
    }
    #brandLogo {
        max-width: 135px !important;
        height: 32px !important;
    }
    .header-actions {
        gap: 6px !important;
    }
    .theme-toggle-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    .header-mobile-wa-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 17px !important;
    }
    .mobile-menu-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    .floating-wa-bubble {
        display: none !important;
    }
    .floating-wa {
        bottom: 18px !important;
        right: 18px !important;
    }
    .floating-wa-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
    .hero-actions-container {
        flex-direction: column !important;
    }
    .hero-actions-container > * {
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }
    .highlights-grid {
        gap: 8px !important;
    }
    .highlights-grid > div > div:first-child {
        font-size: 18px !important;
    }
    .highlights-grid > div > div:last-child {
        font-size: 10.5px !important;
    }
}

/* Floating WhatsApp Button */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.floating-wa-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.floating-wa-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: pulse-ring 2s infinite;
}
.floating-wa-btn:hover {
    transform: scale(1.1);
}
.floating-wa-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-card);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.status-dot-active {
    width: 8px;
    height: 8px;
    background-color: #38bdf8;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #38bdf8;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    overflow-y: auto;
    padding: 20px;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow-card);
    color: var(--text-body);
}

/* Responsive grid helper */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
