/*
Theme Name: Alonso Electricidad
Description: Sitio corporativo de servicios eléctricos, con asistente de contenido y contacto.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Author: Alonso Electricidad
License: GNU General Public License v2 or later
Text Domain: alonso-electricidad
*/
:root {
    --ink: #162a29;
    --muted: #4b6260;
    --dark: #102c2a;
    --teal: #006b67;
    --bright: #66e4d1;
    --surface: #edf6f3;
    --paper: #fbfdfc;
    --line: #d8e6e2;
    --radius: 18px;
    color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid #00a58e; outline-offset: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.65rem, 7vw, 4.55rem); letter-spacing: -.067em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.052em; }
h3 { font-size: 1.23rem; letter-spacing: -.024em; }
[hidden] { display: none !important; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: 10px; left: 16px; z-index: 10; transform: translateY(-150%); background: white; padding: 10px 16px; }
.skip-link:focus { transform: translateY(0); }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-block; flex-shrink: 0; }
.brand img { width: 208px; height: auto; }
.nav ul, .site-footer ul { list-style: none; margin: 0; padding: 0; }
.nav > ul, .nav > div > ul { display: flex; flex-wrap: wrap; gap: 27px; }
.nav li { position: relative; }
.nav a { text-decoration: none; color: var(--ink); font-size: .94rem; font-weight: 650; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; }
.nav .sub-menu { padding: 6px 0 0 14px; }
.menu-toggle { display: none; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: .72em 1.1em; border: 1px solid transparent; border-radius: 9px; background: var(--teal); color: white; text-decoration: none; font-weight: 720; line-height: 1.25; cursor: pointer; }
.button svg, .text-link svg, .menu-toggle svg, .service-arrow svg { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -.12em; }
.button:hover { background: #00534f; }
.button-small { font-size: .9rem; }
.button-light { border-color: var(--line); background: white; color: var(--teal); }
.button-light:hover { background: var(--surface); }
.button-outline { background: transparent; color: white; border-color: #537775; }
.button-outline:hover { background: #254b48; }
.actions { display: flex; flex-wrap: wrap; gap: 11px; margin: 22px 0; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--teal); font-size: .73rem; font-weight: 800; letter-spacing: .13em; line-height: 1.45; text-transform: uppercase; margin-bottom: 13px; }
.eyebrow > span { width: 8px; height: 8px; flex-shrink: 0; border-radius: 3px; background: #129f90; }
.hero { padding: 50px 0; background: radial-gradient(ellipse at 15% 8%, #1a4842, transparent 53%), var(--dark); color: #fff; }
.hero-inner { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: clamp(28px, 5vw, 74px); }
.hero-copy { padding-block: 26px; }
.hero-copy .eyebrow, .cta-panel .eyebrow { color: var(--bright); }
.hero h1 { font-size: clamp(3.2rem, 6.45vw, 6.25rem); margin-bottom: 20px; line-height: .99; }
.hero h1 span { color: var(--bright); }
.hero p { color: #d3e5e0; font-size: clamp(1.06rem, 2vw, 1.28rem); max-width: 32ch; }
.hero .button:not(.button-outline), .cta-panel .button { background: var(--bright); color: #10312c; }
.hero .button:not(.button-outline):hover, .cta-panel .button:hover { background: #92f1e2; }
.hero-note { color: #c5dad3; font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.hero-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--bright); }
.hero-media { position: relative; margin: 0; border-radius: 20px; overflow: hidden; background: #315551; }
.hero-media img { width: 100%; height: auto; aspect-ratio: 1.23; object-fit: cover; object-position: 64% 50%; }
.hero-media figcaption { position: absolute; bottom: 16px; left: 16px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: #fff; background: #102c2a; font-size: .84rem; font-weight: 700; }
.hero-media figcaption svg { display: block; width: 18px; height: 18px; color: var(--bright); }
.audiences { background: var(--surface); border-bottom: 1px solid var(--line); }
.audience-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.audience-inner > span { padding: 19px 14px; text-align: center; font-size: .96rem; font-weight: 720; }
.audience-inner > span + span { border-left: 1px solid var(--line); }
.audience-inner i { color: var(--teal); font-style: normal; font-size: .72rem; font-weight: 800; margin-right: .65em; }
.section { padding-block: clamp(46px, 7vw, 86px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p { color: var(--muted); max-width: 34ch; margin: 0; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service-card { display: block; background: white; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; }
a.service-card:hover { border-color: #70a9a2; background: #f6fbf9; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--muted); margin-bottom: 0; }
.service-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.service-icon { display: inline-grid; place-items: center; width: 47px; height: 47px; border-radius: 12px; background: #e4f5ee; color: var(--teal); }
.service-arrow { color: var(--teal); font-size: 1.2rem; }
.service-help { background: var(--surface); }
.text-link { display: inline-block; margin-top: .8em; font-weight: 750; }
.process { background: var(--surface); border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 0; margin: 31px 0 0; list-style: none; }
.steps li { border-top: 2px solid #add5c8; padding-top: 14px; }
.steps li > span { display: block; margin-bottom: 9px; color: var(--teal); font-size: .83rem; font-weight: 800; }
.steps p { color: var(--muted); }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(27px, 5vw, 65px); align-items: start; }
.coverage { background: #e6f2ee; border: 1px solid var(--line); padding: clamp(21px, 4vw, 40px); border-radius: var(--radius); }
.coverage .service-icon { margin-bottom: 15px; background: #d0ebe1; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 9px 0 4px; color: var(--muted); }
.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: var(--dark); color: #fff; padding: clamp(23px, 4vw, 44px); border-radius: var(--radius); margin-top: 34px; }
.cta-panel h2 { margin-bottom: 8px; }
.cta-panel p { color: #d3e5e0; margin: 0; }
.cta-panel .button { flex-shrink: 0; }
.final-cta { padding-bottom: 72px; }
.final-cta .cta-panel { margin-top: 0; }
.site-footer { background: var(--dark); color: #d5e6e1; padding-top: 38px; }
.site-footer a { color: #edf8f4; }
.site-footer p { margin-top: 10px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; padding-bottom: 24px; }
.footer-legal { display: flex; flex-direction: column; gap: 5px; }
.footer-bottom { padding: 13px 0 17px; border-top: 1px solid #42615c; font-size: .84rem; }
.page-heading { background: var(--surface); padding-block: clamp(37px, 7vw, 75px); border-bottom: 1px solid var(--line); }
.page-heading p { max-width: 64ch; font-size: 1.13rem; color: var(--muted); margin-bottom: 0; }
.page-heading h1 { margin-bottom: .22em; }
.article-body { padding-block: clamp(36px, 6vw, 70px); min-height: 30vh; }
.article-body > p, .article-body > ul, .article-body > ol, .article-body > article > p, .article-body > article > ul { max-width: 72ch; }
.article-body > h2, .article-body > article > h2 { margin-top: 1.35em; font-size: clamp(1.55rem, 3vw, 2.18rem); }
.article-body > h2:first-child { margin-top: 0; }
.article-body .service-card h2 { font-size: 1.45rem; }
.article-body .service-card h2 a { color: inherit; }
.towns { display: flex; flex-wrap: wrap; list-style: none; gap: 8px; padding: 0; }
.towns li { background: var(--surface); padding: .4em .75em; border-radius: 7px; }
.contact-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 18px; }
.contact-aside, .contact-form { padding: clamp(19px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-aside { background: var(--surface); }
.contact-form { background: white; }
.contact-grid h2 { font-size: clamp(1.5rem, 3vw, 2.18rem); }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-fields label { display: grid; gap: 5px; font-weight: 680; }
.field-wide { grid-column: 1 / -1; }
.form-fields input, .form-fields textarea, .form-fields select { width: 100%; color: var(--ink); background: #f9fcfb; border: 1px solid #8aa7a1; border-radius: 8px; padding: .65em .75em; }
.form-fields textarea { resize: vertical; }
.privacy-check { display: flex; align-items: start; gap: 10px; margin: 14px 0; font-size: .88rem; }
.privacy-check input { margin-top: .35em; }
.form-status { border-left: 3px solid #95652e; padding: 9px 12px; background: #fbf0de; }
.form-status.is-sent { border-color: var(--teal); background: var(--surface); }
.trap, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 980px) {
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .header-cta { display: none; }
    .hero-inner { gap: 25px; }
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .wrap { width: calc(100% - 36px); }
    .header-inner { min-height: 72px; padding-block: 12px; }
    .brand img { width: 165px; }
    .menu-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 43px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-weight: 650; cursor: pointer; }
    .nav { flex-basis: 100%; }
    .nav.enhanced:not(.open) { display: none; }
    .nav > ul, .nav > div > ul { display: grid; gap: 4px; padding-block: 6px; }
    .nav a { display: inline-block; padding: 5px 0; }
    .hero { padding: 27px 0 24px; }
    .hero-copy { padding: 4px 0 0; }
    .hero-inner, .split, .contact-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: clamp(2.9rem, 12vw, 4.5rem); }
    .hero-media img { aspect-ratio: 1.62; }
    .audience-inner > span { padding: 12px 3px; font-size: .77rem; }
    .audience-inner i { display: block; margin: 0; }
    .section-heading, .cta-panel { align-items: flex-start; flex-direction: column; }
    .service-card { padding: 17px; }
    .steps { grid-template-columns: 1fr; gap: 11px; }
    .steps p { margin-bottom: 6px; }
    .final-cta { padding-bottom: 43px; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 12px; }
    .footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 390px) {
    .service-grid, .form-fields { grid-template-columns: 1fr; }
}
