/* ==========================================================================
   TECSE Electricidad — hoja de estilos
   Paleta tomada del logo: verde corporativo + negro, amarillo solo de acento.
   ========================================================================== */

:root {
    --verde:        #0F7A3D;
    --verde-osc:    #0A5B2C;
    --verde-claro:  #3FA93B;
    --verde-suave:  #E8F3EC;
    --amarillo:     #F4B000;
    --tinta:        #11201A;
    --texto:        #39443E;
    --gris:         #6D7A73;
    --gris-claro:   #DDE4DF;
    --fondo:        #FFFFFF;
    --fondo-suave:  #F4F7F5;
    --whatsapp:     #25D366;

    --radio:        14px;
    --radio-sm:     10px;
    --sombra:       0 1px 2px rgba(17, 32, 26, .05), 0 8px 24px rgba(17, 32, 26, .06);
    --sombra-alta:  0 2px 4px rgba(17, 32, 26, .06), 0 18px 40px rgba(17, 32, 26, .12);
    --ancho:        1140px;
    --fuente:       'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: var(--fuente);
    font-size: 17px;
    line-height: 1.65;
    color: var(--texto);
    background: var(--fondo);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--tinta); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.18rem; font-weight: 800; }

p { color: var(--texto); }
strong { color: var(--tinta); font-weight: 700; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }

section { padding: 84px 0; }
.seccion-suave { background: var(--fondo-suave); }

.seccion-cabecera { max-width: 660px; margin-bottom: 46px; }
.seccion-cabecera.centro { margin-left: auto; margin-right: auto; text-align: center; }
.seccion-cabecera p { margin-top: 14px; font-size: 1.06rem; color: var(--gris); }

.etiqueta {
    display: inline-block;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--verde);
    background: var(--verde-suave);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--fuente);
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 24px;
    border-radius: var(--radio-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:hover { transform: translateY(-2px); }

.btn-principal { background: var(--verde); color: #fff; box-shadow: 0 6px 18px rgba(15, 122, 61, .25); }
.btn-principal:hover { background: var(--verde-osc); }

.btn-wa { background: var(--whatsapp); color: #0a2d18; box-shadow: 0 6px 18px rgba(37, 211, 102, .3); }
.btn-wa:hover { background: #1fbb59; }

.btn-linea { border-color: var(--gris-claro); color: var(--tinta); background: #fff; }
.btn-linea:hover { border-color: var(--verde); color: var(--verde); }

.btn-grande { padding: 17px 30px; font-size: 1.08rem; }

/* ---------- Cabecera ---------- */
.cabecera {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gris-claro);
}
.cabecera .contenedor { max-width: 1280px; }
.cabecera-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    height: 76px;
}
.marca { display: flex; align-items: center; gap: 11px; flex: none; }
.marca img { height: 31px; width: auto; }
.marca-texto {
    border-left: 1px solid var(--gris-claro);
    padding-left: 11px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--verde);
    line-height: 1.3;
}

.nav { display: flex; align-items: center; gap: 20px; }
.nav a {
    font-size: .92rem;
    font-weight: 700;
    color: var(--texto);
    white-space: nowrap;
    transition: color .15s ease;
}
.nav a:hover { color: var(--verde); }

.cabecera-acciones { display: flex; align-items: center; gap: 12px; flex: none; }
.cabecera-acciones .btn { padding: 12px 19px; font-size: .95rem; }
.tel-cabecera {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--tinta);
    font-size: 1rem;
    white-space: nowrap;
}
.tel-cabecera svg { width: 18px; height: 18px; color: var(--verde); }

.menu-btn {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    color: var(--tinta);
}
.menu-btn svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 80px; position: relative; overflow: hidden; }
.hero::before {
    content: '';
    position: absolute;
    top: -220px; right: -180px;
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(15, 122, 61, .09), transparent 68%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-rejilla {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 56px;
    align-items: center;
    position: relative;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--verde); }
.hero-sub { font-size: 1.14rem; color: var(--gris); max-width: 540px; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 13px; margin: 30px 0 26px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .93rem;
    font-weight: 700;
    color: var(--tinta);
}
.chip svg { width: 17px; height: 17px; color: var(--verde); flex: none; }

.hero-foto { position: relative; }
.hero-foto img {
    width: 100%;
    aspect-ratio: 4 / 3.3;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--sombra-alta);
}
.hero-tarjeta {
    position: absolute;
    left: -26px;
    bottom: 26px;
    background: #fff;
    border-radius: var(--radio);
    box-shadow: var(--sombra-alta);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 290px;
}
.hero-tarjeta-icono {
    width: 42px; height: 42px;
    border-radius: 11px;
    background: var(--verde-suave);
    color: var(--verde);
    display: grid;
    place-items: center;
    flex: none;
}
.hero-tarjeta-icono svg { width: 22px; height: 22px; }
.hero-tarjeta strong { display: block; font-size: .97rem; line-height: 1.3; }
.hero-tarjeta span { font-size: .84rem; color: var(--gris); }

/* ---------- Franja de garantías ---------- */
.franja { border-top: 1px solid var(--gris-claro); border-bottom: 1px solid var(--gris-claro); background: var(--fondo-suave); }
.franja-rejilla {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 34px 0;
}
.franja-item { display: flex; gap: 13px; align-items: flex-start; }
.franja-item svg { width: 24px; height: 24px; color: var(--verde); flex: none; margin-top: 2px; }
.franja-item strong { display: block; font-size: .98rem; margin-bottom: 2px; }
.franja-item span { font-size: .88rem; color: var(--gris); line-height: 1.45; }

/* ---------- Servicios ---------- */
.servicios-rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.servicio {
    background: #fff;
    border: 1px solid var(--gris-claro);
    border-radius: var(--radio);
    padding: 26px 24px 22px;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.servicio:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: #c9d6cd; }
.servicio-icono {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--verde-suave);
    color: var(--verde);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
}
.servicio-icono svg { width: 24px; height: 24px; }
.servicio h3 { margin-bottom: 9px; }
.servicio p { font-size: .95rem; color: var(--gris); margin-bottom: 16px; }
.servicio ul { list-style: none; margin-bottom: 18px; }
.servicio li {
    font-size: .9rem;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
    color: var(--texto);
}
.servicio li::before {
    content: '';
    position: absolute;
    left: 2px; top: 9px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--verde-claro);
}
.servicio-enlace {
    margin-top: auto;
    font-size: .92rem;
    font-weight: 800;
    color: var(--verde);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.servicio-enlace:hover { gap: 11px; }
.servicio-enlace span { transition: transform .15s ease; }

/* ---------- Bloques con foto ---------- */
.bloque {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.bloque + .bloque { margin-top: 88px; }
.bloque-foto img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: var(--sombra);
}
.bloque.invertido .bloque-texto { order: 2; }
.bloque.invertido .bloque-foto { order: 1; }
.bloque h2 { margin-bottom: 16px; }
.bloque p { color: var(--gris); margin-bottom: 18px; }

.lista-check { list-style: none; margin-bottom: 26px; }
.lista-check li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 11px;
    font-size: .98rem;
}
.lista-check li::before {
    content: '';
    position: absolute;
    left: 0; top: 3px;
    width: 21px; height: 21px;
    border-radius: 50%;
    background: var(--verde-suave) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F7A3D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.aviso {
    background: #fff;
    border: 1px solid var(--gris-claro);
    border-left: 4px solid var(--amarillo);
    border-radius: var(--radio-sm);
    padding: 16px 18px;
    font-size: .94rem;
    margin-bottom: 24px;
}
.aviso strong { display: block; margin-bottom: 3px; }

/* ---------- Pasos ---------- */
.pasos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    counter-reset: paso;
}
.paso {
    background: #fff;
    border: 1px solid var(--gris-claro);
    border-radius: var(--radio);
    padding: 26px 22px;
    position: relative;
}
.paso-num {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--tinta);
    color: #fff;
    font-weight: 800;
    display: grid;
    place-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}
.paso h3 { font-size: 1.05rem; margin-bottom: 7px; }
.paso p { font-size: .92rem; color: var(--gris); }

/* ---------- Para quién ---------- */
.perfiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.perfil {
    border-radius: var(--radio);
    overflow: hidden;
    border: 1px solid var(--gris-claro);
    background: #fff;
}
.perfil img { width: 100%; height: 185px; object-fit: cover; }
.perfil-cuerpo { padding: 22px 22px 24px; }
.perfil h3 { margin-bottom: 9px; }
.perfil p { font-size: .94rem; color: var(--gris); }

/* ---------- Zona ---------- */
.zona-caja {
    background: var(--tinta);
    border-radius: 20px;
    padding: 44px 44px 40px;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 44px;
    align-items: center;
}
.zona-caja h2 { color: #fff; margin-bottom: 14px; }
.zona-caja p { color: rgba(255, 255, 255, .72); }
.pueblos { display: flex; flex-wrap: wrap; gap: 9px; }
.pueblo {
    font-size: .88rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .9);
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gris-claro); }
.faq-boton {
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    font-family: var(--fuente);
    font-size: 1.04rem;
    font-weight: 800;
    color: var(--tinta);
    padding: 22px 44px 22px 0;
    cursor: pointer;
    position: relative;
    line-height: 1.4;
}
.faq-boton::after {
    content: '';
    position: absolute;
    right: 6px; top: 50%;
    width: 13px; height: 13px;
    margin-top: -7px;
    border-right: 2.5px solid var(--verde);
    border-bottom: 2.5px solid var(--verde);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.faq-item.abierto .faq-boton::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-respuesta { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-respuesta p { padding-bottom: 22px; color: var(--gris); font-size: .98rem; }

/* ---------- Contacto ---------- */
.contacto-rejilla { display: grid; grid-template-columns: 1fr 1.05fr; gap: 50px; align-items: start; }

.contacto-datos { display: flex; flex-direction: column; gap: 14px; margin: 28px 0 26px; }
.dato {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--gris-claro);
    border-radius: var(--radio-sm);
    padding: 15px 18px;
    transition: border-color .15s ease, transform .15s ease;
}
a.dato:hover { border-color: var(--verde); transform: translateX(3px); }
.dato-icono {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--verde-suave);
    color: var(--verde);
    display: grid;
    place-items: center;
    flex: none;
}
.dato-icono svg { width: 20px; height: 20px; }
.dato span { display: block; font-size: .8rem; color: var(--gris); }
.dato strong { font-size: 1.04rem; }

.formulario {
    background: #fff;
    border: 1px solid var(--gris-claro);
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--sombra);
}
.formulario h3 { margin-bottom: 6px; }
.form-nota { font-size: .9rem; color: var(--gris); margin-bottom: 22px; }
.campo { margin-bottom: 16px; }
.campo label {
    display: block;
    font-size: .86rem;
    font-weight: 800;
    color: var(--tinta);
    margin-bottom: 6px;
}
.campo input,
.campo select,
.campo textarea {
    width: 100%;
    font-family: var(--fuente);
    font-size: .98rem;
    color: var(--tinta);
    background: var(--fondo-suave);
    border: 1.5px solid var(--gris-claro);
    border-radius: var(--radio-sm);
    padding: 12px 14px;
    transition: border-color .15s ease, background .15s ease;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: none;
    border-color: var(--verde);
    background: #fff;
}
.campo textarea { resize: vertical; min-height: 96px; }
.campo-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-acciones { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.form-acciones .btn { width: 100%; }
.form-legal { font-size: .78rem; color: var(--gris); margin-top: 14px; line-height: 1.5; }
.form-legal a { color: var(--verde); text-decoration: underline; }

/* ---------- Llamada final ---------- */
.cta-final { background: var(--verde); color: #fff; text-align: center; }
.cta-final h2 { color: #fff; margin-bottom: 14px; }
.cta-final p { color: rgba(255, 255, 255, .85); max-width: 560px; margin: 0 auto 28px; font-size: 1.06rem; }
.cta-final-acciones { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; }
.cta-final .btn-linea { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.cta-final .btn-linea:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: rgba(255, 255, 255, .62); padding: 60px 0 0; font-size: .93rem; }
.pie-rejilla {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 44px;
    padding-bottom: 40px;
}
.pie img { height: 32px; width: auto; margin-bottom: 16px; }
.pie h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.pie ul { list-style: none; }
.pie li { margin-bottom: 9px; }
.pie a:hover { color: var(--verde-claro); }
.pie-bajo {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 20px 0 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: space-between;
    font-size: .84rem;
}
.pie-bajo a { text-decoration: underline; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.wa-flotante.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.wa-burbuja {
    background: #fff;
    border: 1px solid var(--gris-claro);
    box-shadow: var(--sombra);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--tinta);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px) scale(.96);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.wa-flotante.con-mensaje .wa-burbuja { opacity: 1; transform: translateX(0) scale(1); pointer-events: auto; }
.wa-cerrar {
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--gris);
    font-size: 1rem;
    line-height: 1;
    margin-left: 8px;
    padding: 0 2px;
}
.wa-boton {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--whatsapp);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 22px rgba(37, 211, 102, .42);
    transition: transform .18s ease;
}
.wa-boton:hover { transform: scale(1.07); }
.wa-boton svg { width: 31px; height: 31px; }

/* ---------- Barra móvil ---------- */
.barra-movil {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 95;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--gris-claro);
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    gap: 10px;
}
.barra-movil .btn { flex: 1; padding: 13px 10px; font-size: .97rem; }

/* ---------- Páginas legales ---------- */
.legal { padding: 60px 0 80px; max-width: 800px; }
.legal h1 { font-size: 2.1rem; margin-bottom: 10px; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 12px; }
.legal p, .legal li { font-size: .98rem; color: var(--texto); margin-bottom: 11px; }
.legal ul { padding-left: 22px; }
.legal .volver { display: inline-block; margin-bottom: 26px; font-weight: 800; color: var(--verde); }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
    .marca-texto { display: none; }
}
@media (max-width: 1100px) {
    .cabecera-acciones .tel-cabecera { display: none; }
    .nav { gap: 17px; }
    .nav a { font-size: .9rem; }
}

@media (max-width: 980px) {
    .hero-rejilla { grid-template-columns: 1fr; gap: 40px; }
    .hero-tarjeta { left: 14px; }
    .bloque { grid-template-columns: 1fr; gap: 32px; }
    .bloque.invertido .bloque-texto { order: initial; }
    .bloque.invertido .bloque-foto { order: -1; }
    .franja-rejilla { grid-template-columns: 1fr 1fr; gap: 22px; }
    .pasos { grid-template-columns: 1fr 1fr; }
    .perfiles { grid-template-columns: 1fr; }
    .zona-caja { grid-template-columns: 1fr; gap: 26px; padding: 34px 28px; }
    .contacto-rejilla { grid-template-columns: 1fr; gap: 36px; }
    .pie-rejilla { grid-template-columns: 1fr 1fr; gap: 30px; }

    .nav {
        position: absolute;
        top: 76px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--gris-claro);
        box-shadow: var(--sombra);
        padding: 8px 20px 18px;
        display: none;
    }
    .nav.abierto { display: flex; }
    .nav a { padding: 13px 0; border-bottom: 1px solid var(--fondo-suave); }
    .menu-btn { display: block; }
    .cabecera-acciones .tel-cabecera { display: none; }
    .cabecera-acciones .btn { display: none; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    section { padding: 60px 0; }
    .hero { padding: 48px 0 56px; }
    .franja-rejilla { grid-template-columns: 1fr; }
    .pasos { grid-template-columns: 1fr; }
    .campo-doble { grid-template-columns: 1fr; }
    .formulario { padding: 24px 20px; }
    .hero-acciones .btn, .cta-final-acciones .btn { flex: 1; min-width: 100%; }
    .hero-tarjeta { position: static; margin-top: 16px; max-width: none; }
    .pie-rejilla { grid-template-columns: 1fr; }
    .zona-caja { padding: 30px 22px; }

    .barra-movil { display: flex; }
    body { padding-bottom: 74px; }
    .wa-flotante { right: 16px; bottom: 86px; }
    .wa-boton { width: 52px; height: 52px; }
    .wa-boton svg { width: 28px; height: 28px; }
    .wa-burbuja { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
