/* 1. VARIABLES DE COLOR Y TEMAS */
    :root {
        --bg-main: #000000;
        --bg-nav: rgba(0, 0, 0, 0.9);
        --text-main: #ffffff;
        --text-strong: #ffffff;
        --text-muted: rgba(255, 255, 255, 0.6);
        --text-soft: rgba(255, 255, 255, 0.55);
        --text-faint: rgba(255, 255, 255, 0.3);
        --text-dim: rgba(255, 255, 255, 0.2);
        --surface-soft: rgba(255, 255, 255, 0.03);
        --surface-medium: rgba(255, 255, 255, 0.08);
        --border-soft: rgba(255, 255, 255, 0.07);
        --border-medium: rgba(255, 255, 255, 0.15);
        --card-bg: rgba(37, 99, 235, 0.05);
        --card-bg-strong: rgba(37, 99, 235, 0.1);
        --card-border: rgba(37, 99, 235, 0.2);
        --card-border-strong: rgba(37, 99, 235, 0.3);
        --chip-bg: rgba(37, 99, 235, 0.12);
        --hero-gradient: radial-gradient(ellipse at 60% 50%, #001a3d 0%, #000000 85%);
        --accent: #2563eb;
        --accent-soft: #3b82f6;
        --on-accent: #ffffff;
        --btn-dark-bg: #000000;
        --btn-dark-fg: #ffffff;
        --whatsapp: #25D366;
    }

    /* MODO CLARO (Sobrescribe las variables anteriores) */
    html[data-theme="light"] body {
        --bg-main: #f8fafc;
        --bg-nav: rgba(255, 255, 255, 0.9);
        --text-main: #1e293b;
        --text-strong: #0f172a;
        --text-muted: #475569;
        --text-soft: #475569;
        --text-faint: #64748b;
        --text-dim: #94a3b8;
        --surface-soft: #f1f5f9;
        --surface-medium: #e2e8f0;
        --border-soft: #e2e8f0;
        --border-medium: #cbd5e1;
        --card-bg: #ffffff;
        --card-bg-strong: #eff6ff;
        --card-border: #dbeafe;
        --card-border-strong: #bfdbfe;
        --chip-bg: #eff6ff;
        --hero-gradient: radial-gradient(ellipse at 60% 50%, #dbeafe 0%, #f8fafc 85%);
        --accent: #2563eb;
        --accent-soft: #1d4ed8;
        --on-accent: #ffffff;
        --btn-dark-bg: #1e293b;
        --btn-dark-fg: #ffffff;
    }

    /* 2. ESTILOS GLOBALES */
    body { 
        background-color: var(--bg-main); 
        color: var(--text-main); 
        font-family: 'Muli', sans-serif;
        transition: background 0.4s ease, color 0.4s ease;
        margin: 0;
    }

    /* 3. COMPONENTES DE ESTRUCTURA */
    .hero-bg { 
        background: var(--hero-gradient); 
        min-height: 100vh; 
        display: flex;
        align-items: center;
    }

    nav { 
        background-color: var(--bg-nav) !important; 
        backdrop-filter: blur(10px); 
    }

    .white { color: var(--text-main) !important; }

    /* 4. BOTONES Y LINKS ESPECÍFICOS */
    .theme-toggle {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 1000;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        background: var(--accent);
        color: white;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .theme-toggle:hover { transform: scale(1.1) rotate(15deg); }

    .whatsapp-btn {
        background: var(--whatsapp);
        color: var(--text-strong);
        border-radius: 50px;
        padding: 14px 32px;
        font-weight: 700;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
        transition: transform 0.2s, opacity 0.2s;
    }
    .whatsapp-btn:hover { opacity: 0.9; transform: scale(1.03); }

    .contact-link { color: #93c5fd; text-decoration: none; }
    .contact-link:hover { text-decoration: underline; }

    /* 5. SECCIÓN DE SERVICIOS (Cards iguales) */
    .service-card {
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        padding: 30px;
        border-radius: 12px;
        transition: all 0.3s ease;
    }
    .service-card:hover { 
        transform: translateY(-10px); 
        border-color: var(--accent);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .btn-servicio {
        display: block;
        background: var(--accent);
        color: white;
        text-decoration: none;
        text-align: center;
        padding: 12px;
        border-radius: 6px;
        font-weight: 700;
        margin-top: 20px;
        font-size: 0.85rem;
    }

    /* 6. ELEMENTOS DE DISEÑO (Stats, Badges e Iconos) */
    .badge-award { 
        background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%); 
        padding: 5px 15px;
        border-radius: 20px;
        display: inline-block;
    }

    .stat-number { font-size: 2.8rem; font-weight: 900; color: var(--text-strong); }
    .stat-label { 
        font-size: 0.85rem; 
        color: var(--text-muted); 
        text-transform: uppercase; 
        letter-spacing: 1px; 
    }

    .service-icon { font-size: 2rem; color: var(--accent); }

    /* Carrusel horizontal de marcas */
    .brand-carousel {
        padding: 24px 0;
        background: transparent;
        overflow: hidden;
    }
    .brand-carousel .logo-item {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 16px;
        min-width: 160px;
        height: 54px;
    }
    .brand-carousel .logo-item img {
        height: 32px;
        max-width: 140px;
        width: auto;
        object-fit: contain;
        opacity: 0.95;
    }
    @media (max-width: 768px) {
        .brand-carousel { padding: 16px 0; }
        .brand-carousel .logo-item { padding: 0 12px; min-width: 120px; height: 48px; }
        .brand-carousel .logo-item img { height: 28px; max-width: 110px; }
    }
    
    /* Ajustes de utilidades locales para que respeten el tema */
    body.bg-black { background-color: var(--bg-main) !important; }
    nav.bg-black { background-color: var(--bg-nav) !important; }
    .white, .indigo, .indigo-lighter, .indigo-lightest { color: var(--text-main) !important; }
    .bg-indigo { background-color: var(--accent) !important; color: var(--on-accent) !important; }
    .border-indigo-lightest { border-color: var(--accent) !important; }
    h1,h2,h3,h4,h5,h6 { color: var(--text-strong); }
    footer { background: var(--surface-soft) !important; border-top:1px solid var(--border-soft) !important; }

    
    /* Email button (parity con WhatsApp) */
    .email-btn {
        border-radius: 50px;
        padding: 14px 32px;
        font-weight: 700;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
        line-height: 1;
        transition: transform 0.2s, opacity 0.2s, background 0.2s;
    }
    .email-btn:hover { transform: scale(1.03); background: var(--accent); color: #fff; }
    /* Purple-free: garantizar acentos azules */
    .indigo, .indigo-lighter, .indigo-lightest { color: var(--accent) !important; }
    .bg-indigo, .button.bg-indigo { background: var(--accent) !important; color: #fff !important; }
    .border-indigo-lightest { border-color: var(--accent) !important; }

    /* === LIGHT MODE: coherente en TODAS las secciones === */
    html[data-theme="light"] body {
        background: #eef4fb !important;
        color: var(--text-main) !important;
    }
    html[data-theme="light"] .bg-black { background: transparent !important; }
    html[data-theme="light"] nav.bg-black { background: rgba(255,255,255,0.92) !important; border-bottom-color: #cfe0f5 !important; }
    html[data-theme="light"] section { color: var(--text-main); }
    html[data-theme="light"] .hero-bg {
        background: linear-gradient(135deg, #e6f0fc 0%, #f5f9ff 60%, #dceaf8 100%) !important;
    }
    html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3,
    html[data-theme="light"] h4, html[data-theme="light"] h5, html[data-theme="light"] h6 {
        color: #0b1f3d !important;
    }
    html[data-theme="light"] .white { color: #0b1f3d !important; }
    html[data-theme="light"] .service-card {
        background: #ffffff !important;
        border: 1px solid #cfe0f5 !important;
        box-shadow: 0 2px 14px rgba(37,99,235,0.06);
    }
    html[data-theme="light"] .service-card:hover {
        box-shadow: 0 14px 36px rgba(37,99,235,0.18);
        border-color: var(--accent) !important;
    }
    html[data-theme="light"] footer {
        background: #e8f0fa !important;
        border-top-color: #cfe0f5 !important;
    }
    html[data-theme="light"] footer .white { color: #0b1f3d !important; }
    html[data-theme="light"] footer .opacity-70 { opacity: 1 !important; color: #2c4a73 !important; }
    html[data-theme="light"] .email-btn,
    html[data-theme="light"] a[style*="background:var(--surface-medium)"] {
        background: #ffffff !important;
        color: #0b1f3d !important;
        border-color: #bfd4ec !important;
    }
    html[data-theme="light"] .stat-number { color: #0b1f3d !important; }
    html[data-theme="light"] .stat-label { color: #2c4a73 !important; }
    html[data-theme="light"] section[style*="background:var(--card-bg)"],
    html[data-theme="light"] section[style*="background:var(--surface-soft)"] {
        background: #eaf2fc !important;
    }
    html[data-theme="light"] .button[style*="background:#000"],
    html[data-theme="light"] a[style*="background:#000"] {
        background: #0b1f3d !important;
        color: #fff !important;
    }
    html[data-theme="light"] #slider-1 h2 { color: #0b1f3d !important; }
    html[data-theme="light"] .theme-toggle { background: #0b1f3d !important; color: #fff !important; }
    


    /* Botones destacados del carrusel principal */
    .home-feature-slider .home-highlight-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 220px;
        min-height: 58px;
        padding: 16px 34px !important;
        border-radius: 10px !important;
        font-size: 1rem !important;
        line-height: 1.2;
        font-weight: 700 !important;
        color: #ffffff !important;
        box-shadow: 0 8px 22px rgba(37, 99, 235, 0.25);
        transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }
    .home-feature-slider .home-highlight-btn:hover,
    .home-feature-slider .home-highlight-btn:focus-visible {
        background: var(--accent-soft) !important;
        color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
    }
    html[data-theme="light"] .home-feature-slider .home-highlight-btn,
    html[data-theme="dark"] .home-feature-slider .home-highlight-btn {
        color: #ffffff !important;
    }
    @media (max-width: 480px) {
        .home-feature-slider .home-highlight-btn {
            min-width: 200px;
            min-height: 56px;
            padding: 15px 28px !important;
        }
    }
