/* autoconsumofotovoltaico.com — estilos añadidos (complementan index-*.css de Tailwind) */
:root{--verde:#1a7a4a;--verde-osc:#145c38;--azul:#0f2d4a;--amarillo:#f5a623;--gris:#6b7280;--gris-claro:#f4f6f8;--borde:#e5e7eb}
[hidden]{display:none!important}

/* Menú móvil */
#mnav{background:var(--azul);border-top:1px solid rgba(255,255,255,.12);padding:.5rem 1rem 1rem}
#mnav a{display:flex;align-items:center;min-height:48px;color:#fff;font-weight:500;border-bottom:1px solid rgba(255,255,255,.08);padding:0 .25rem}
#mnav a:last-child{border:0;margin-top:.75rem;justify-content:center;background:var(--verde);border-radius:.5rem;font-weight:700}
@media (min-width:1024px){#mnav{display:none!important}}

/* Preguntas frecuentes (details/summary) */
.faq-item{border-bottom:1px solid var(--borde)}
.faq-item>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.1rem 0;font-weight:600;color:var(--azul);font-size:1.075rem;min-height:56px}
.faq-item>summary::-webkit-details-marker{display:none}
.faq-item>summary::after{content:"";flex:none;width:.6rem;height:.6rem;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s;margin-right:.35rem}
.faq-item[open]>summary::after{transform:rotate(-135deg)}
.faq-item .faq-a{padding:0 0 1.25rem;color:#374151;line-height:1.7;font-size:1rem}

/* Estado de formularios */
.fs-status{font-size:1rem;line-height:1.5}
.fs-status:empty{display:none}
.fs-status.ok{background:#e8f5ee;color:var(--verde-osc);border:1px solid #b7e0c8;border-radius:.75rem;padding:1rem;font-weight:600}
.fs-status.err{background:#fdecec;color:#9b1c1c;border:1px solid #f5c2c2;border-radius:.75rem;padding:1rem}
.fs-legal{font-size:.8rem;color:var(--gris);line-height:1.5}
.fs-legal a{color:var(--verde);text-decoration:underline}
select.af-select{appearance:auto}

/* Calculadoras */
.calc-out:empty{display:none}
.calc-out,#calc-adv-out{margin-top:1.5rem}
.calc-title{font-weight:700;color:var(--azul);font-size:1.25rem;margin-bottom:.75rem}
.calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:1rem;margin-bottom:1.25rem}
.calc-grid>div{background:#e8f5ee;border-radius:1rem;padding:1.1rem;text-align:center}
.calc-grid b{display:block;font-size:1.75rem;color:var(--verde);line-height:1.2}
.calc-grid span{font-size:.9rem;color:var(--gris)}
.calc-cta{display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:52px;padding:.75rem 1.25rem;line-height:1.3;border-radius:.75rem;background:var(--verde);color:#fff;font-weight:700;width:100%}
.calc-cta:hover{background:var(--verde-osc)}
.calc-err{color:#9b1c1c;font-weight:600}
.calc-note{color:#374151;line-height:1.6;margin-bottom:1.25rem}

/* Contenido editorial (los artículos no tenían estilos tipográficos) */
.prose{color:#1f2937;font-size:1.125rem;line-height:1.75}
.prose>*+*{margin-top:1.1em}
.prose .lead{font-size:1.3rem;color:#374151;line-height:1.65}
.prose h2{font-size:1.75rem;font-weight:700;color:var(--azul);line-height:1.3;margin-top:2.2em}
.prose h3{font-size:1.3rem;font-weight:700;color:var(--azul);line-height:1.35;margin-top:1.8em}
.prose a{color:var(--verde);text-decoration:underline;text-underline-offset:2px;font-weight:500}
.prose ul,.prose ol{padding-left:1.4em}
.prose ul{list-style:disc}.prose ol{list-style:decimal}
.prose li+li{margin-top:.4em}
.prose strong{color:#111827}
.prose small{font-size:.85rem;color:var(--gris)}
@media (min-width:768px){.prose{font-size:1.2rem}.prose h2{font-size:2rem}}

/* Tablas y bloques de datos */
.af-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:1.5rem 0;border:1px solid var(--borde);border-radius:.75rem}
.af-table{width:100%;border-collapse:collapse;font-size:.95rem}
@media (max-width:640px){.af-table th,.af-table td{padding:.6rem .7rem;font-size:.9rem}}
.af-table th{background:var(--azul);color:#fff;text-align:left;font-weight:600;padding:.75rem 1rem}
.af-table td{padding:.7rem 1rem;border-top:1px solid var(--borde);vertical-align:top}
.af-table tr:nth-child(even) td{background:#fafbfc}
.af-box{border-radius:1rem;padding:1.25rem 1.4rem;margin:1.5rem 0;line-height:1.65}
.af-box.info{background:#eef5fb;border-left:4px solid #2b6cb0}
.af-box.ok{background:#e8f5ee;border-left:4px solid var(--verde)}
.af-box.warn{background:#fff7e8;border-left:4px solid var(--amarillo)}
.af-box p+p{margin-top:.6em}
.af-src{font-size:.85rem;color:var(--gris)}
.af-src a{color:var(--gris)}
.af-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin:1.5rem 0}
.af-card{background:var(--gris-claro);border-radius:1rem;padding:1.1rem 1.2rem}
.af-card b{display:block;font-size:1.6rem;color:var(--verde);line-height:1.2}
.af-card span{font-size:.92rem;color:#4b5563}
.af-steps{counter-reset:s;list-style:none!important;padding-left:0!important}
.af-steps li{counter-increment:s;position:relative;padding-left:3rem;min-height:2.25rem}
.af-steps li::before{content:counter(s);position:absolute;left:0;top:0;width:2.1rem;height:2.1rem;border-radius:50%;background:var(--verde);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;font-size:1rem}
.af-cta{background:var(--azul);color:#fff;border-radius:1.25rem;padding:1.75rem 1.5rem;margin:2.5rem 0;text-align:center}
.af-cta p{color:#d1d9e2;margin:.5rem 0 1.25rem}
.af-cta strong{color:#fff;font-size:1.4rem;display:block}
.af-cta a{display:inline-flex;align-items:center;min-height:52px;padding:0 1.75rem;border-radius:.75rem;background:var(--verde);color:#fff!important;font-weight:700;text-decoration:none!important}
.af-cta a:hover{background:var(--verde-osc)}

/* Sección local añadida en páginas de provincia */
.af-local{background:#fff;padding:3rem 0}
.af-local .af-inner{max-width:64rem;margin:0 auto;padding:0 1rem}
.af-local h2{font-size:1.9rem;font-weight:700;color:var(--azul);margin-bottom:1rem;line-height:1.25}
.af-local h3{font-size:1.25rem;font-weight:700;color:var(--azul);margin:2rem 0 .75rem}
.af-local p{color:#374151;line-height:1.75;font-size:1.075rem}
.af-local p+p{margin-top:.8em}
@media (min-width:768px){.af-local{padding:4.5rem 0}.af-local h2{font-size:2.25rem}}

/* Formulario de la calculadora avanzada */
.af-form{display:grid;gap:1rem;background:var(--gris-claro);border-radius:1.25rem;padding:1.5rem}
.af-form label{font-weight:700;color:var(--azul);display:block;margin-bottom:.4rem}
.af-form input[type=number],.af-form select{width:100%;min-height:48px;border:1px solid #d1d5db;border-radius:.6rem;padding:0 .9rem;font-size:1rem;background:#fff}
.af-form .af-check{display:flex;gap:.6rem;align-items:center;font-weight:600;color:var(--azul)}
.af-form .af-check input{width:1.3rem;height:1.3rem}
.af-form button{min-height:52px;padding:0 1.5rem;border-radius:.75rem;background:var(--verde);color:#fff;font-weight:700;font-size:1.1rem}
.af-form button:hover{background:var(--verde-osc)}
@media (min-width:768px){.af-form{grid-template-columns:1fr 1fr}.af-form .af-full{grid-column:1/-1}}

/* Páginas nuevas */
.af-hero{background:var(--azul);color:#fff;padding:3rem 0 3.25rem}
.af-hero .af-inner{max-width:56rem;margin:0 auto;padding:0 1rem}
.af-kicker{display:inline-block;background:rgba(245,166,35,.15);color:var(--amarillo);font-weight:700;font-size:.85rem;border-radius:999px;padding:.35rem .9rem;margin-bottom:1rem}
.af-hero h1{font-size:2.25rem;line-height:1.15;font-weight:800;margin-bottom:1rem}
.af-hero p{font-size:1.15rem;line-height:1.6;color:#d6dee8;max-width:46rem}
.af-hero .af-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.75rem}
.af-btn,.af-btn-ghost{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 1.5rem;border-radius:.75rem;font-weight:700;font-size:1.05rem}
.af-btn{background:var(--verde);color:#fff}.af-btn:hover{background:var(--verde-osc)}
.af-btn-ghost{border:2px solid rgba(255,255,255,.45);color:#fff}.af-btn-ghost:hover{background:#fff;color:var(--azul)}
@media (min-width:768px){.af-hero{padding:4.5rem 0}.af-hero h1{font-size:3rem}.af-hero p{font-size:1.3rem}}
.af-crumbs{background:var(--gris-claro);border-bottom:1px solid var(--borde);font-size:.95rem}
.af-crumbs .af-inner{max-width:72rem;margin:0 auto;padding:.9rem 1rem;color:var(--gris);display:flex;flex-wrap:wrap;gap:.5rem}
.af-crumbs a:hover{color:var(--verde)}
.af-main{background:#fff;padding:2.5rem 0 3.5rem}
.af-main .af-inner{max-width:48rem;margin:0 auto;padding:0 1rem}
.af-updated{color:var(--gris);font-size:.95rem;margin-bottom:1.5rem}
.af-faq{margin-top:3rem}
.af-faq h2{font-size:1.75rem;font-weight:700;color:var(--azul);margin-bottom:.5rem}
.af-formbox{margin-top:3rem;background:var(--gris-claro);border-radius:1.25rem;padding:1.75rem 1.25rem;scroll-margin-top:90px}
.af-formbox h2{font-size:1.75rem;font-weight:700;color:var(--azul)}
.af-formbox>p{color:#4b5563;margin:.35rem 0 1.25rem}
.af-lead{display:grid;gap:1rem}
.af-lead label{display:block;font-weight:700;color:var(--azul);margin-bottom:.35rem}
.af-lead input:not([type=checkbox]),.af-lead select,.af-lead textarea{width:100%;min-height:48px;border:1px solid #d1d5db;border-radius:.6rem;padding:.6rem .9rem;font-size:1rem;background:#fff;color:#111827}
.af-lead textarea{min-height:96px}
.af-lead .af-consent{display:flex;gap:.7rem;align-items:flex-start;font-size:.95rem;color:#4b5563;line-height:1.5}
.af-lead .af-consent input{width:1.35rem;height:1.35rem;flex:none;margin-top:.15rem}
.af-lead .af-consent a{color:var(--verde);text-decoration:underline}
.af-lead button{min-height:56px;border-radius:.75rem;background:var(--verde);color:#fff;font-weight:700;font-size:1.15rem}
.af-lead button:hover{background:var(--verde-osc)}
.af-lead button[disabled]{opacity:.6}
@media (min-width:768px){.af-formbox{padding:2.25rem}.af-lead{grid-template-columns:1fr 1fr}.af-lead .af-full{grid-column:1/-1}}
.af-related{margin-top:3rem;display:grid;gap:.75rem}
.af-related a{display:block;border:1px solid var(--borde);border-radius:.9rem;padding:1rem 1.2rem;font-weight:600;color:var(--azul)}
.af-related a:hover{border-color:var(--verde);color:var(--verde)}
.af-related a span{display:block;font-weight:400;color:var(--gris);font-size:.95rem;margin-top:.2rem}
.af-404{padding:5rem 1rem;text-align:center}
.af-404 h1{font-size:2.5rem;font-weight:800;color:var(--azul);margin-bottom:1rem}
.af-404 p{color:#4b5563;font-size:1.15rem;margin-bottom:2rem}
.af-404 .af-links{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:center;margin-top:1.5rem}
.af-404 .af-links a{border:1px solid var(--borde);border-radius:999px;padding:.6rem 1.1rem;color:var(--azul);font-weight:500}

.af-local a,.af-local p a{color:var(--verde);text-decoration:underline;text-underline-offset:2px;font-weight:500}

/* Formulario en 2 pasos */
.fs-step1,.fs-step2{display:grid;gap:1.1rem}
.fs-head{font-weight:700;color:var(--azul);font-size:1.05rem}
.fs-head span{display:inline-block;background:var(--verde);color:#fff;border-radius:999px;padding:.15rem .7rem;font-size:.8rem;margin-right:.5rem;vertical-align:middle}
.fs-back{background:none;border:0;color:var(--gris);text-decoration:underline;font-size:.95rem;justify-self:start;padding:.25rem 0;min-height:auto!important}
.af-lead .fs-step1,.af-lead .fs-step2{grid-column:1/-1}
@media (min-width:768px){.af-lead .fs-step1{grid-template-columns:1fr 1fr}.af-lead .fs-step1>.fs-head,.af-lead .fs-step1>.fs-next,.af-lead .fs-step1>.fs-status{grid-column:1/-1}
.af-lead .fs-step2{grid-template-columns:1fr 1fr}.af-lead .fs-step2>*{grid-column:auto}.af-lead .fs-step2>.fs-head,.af-lead .fs-step2>.af-full,.af-lead .fs-step2>.fs-back{grid-column:1/-1}}
.fs-next{font-size:1.15rem!important;font-weight:700!important;padding-top:1rem!important;padding-bottom:1rem!important}
