/* Jost — Google Fonts, licencia OFL (uso libre, incluido comercial) */
/* @import eliminado: cargado en <head> de cada HTML para no bloquear el render */

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    overflow-x: hidden;
}

:root {
    --bg-main: #0B0F19;
    --acc-cyan: #00f0ff;
    --acc-blue: #0057ff;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --header-bg: rgba(11, 15, 25, 0.85);
    --footer-bg: #050811;
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-border: rgba(255, 255, 255, 0.1);
    --select-option-bg: #0f172a;
}

/* ── MODO CLARO (blanco limpio con acento naranja-rojo) ──────────────────── */
[data-theme="light"] {
    --bg-main: #ffffff;
    --acc-cyan: #ffaa00;
    --acc-blue: #dc2626;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #f1f5f9;
    --input-bg: rgba(0, 0, 0, 0.03);
    --input-border: rgba(0, 0, 0, 0.12);
    --select-option-bg: #ffffff;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255, 122, 0, 0.07), transparent 35%),
        radial-gradient(circle at 85% 20%, rgba(220, 38, 38, 0.05), transparent 35%);
}

[data-theme="light"] header {
    background: var(--header-bg);
    border-bottom-color: rgba(0, 0, 0, 0.07);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] header h1 {
    background: linear-gradient(90deg, #ffaa00, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] nav a {
    color: var(--text-secondary);
}

[data-theme="light"] nav a:hover,
[data-theme="light"] nav a:focus-visible {
    color: var(--text-primary);
}

[data-theme="light"] nav a::after {
    background: var(--acc-cyan);
    box-shadow: none;
}

[data-theme="light"] .nav-toggle span {
    background: var(--text-secondary);
}

[data-theme="light"] footer {
    background: var(--footer-bg);
    border-top-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .hero {
    background: linear-gradient(to bottom, rgba(255,245,235,0.70) 0%, rgba(255,235,220,0.62) 100%), url('img/hero.jpg');
    background-size: cover;
    background-position: center;
}

[data-theme="light"] .hero h2 {
    color: var(--text-primary);
    text-shadow: none;
}

[data-theme="light"] .hero p {
    color: var(--text-secondary);
}

[data-theme="light"] .services h2,
[data-theme="light"] .section-title,
[data-theme="light"] .contact-title {
    color: var(--text-primary);
}

[data-theme="light"] .service {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .service:hover {
    box-shadow: 0 12px 32px rgba(255, 122, 0, 0.12), 0 0 0 1px rgba(255, 122, 0, 0.15);
}

[data-theme="light"] .service-header h3 {
    color: var(--text-primary);
}

[data-theme="light"] .input-group input,
[data-theme="light"] .input-group select,
[data-theme="light"] .input-group textarea {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-theme="light"] .input-group input::placeholder,
[data-theme="light"] .input-group textarea::placeholder {
    color: rgba(71, 85, 105, 0.45);
}

[data-theme="light"] .input-group select option {
    background: var(--select-option-bg);
    color: var(--text-primary);
}

[data-theme="light"] .landing-hero h1 {
    color: var(--text-primary);
    text-shadow: none;
}

[data-theme="light"] .blog-featured-body h2,
[data-theme="light"] .blog-card h2,
[data-theme="light"] .article-wrap h1 {
    color: var(--text-primary);
}

/* Alertas */
[data-theme="light"] .diy-verdict-ok     { background: rgba(16,185,129,0.08);  color: #065f46; border-color: rgba(16,185,129,0.25); }
[data-theme="light"] .diy-verdict-warn   { background: rgba(255,170,0,0.08);  color: #c2410c; border-color: rgba(255,170,0,0.25); }
[data-theme="light"] .diy-verdict-danger { background: rgba(220,38,38,0.07);   color: #9f1239; border-color: rgba(220,38,38,0.2);   }

/* Aviso legal */
[data-theme="light"] .legal-notice {
    background: rgba(255, 122, 0, 0.07);
    border-color: rgba(255, 122, 0, 0.2);
    color: #c2410c;
}

/* ── Títulos de página con color #fff hardcodeado ───────────────────────── */
[data-theme="light"] .diy-page-title,
[data-theme="light"] .portal-title,
[data-theme="light"] .diy-send-btn,
[data-theme="light"] .diy-mail-btn,
[data-theme="light"] .btn-submit {
    color: #fff;
}

/* ── Tarjetas con fondo rgba oscuro hardcodeado ─────────────────────────── */
[data-theme="light"] .diy-tarifa,
[data-theme="light"] .diy-terms {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .diy-terms-header:hover {
    background: rgba(255, 122, 0, 0.04);
}

[data-theme="light"] .diy-terms-header strong {
    color: var(--text-primary);
}

/* ── Inputs de AvantFix (.diy-fields) ───────────────────────────────────── */
[data-theme="light"] .diy-fields input,
[data-theme="light"] .diy-fields textarea {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-theme="light"] .diy-fields input::placeholder,
[data-theme="light"] .diy-fields textarea::placeholder {
    color: rgba(71, 85, 105, 0.45);
}

/* ── Botones de dificultad y pestañas de contacto ───────────────────────── */
[data-theme="light"] .diy-diff-btn,
[data-theme="light"] .contact-tab {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

[data-theme="light"] .diy-diff-btn:hover,
[data-theme="light"] .contact-tab:hover {
    border-color: var(--acc-cyan);
    color: var(--text-primary);
}

[data-theme="light"] .diy-diff-btn.active,
[data-theme="light"] .contact-tab.active {
    background: rgba(255, 122, 0, 0.08);
    border-color: var(--acc-cyan);
    color: var(--acc-cyan);
}

/* Resaltado premium para modo claro */
[data-theme="light"] .cyan {
    background: linear-gradient(90deg, #ffaa00, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none !important;
    font-weight: 700;
}

/* ── Contact section ────────────────────────────────────────────────────── */
[data-theme="light"] .contact-section {
    background: linear-gradient(180deg, var(--bg-main) 0%, #f1f5f9 100%);
}

[data-theme="light"] .service.active {
    background: rgba(255, 255, 255, 0.98);
}

/* ── Sección de precio ──────────────────────────────────────────────────── */
[data-theme="light"] .price-box {
    background: rgba(255, 122, 0, 0.06);
    border-color: rgba(255, 122, 0, 0.3);
    color: var(--acc-cyan);
}

/* ── Banner de confirmación ─────────────────────────────────────────────── */
[data-theme="light"] .confirm-banner {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .confirm-banner-title { color: #065f46; }

/* ── Portal de presupuesto ──────────────────────────────────────────────── */
[data-theme="light"] .portal-card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

/* ── Heroes de páginas de servicio (calderas, tv, electrodomesticos) ────── */
.hero-service {
    --overlay: rgba(11, 15, 25, 0.68);
    background-image: linear-gradient(var(--overlay), var(--overlay)), var(--hero-bg, none);
    background-size: cover;
    background-position: center;
}

[data-theme="light"] .hero-service {
    --overlay: rgba(255, 255, 255, 0.75);
}

/* ── Filtros del blog ───────────────────────────────────────────────────── */
[data-theme="light"] .filter-btn {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

[data-theme="light"] .filter-btn.active {
    background: rgba(255, 122, 0, 0.08);
    border-color: var(--acc-cyan);
    color: var(--acc-cyan);
}

/* ── Overrides de colores hardcodeados azules ────────────────────────────── */
[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255, 122, 0, 0.08), transparent 35%),
        radial-gradient(circle at 85% 20%, rgba(220, 38, 38, 0.06), transparent 35%);
}

[data-theme="light"] .btn-submit {
    background: linear-gradient(135deg, #dc2626 0%, #ffaa00 100%);
    box-shadow: 0 10px 20px rgba(255, 122, 0, 0.3);
}

[data-theme="light"] .contact-card::before {
    background: radial-gradient(circle at 50% 0%, rgba(255, 122, 0, 0.08), transparent 50%);
}

[data-theme="light"] .contact-section {
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Jost', system-ui, -apple-system, sans-serif;
}

body {
    line-height: 1.6;
    background: var(--bg-main);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 87, 255, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.1), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
}

/* En móvil, fixed background causa rendimiento pésimo en iOS/Android */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

/* HEADER GLASSMORPHISM */
header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    color: #fff;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
    header {
        padding: 14px 20px;
        flex-wrap: wrap;
        gap: 0;
    }
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-group img {
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4));
    transition: transform 0.3s ease;
}

.logo-group:hover img {
    transform: scale(1.05) rotate(3deg);
}

header h1 {
    font-size: 26px;
    font-weight: bold;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

/* ── NAVEGACIÓN DESKTOP ─────────────────────────────────────────────────── */
nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    margin-left: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--acc-cyan);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--acc-cyan);
}

nav a:hover,
nav a:focus-visible {
    color: #fff;
    outline: none;
}

nav a:hover::after,
nav a:focus-visible::after {
    width: 100%;
}

/* ── BOTÓN MODO CLARO/OSCURO ───────────────────────────────────────────── */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--acc-cyan);
    color: var(--acc-cyan);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--acc-cyan);
    outline-offset: 2px;
}

/* Iconos: muestra sol en oscuro, luna en claro */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.confirm-banner-icon svg,
.modal-close svg,
.avantfix-banner-icon svg,
.modal-service-tag svg,
.diy-send-btn svg,
.diy-diff-icon svg {
    stroke-width: 2;
    fill: none;
}

.confirm-banner-icon svg { width: 28px; height: 28px; stroke: currentColor; }
.modal-close svg { width: 18px; height: 18px; stroke: currentColor; }
.avantfix-banner-icon svg { width: 32px; height: 32px; stroke: currentColor; }
.modal-service-tag svg { width: 14px; height: 14px; stroke: currentColor; flex-shrink: 0; }
.diy-send-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.diy-diff-icon svg { width: 22px; height: 22px; }
.diy-verdict svg { width: 18px; height: 18px; stroke-width: 2; fill: none; vertical-align: middle; margin-right: 4px; }

.diy-diff-btn[data-diff="facil"] .diy-diff-icon svg { stroke: #4ade80; }
.diy-diff-btn[data-diff="medio"] .diy-diff-icon svg { stroke: #facc15; }
.diy-diff-btn[data-diff="dificil"] .diy-diff-icon svg { stroke: #f87171; }

.success-icon svg { width: 56px; height: 56px; stroke: #4ade80; stroke-width: 1.5; fill: none; }

/* Iconos inline en texto (lock, alert-triangle, wrench, mail, circle-check en veredictos) */
.legal-notice svg,
.diy-verdict svg,
.form-privacy svg,
.diy-send-btn svg {
    display: inline;
    vertical-align: middle;
    margin-right: 4px;
}

.badge-featured svg { width: 13px; height: 13px; stroke: currentColor; fill: currentColor; stroke-width: 1; vertical-align: middle; }

/* Botones agrupados al final del header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── HAMBURGER ─────────────────────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 7px 8px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--acc-cyan);
    outline-offset: 2px;
}

/* Cuando el menú está abierto, animar a ✕ */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--acc-cyan); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--acc-cyan); }

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 12px 0 4px;
        border-top: 1px solid var(--glass-border);
        margin-top: 12px;
    }

    nav.open {
        display: flex;
    }

    nav a {
        margin-left: 0;
        padding: 10px 4px;
        width: 100%;
        font-size: 1rem;
    }

    nav a::after {
        display: none;
    }
}

/* ── FOCUS VISIBLE GLOBAL ───────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--acc-cyan);
    outline-offset: 2px;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, rgba(11, 15, 25, 0.9) 0%, rgba(0, 40, 100, 0.6) 100%), url('img/hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 160px 20px 80px;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        padding: 70px 20px 60px;
    }
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-main) 100%);
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 25px;
    font-weight: bold;
    letter-spacing: -0.5px;
    position: relative;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.8s ease-out both;
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
    position: relative;
    animation: slideUp 1s ease-out both;
}

@media (max-width: 768px) {
    .hero h2 { font-size: 2rem; }
    .hero p  { font-size: 1rem; }
}

/* SERVICES SECTION */
.services {
    padding: 100px 20px;
    text-align: center;
    position: relative;
}

.services h2 {
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #fff;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.services h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--acc-cyan), var(--acc-blue));
    border-radius: 2px;
}

.service-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    width: 350px;
    border-radius: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s, box-shadow 0.4s;
    text-align: left;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, -20%), rgba(0, 240, 255, 0.05), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.service:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.1);
}

.service:hover::before {
    opacity: 1;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-header h3 {
    font-size: 1.3rem;
    color: #fff;
    margin: 0;
    transition: color 0.3s;
}

.service:hover .service-header h3 {
    color: var(--acc-cyan);
}

.toggle-icon {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    flex-shrink: 0;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    background-color: currentColor;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-icon::before { width: 14px; height: 2px; }
.toggle-icon::after  { width: 2px; height: 14px; }

.service:hover .toggle-icon {
    color: var(--acc-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.service-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.4s ease, opacity 0.4s ease;
    margin-top: 0;
    opacity: 0;
    line-height: 1.7;
}

.service.active {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(0, 240, 255, 0.2);
}

.service.active .service-body {
    max-height: 1000px;
    margin-top: 20px;
    opacity: 1;
    overflow: visible;
    padding-bottom: 20px;
}

.service.active .toggle-icon {
    transform: rotate(45deg);
    color: #ff3366;
    background: rgba(255, 51, 102, 0.1);
}

/* CONTACT SECTION */
.contact-section {
    padding: 60px 20px 10px;
    display: flex;
    justify-content: center;
    position: relative;
    background: linear-gradient(180deg, var(--bg-main) 0%, #050811 100%);
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    max-width: 850px;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    position: relative;
}

@media (max-width: 600px) {
    .contact-card {
        padding: 28px 20px;
    }
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 87, 255, 0.1), transparent 50%);
    pointer-events: none;
}

.contact-title {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 1px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .contact-title { font-size: 2rem; }
}

.contact-title .cyan {
    color: var(--acc-cyan);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

[data-theme="light"] .contact-title .cyan {
    text-shadow: none;
}

.contact-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* FORM STYLES */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    position: relative;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: 1;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
}

.full-width {
    grid-column: span 2;
}

.input-group label {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--acc-cyan);
    background: rgba(0, 240, 255, 0.02);
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.1);
    outline: none;
}

.input-group select option {
    background: var(--select-option-bg);
    color: var(--text-primary);
}

.btn-submit {
    margin-top: 40px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--acc-blue) 0%, var(--acc-cyan) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 87, 255, 0.3);
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: left 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.4);
}

.btn-submit:hover::after {
    opacity: 1;
    left: 100%;
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Response Panel */
.confirmation-panel {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.5s ease;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
}

.confirmation-panel.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #2ecc71;
}

.confirmation-panel.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 36px 20px 20px;
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 14px;
}

.footer-brand .footer-logo img {
    height: 28px;
    width: auto;
}

.footer-brand .footer-logo span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.footer-brand .footer-logo span em {
    font-style: normal;
    background: linear-gradient(90deg, #00f0ff, #0057ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

[data-theme="light"] .footer-brand .footer-logo span em {
    background: linear-gradient(90deg, #ffaa00, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 260px;
}

.footer-brand address {
    font-style: normal;
    font-size: 0.82rem;
    line-height: 1.8;
    margin-top: 12px;
}

.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.87rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--acc-cyan);
}

.footer-bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* LANDING PAGE SPECIFIC STYLES */

.landing-hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(11, 15, 25, 0.4) 0%, var(--bg-main) 100%);
}

.landing-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .landing-hero h1 { font-size: 2.2rem; }
}

.landing-hero .badge {
    background: var(--acc-cyan);
    color: var(--bg-main);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    box-shadow: 0 0 15px var(--acc-cyan);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--acc-cyan);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--acc-cyan);
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--acc-blue), var(--acc-cyan));
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 30px;
}

.cta-button:hover,
.cta-button:focus-visible {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 30px;
    transition: color 0.3s;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--acc-cyan);
}

.service-details {
    padding: 100px 20px;
    background: rgba(255, 255, 255, 0.02);
}

.details-container {
    max-width: 1000px;
    margin: 0 auto;
}

.price-box {
    background: rgba(0, 240, 255, 0.05);
    border: 1px dashed var(--acc-cyan);
    padding: 20px;
    border-radius: 10px;
    margin-top: 40px;
    color: var(--acc-cyan);
    text-align: center;
}

/* ── PROBLEMS GRID (páginas de servicio) ────────────────────────────────── */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.problem-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}

.problem-card:hover {
    border-color: rgba(0, 240, 255, 0.28);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 240, 255, 0.08);
}

.problem-card-icon {
    font-size: 1.5rem;
    width: 46px;
    height: 46px;
    background: rgba(0, 240, 255, 0.07);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.problem-card-icon svg,
.feature-icon svg {
    stroke: var(--acc-cyan);
    stroke-width: 2;
    fill: none;
}

.problem-card-icon svg { width: 22px; height: 22px; }
.feature-icon svg { width: 36px; height: 36px; }

.problem-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.problem-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 0;
}

.problem-list li {
    font-size: 0.83rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s, padding-left 0.15s;
}

.problem-list li:hover {
    color: var(--text-primary);
    padding-left: 20px;
}

.problem-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--acc-cyan);
    font-size: 1.3rem;
    line-height: 0.85;
}

.problem-list li::after {
    content: 'Solicitar →';
    margin-left: auto;
    padding-left: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--acc-cyan);
    white-space: nowrap;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.problem-list li:hover::after {
    opacity: 1;
    transform: translateX(0);
}

[data-theme="light"] .problem-card:hover {
    border-color: rgba(14, 116, 144, 0.3);
    box-shadow: 0 10px 28px rgba(14, 116, 144, 0.08);
}

[data-theme="light"] .problem-card-icon {
    background: rgba(14, 116, 144, 0.08);
    border-color: rgba(14, 116, 144, 0.2);
}

/* ── MODAL ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { padding: 28px 28px 0; position: relative; }
.modal-body   { padding: 20px 28px 28px; }

.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 34px; height: 34px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover {
    background: rgba(0,240,255,0.08);
    border-color: rgba(0,240,255,0.35);
    color: var(--text-primary);
}

.modal-service-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,240,255,0.07);
    border: 1px solid rgba(0,240,255,0.18);
    color: var(--acc-cyan);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.modal-title    { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; line-height: 1.2; }
.modal-subtitle { font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 0; }
.modal-divider  { height: 1px; background: var(--glass-border); margin: 20px 0; }
.modal-box .btn-submit { margin-top: 20px; }

/* ── AVANTFIX BANNER ─────────────────────────────────────────────────────── */
.avantfix-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(0,240,255,0.22);
    background: rgba(0,240,255,0.03);
    text-decoration: none; color: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.avantfix-banner:hover { background: rgba(0,240,255,0.07); border-color: rgba(0,240,255,0.4); }
.avantfix-banner-icon  { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.avantfix-banner-text  { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.avantfix-banner-title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.avantfix-banner-sub   { font-size: 0.76rem; color: var(--text-secondary); line-height: 1.4; }
.avantfix-banner-arrow { font-size: 1rem; color: var(--acc-cyan); font-weight: 700; flex-shrink: 0; transition: transform 0.2s; }
.avantfix-banner:hover .avantfix-banner-arrow { transform: translateX(4px); }

/* ── CONFIRM BANNER ──────────────────────────────────────────────────────── */
.confirm-banner {
    display: none; gap: 14px; align-items: flex-start;
    margin-top: 24px; padding: 18px 20px;
    border-radius: 12px;
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.3);
    animation: fadeInUp 0.4s ease;
}
.confirm-banner.visible       { display: flex; }
.confirm-banner-icon          { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.confirm-banner-body          { display: flex; flex-direction: column; gap: 4px; }
.confirm-banner-title         { font-weight: 700; color: #6ee7b7; font-size: 0.95rem; }
.confirm-banner-text          { color: var(--text-secondary); font-size: 0.83rem; line-height: 1.55; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── LIGHT MODE: sub-services y modal ───────────────────────────────────── */
[data-theme="light"] .sub-item {
    border-color: rgba(100, 70, 35, 0.15);
}

[data-theme="light"] .sub-item.open {
    border-color: var(--acc-cyan);
}

[data-theme="light"] .sub-item-header:hover {
    background: rgba(14, 116, 144, 0.05);
}

[data-theme="light"] .sub-item.open .sub-item-header {
    background: rgba(14, 116, 144, 0.06);
}

[data-theme="light"] .sub-service-icon-wrap {
    background: rgba(14, 116, 144, 0.08);
    border-color: rgba(14, 116, 144, 0.2);
}

[data-theme="light"] .sub-child-btn {
    color: var(--text-secondary);
}

[data-theme="light"] .sub-child-btn:hover {
    background: rgba(14, 116, 144, 0.06);
    color: var(--text-primary);
}

[data-theme="light"] .sub-item-children {
    border-top-color: rgba(100, 70, 35, 0.12);
}

[data-theme="light"] .modal-divider {
    background: rgba(100, 70, 35, 0.12);
}

[data-theme="light"] .modal-overlay {
    background: rgba(30, 18, 8, 0.6);
}

[data-theme="light"] .modal-box {
    background: rgba(248, 240, 228, 0.97);
    border-color: rgba(100, 70, 35, 0.18);
}

[data-theme="light"] .modal-close {
    color: var(--text-secondary);
    border-color: rgba(100, 70, 35, 0.2);
}

[data-theme="light"] .modal-close:hover {
    border-color: var(--acc-cyan);
    color: var(--text-primary);
}

/* ── ANIMATION KEYFRAMES ─────────────────────────────────────────────────── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleReveal {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,240,255,0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(0,240,255,0); }
}
@keyframes breathe {
  0%,100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%,-50%) scale(1.15); }
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}
