:root {
    --primary-navy: #0f172a;
    --primary-navy-light: #1e3a8a;
    --accent-amber: #b45309; /* Amber oscuro para pasar contraste WCAG AAA en fondo claro */
    --accent-yellow: #f59e0b; /* Amarillo cálido para detalles y llamadas */
    --accent-yellow-light: #fef08a; /* Amarillo suave para fondos y destacados */
    --bg-main: #ffffff;
    --bg-surface: #f8fafc;
    --text-main: #0f172a; /* Slate 900 para máxima legibilidad */
    --text-muted: #334155; /* Slate 700 para alto contraste (no gris claro) */
    --border-subtle: #cbd5e1; /* Slate 300 para bordes claros pero visibles */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --whatsapp-green: #15803d; /* Verde de alta legibilidad */
    --whatsapp-green-hover: #166534;
    --btn-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.7; /* Espaciado cómodo de lectura para adultos mayores */
    font-size: 1.125rem; /* Letra base de 18px para máxima claridad visual */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Cabecera de Anuncio / Emergencia */
.top-announcement {
    background-color: var(--primary-navy);
    color: #ffffff;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.container-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.emergency-badge {
    background-color: #dc2626; /* Rojo de emergencia */
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.emergency-phone {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.emergency-phone:hover {
    color: var(--accent-yellow);
}

.icon-svg {
    fill: currentColor;
    vertical-align: middle;
    display: inline-block;
}

/* Navbar */
.barra-electrica {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 2px solid var(--primary-navy);
    padding: 0.8rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 44px;
    width: 44px;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary-navy);
    line-height: 1.1;
}

.logo-subtext {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-amber);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.menu-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.menu-links a {
    text-decoration: none;
    color: var(--primary-navy);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.menu-links a:not(.btn-call-nav):hover {
    color: var(--primary-navy-light);
    border-bottom: 2px solid var(--accent-amber);
}

.btn-call-nav {
    background: var(--whatsapp-green);
    color: white !important;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 1rem !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-call-nav:hover {
    background: var(--whatsapp-green-hover);
    transform: translateY(-1px);
}

/* Hamburger Menú Móvil */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background: var(--primary-navy);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}

.hero-tagline {
    background-color: var(--accent-yellow-light);
    color: var(--accent-amber);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent-yellow);
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    line-height: 1.15;
    font-weight: 900;
}

.subtitulo {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 850px;
    margin: 0 auto 2.5rem;
}

.botones {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Botones Principales */
.btn-primary {
    background: var(--whatsapp-green);
    color: white;
    padding: 1.1rem 2.2rem;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--whatsapp-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(21, 128, 61, 0.35);
}

.btn-secondary {
    background: var(--primary-navy);
    color: white;
    padding: 1.1rem 2.2rem;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s;
    box-shadow: var(--btn-shadow);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: var(--primary-navy-light);
    transform: translateY(-2px);
}

/* Barra de Confianza */
.trust-bar {
    background-color: var(--primary-navy-light);
    color: white;
    padding: 1.5rem 0;
    border-bottom: 3px solid var(--accent-yellow);
}

.trust-flex {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trust-icon {
    font-size: 2.2rem;
}

.trust-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--accent-yellow);
}

.trust-item span {
    font-size: 0.9rem;
    color: #e2e8f0;
}

/* Cobertura (Local SEO) */
.cobertura-section {
    padding: 6rem 0;
    background: white;
    border-bottom: 1px solid var(--border-subtle);
}

.cobertura-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-navy);
    font-size: 2.3rem;
    font-weight: 800;
}

.cobertura-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

.cobertura-card {
    background: var(--bg-surface);
    padding: 2.2rem 1.8rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2rem;
}

.cobertura-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-navy-light);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.cobertura-card h3 {
    color: var(--primary-navy);
    font-size: 1.35rem;
    font-weight: 800;
}

.cobertura-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.cobertura-badge {
    background-color: var(--accent-yellow-light);
    color: var(--accent-amber);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    align-self: flex-start;
    border: 1px solid var(--accent-yellow);
}

/* Beneficios */
.beneficios-section {
    padding: 5rem 0;
    background: var(--bg-surface);
}

.beneficios-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.3rem;
    color: var(--primary-navy);
    font-weight: 800;
}

.section-desc {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 3.5rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.grid-beneficios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.item-beneficio {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: 0.3s;
}

.item-beneficio:hover {
    transform: translateY(-4px);
    border-color: var(--accent-yellow);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.item-beneficio h3 {
    margin: 1.2rem 0 0.8rem;
    color: var(--primary-navy);
    font-size: 1.3rem;
    font-weight: 800;
}

.item-beneficio p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.icono {
    font-size: 3.2rem;
    line-height: 1;
    display: block;
}

/* Servicios */
.servicios-section {
    padding: 6rem 0;
    background: white;
}

.servicios-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.3rem;
    color: var(--primary-navy);
    font-weight: 800;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

.servicio-card {
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.03);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-navy-light);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.servicio-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 2px solid #e2e8f0;
}

.servicio-body {
    padding: 2.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.servicio-body h3 {
    color: var(--primary-navy);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.servicio-body p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Tarjeta Destacada */
.servicio-card.destacada {
    background: var(--primary-navy);
    color: white;
    border: 2px solid var(--accent-yellow);
    justify-content: center;
    position: relative;
}

.card-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: var(--accent-amber);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
}

.servicio-card.destacada h3 {
    color: var(--accent-yellow);
    margin-top: 1rem;
}

.servicio-card.destacada p {
    color: #cbd5e1;
}

.btn-text {
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: 800;
    margin-top: 1.8rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-text:hover {
    color: white;
    transform: translateX(4px);
}

/* Galería */
.galeria-section {
    padding: 5rem 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.galeria-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-navy);
    font-size: 2.3rem;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.galeria-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.galeria-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.galeria-item:hover img {
    transform: scale(1.05);
}

/* Preguntas Frecuentes (FAQ) */
.faq-section {
    padding: 6rem 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-navy);
    font-size: 2.3rem;
}

.faq-container {
    max-width: 850px;
    margin: 0 auto;
}

details {
    background: var(--bg-surface);
    border: 2px solid #cbd5e1;
    margin-bottom: 1.2rem;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

details[open] {
    border-color: var(--primary-navy-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

summary {
    font-weight: 800;
    font-size: 1.2rem;
    padding: 1.3rem 1.6rem;
    color: var(--primary-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "▼";
    font-size: 0.9rem;
    color: var(--primary-navy-light);
    transition: transform 0.2s;
}

details[open] summary::after {
    transform: rotate(180deg);
}

.details-content {
    padding: 0 1.6rem 1.3rem;
    color: var(--text-muted);
}

.details-content p {
    margin: 0;
}

/* Contacto y CTA */
.cta-section {
    padding: 5rem 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.cta-box {
    background: var(--primary-navy);
    color: white;
    padding: 4.5rem 3rem;
    border-radius: 16px;
    text-align: center;
    border: 3px solid var(--accent-yellow);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.cta-box h2 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 800;
}

.cta-box p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-wa {
    background: #16a34a;
    color: white;
    padding: 1.2rem 2.4rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);
}

.btn-wa:hover {
    background: #15803d;
    transform: translateY(-2px);
}

.btn-tel {
    background: var(--accent-yellow);
    color: var(--primary-navy);
    padding: 1.2rem 2.4rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.btn-tel:hover {
    background: #e08e0b;
    transform: translateY(-2px);
}

.direct-contact-hint {
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* Footer */
footer {
    padding: 3rem 0;
    background: var(--primary-navy);
    color: white;
    text-align: center;
    border-top: 4px solid var(--accent-yellow);
}

.footer-copyright {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.disclaimer {
    font-size: 0.9rem;
    margin-top: 0.8rem;
    color: #94a3b8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* WhatsApp Float Widget */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #16a34a;
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.4);
    z-index: 1000;
    transition: 0.2s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.05);
    background-color: #15803d;
}

/* Animación de Revelado */
.reveal-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.6rem; }
    .cta-box { padding: 3rem 1.5rem; }
}

@media (max-width: 768px) {
    body {
        font-size: 1rem; /* Ajuste para móviles */
    }
    .hamburger { display: flex; }
    
    .menu-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 3px solid var(--primary-navy);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    .menu-links.active {
        display: flex;
    }
    
    .menu-links a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 0.8rem 0;
    }
    
    .btn-call-nav {
        width: 100%;
        justify-content: center;
    }

    .hero h1 { font-size: 2.1rem; }
    .subtitulo { font-size: 1.1rem; }
    
    .botones {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-primary, .btn-secondary {
        justify-content: center;
    }

    .cta-box h2 { font-size: 1.8rem; }
    .cta-btns {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-wa, .btn-tel {
        justify-content: center;
    }

    .whatsapp-float .float-text {
        display: none;
    }

    .whatsapp-float {
        padding: 0;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        justify-content: center;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .trust-flex {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 2rem;
    }
}

@media (max-width: 480px) {
    .container-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .emergency-phone {
        margin-top: 0.2rem;
    }
    .logo-text {
        font-size: 1.15rem;
    }
    .hero h1 { font-size: 1.8rem; }
}
