/*
Theme Name: Todo Solar
Theme URI: https://todosolarresidencial.com
Author: Todo Solar Residencial
Description: Tema editorial de Todo Solar Residencial, portado desde el diseño original (Lovable): portada con categorías, guías esenciales, calculadora de ahorro, preguntas frecuentes, biblioteca de guías y artículos con índice. Compatible con Site Kit, AdSense y plugins de cookies.
Version: 2.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: todo-solar
*/

:root {
 --background: oklch(0.991 0.002 100);
 --foreground: oklch(0.25 0.025 160);
 --card: oklch(1 0 0);
 --primary: oklch(0.38 0.073 163);
 --primary-foreground: oklch(1 0 0);
 --secondary: oklch(0.958 0.013 150);
 --muted: oklch(0.964 0.005 100);
 --muted-foreground: oklch(0.52 0.018 160);
 --accent: oklch(0.95 0.032 148);
 --border: oklch(0.90 0.01 150);
 --sun: oklch(0.88 0.13 94);
 --destructive: oklch(0.53 0.18 28);
 --hero-foreground: oklch(1 0 0);
 --hero-overlay: linear-gradient(90deg, oklch(0.16 0.032 158 / 84%) 0%, oklch(0.17 0.025 158 / 66%) 34%, oklch(0.17 0.02 158 / 12%) 70%, oklch(0.17 0.02 158 / 2%) 100%);
 --soft-shadow: 0 8px 26px oklch(0.25 0.025 160 / 6%);
 --radius: 6px;
}
:root{--font-sans:'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;--font-heading:'Manrope','DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif}
.site-container { max-width: 1232px; padding: 0 32px; margin: 0 auto; }
.site-header { height: 91px; border-bottom: 1px solid var(--border); background: var(--card); position: relative; z-index: 20; }
.site-header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display:flex; align-items:center; gap:10px; color:var(--primary); flex-shrink:0; }
.brand-symbol { width:40px; height:40px; stroke-width:1.6; }
.brand-name { font-family:var(--font-heading); font-size:22px; line-height:1.05; font-weight:800; }
.brand-sub { display:block; font-family:var(--font-sans); font-size:10px; font-weight:500; text-transform:uppercase; letter-spacing:3px; margin-top:7px; }
.desktop-nav { display:flex; align-items:center; gap:28px; font-size:13px; font-weight:500; }
.desktop-nav a:hover, .desktop-nav a[data-status=active], .desktop-nav .current-menu-item > a, .desktop-nav .current_page_item > a { color:var(--primary); }
.mobile-menu { display:none; }
.hero { position:relative; min-height:574px; display:flex; align-items:center; overflow:hidden; color:var(--hero-foreground); }
.hero-image { position:absolute; width:100%; height:100%; object-fit:cover; object-position:center 57%; inset:0; }
.hero::after { content:''; position:absolute; inset:0; background:var(--hero-overlay); }
.hero-content { position:relative; z-index:1; width:100%; padding-top:55px; padding-bottom:55px; }
.hero-eyebrow { display:inline-flex; align-items:center; gap:8px; color:var(--sun); font-size:10px; letter-spacing:1.8px; font-weight:600; text-transform:uppercase; margin-bottom:23px; }
.hero h1 { font-size:58px; line-height:1.14; font-weight:650; max-width:620px; margin:0; }
.hero h1 span { color:var(--sun); }
.hero-description { font-size:16px; line-height:1.75; opacity:.88; max-width:450px; margin:22px 0 28px; }
.hero-actions { display:flex; gap:13px; flex-wrap:wrap; }
.hero-note { display:flex; gap:8px; align-items:center; font-size:11px; margin-top:26px; opacity:.8; }
.hero-button { background:var(--sun); color:var(--foreground); box-shadow:none; height:46px; padding:0 23px; }
.hero-button:hover { background:var(--sun); filter:brightness(.95); }
.hero-outline { border:1px solid oklch(1 0 0 / 45%); background:oklch(1 0 0 / 5%); color:var(--hero-foreground); height:46px; padding:0 21px; }
.hero-outline:hover { background:oklch(1 0 0 / 12%); }
.trust-band { background:var(--card); border-bottom:1px solid var(--border); }
.trust-inner { display:grid; grid-template-columns:repeat(3,1fr); padding-top:22px; padding-bottom:22px; }
.trust-item { display:flex; align-items:center; justify-content:center; gap:13px; font-size:12px; }
.trust-item + .trust-item { border-left:1px solid var(--border); }
.trust-item svg { width:22px; height:22px; color:var(--primary); stroke-width:1.5; }
.trust-item strong { display:block; font-size:12px; font-weight:600; }
.trust-item span { display:block; margin-top:3px; font-size:10px; color:var(--muted-foreground); }
.section { padding-top:58px; padding-bottom:58px; }
.section-eyebrow { color:var(--primary); text-transform:uppercase; letter-spacing:1.7px; font-size:10px; font-weight:700; margin-bottom:12px; display:block; }
.section-header { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:28px; }
.section-title { font-size:31px; font-weight:650; line-height:1.3; margin:0; }
.section-intro { color:var(--muted-foreground); font-size:13px; margin-top:9px; line-height:1.65; }
.category-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:17px; }
.category-item { border:1px solid var(--border); background:var(--card); padding:24px 22px 21px; border-radius:6px; position:relative; transition:transform .2s, border-color .2s; }
.category-item:hover { transform:translateY(-3px); border-color:var(--primary); }
.category-icon { width:43px; height:43px; display:flex; align-items:center; justify-content:center; border-radius:6px; background:var(--secondary); color:var(--primary); margin-bottom:19px; }
.category-item:nth-child(2) .category-icon { background:oklch(0.96 0.049 93); color:oklch(0.48 0.09 83); }
.category-item:nth-child(3) .category-icon { background:oklch(0.95 0.024 228); color:oklch(0.43 0.085 224); }
.category-item:nth-child(4) .category-icon { background:oklch(0.95 0.028 60); color:oklch(0.47 0.08 52); }
.category-item h3 { font-size:15px; font-weight:700; margin-bottom:8px; }
.category-item p { font-size:12px; line-height:1.7; color:var(--muted-foreground); padding-right:8px; }
.category-arrow { position:absolute; top:29px; right:21px; width:16px; color:var(--muted-foreground); }
.guides-section { padding-top:10px; }
.guide-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.guide-card { background:var(--card); border:1px solid var(--border); border-radius:6px; overflow:hidden; display:flex; flex-direction:column; transition:box-shadow .2s; }
.guide-card:hover { box-shadow:var(--soft-shadow); }
.guide-image-wrap { aspect-ratio:1.72; overflow:hidden; position:relative; }
.guide-image { height:100%; width:100%; object-fit:cover; transition:transform .4s; }
.guide-card:hover .guide-image { transform:scale(1.035); }
.image-tag { position:absolute; top:15px; left:15px; background:var(--card); color:var(--primary); border-radius:3px; padding:5px 9px; font-size:9px; font-weight:700; }
.guide-body { padding:23px; flex:1; display:flex; flex-direction:column; }
.guide-category { text-transform:uppercase; font-size:9px; letter-spacing:1px; color:var(--primary); font-weight:700; margin-bottom:11px; }
.guide-title { font-size:19px; font-weight:650; line-height:1.45; margin-bottom:11px; }
.guide-excerpt { font-size:12px; color:var(--muted-foreground); line-height:1.75; margin-bottom:22px; }
.guide-bottom { margin-top:auto; display:flex; justify-content:space-between; align-items:center; padding-top:14px; border-top:1px solid var(--border); color:var(--muted-foreground); font-size:10px; }
.guide-bottom span { display:flex; align-items:center; gap:5px; }
.calculator-band { background:var(--secondary); border-block:1px solid var(--border); padding:51px 0; }
.calculator-layout { display:grid; grid-template-columns:1fr 1.15fr; align-items:center; gap:65px; }
.calculator-copy h2 { font-size:33px; font-weight:650; line-height:1.35; margin-bottom:17px; }
.calculator-copy p { font-size:13px; line-height:1.8; color:var(--muted-foreground); margin-bottom:20px; }
.calc-tool { background:var(--card); border:1px solid var(--border); border-radius:7px; padding:25px; }
.calc-heading { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:600; margin-bottom:20px; }
.calc-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field-label { display:block; font-size:11px; color:var(--muted-foreground); margin-bottom:7px; }
.field-control { width:100%; border:1px solid var(--border); border-radius:4px; padding:9px 11px; color:var(--foreground); background:var(--background); outline:none; font-size:13px; }
.field-control:focus { border-color:var(--primary); box-shadow:0 0 0 1px var(--primary); }
.calc-result { background:var(--secondary); padding:17px 20px; border-radius:4px; display:flex; justify-content:space-between; gap:16px; margin-top:20px; }
.calc-result-label { font-size:10px; color:var(--muted-foreground); }
.calc-result-value { font-family:var(--font-heading); color:var(--primary); font-size:28px; font-weight:700; margin-top:3px; }
.calc-result-value small { font:400 11px var(--font-sans); }
.calc-disclaimer { margin-top:11px; font-size:9px; color:var(--muted-foreground); line-height:1.6; }
.filter-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:23px 0; }
.filter-active { background:var(--primary); color:var(--primary-foreground); }
.filter-active:hover { background:var(--primary); color:var(--primary-foreground); }
.latest-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:0 40px; }
.latest-item { display:flex; gap:20px; padding:22px 0; border-bottom:1px solid var(--border); }
.latest-image { width:133px; height:106px; flex-shrink:0; object-fit:cover; border-radius:4px; }
.latest-title { font-size:16px; line-height:1.5; font-weight:650; margin:7px 0 10px; }
.latest-meta { font-size:10px; color:var(--muted-foreground); display:flex; align-items:center; gap:5px; }
.faq-section { background:var(--muted); border-top:1px solid var(--border); }
.faq-layout { display:grid; grid-template-columns:1fr 1.5fr; gap:75px; }
.faq-list details { border-bottom:1px solid var(--border); padding:18px 0; }
.faq-list details:first-child { padding-top:0; }
.faq-list summary { cursor:pointer; font-size:14px; font-weight:500; list-style:none; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.faq-list summary::-webkit-details-marker { display:none; }
.faq-list details[open] summary svg { transform:rotate(45deg); }
.faq-list p { color:var(--muted-foreground); font-size:13px; line-height:1.85; padding-top:15px; padding-right:25px; }
.site-footer { background:var(--primary); color:var(--primary-foreground); padding:47px 0 0; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1.2fr; gap:40px; padding-bottom:37px; }
.site-footer .brand { color:var(--primary-foreground); }
.footer-description { font-size:11px; line-height:1.9; opacity:.7; margin-top:20px; max-width:275px; }
.footer-title { font-size:12px; font-weight:600; margin-bottom:18px; }
.footer-links { display:flex; flex-direction:column; gap:12px; font-size:11px; }
.footer-links a { opacity:.7; }
.footer-links a:hover { opacity:1; }
.footer-bottom { border-top:1px solid oklch(1 0 0 / 15%); padding:20px 0; display:flex; justify-content:space-between; gap:15px; font-size:10px; opacity:.65; }
.page-heading { background:var(--secondary); padding:55px 0; border-bottom:1px solid var(--border); }
.page-heading h1 { font-size:42px; line-height:1.25; font-weight:650; max-width:800px; }
.page-heading p { max-width:680px; color:var(--muted-foreground); font-size:15px; line-height:1.8; margin-top:16px; }
.breadcrumbs { display:flex; gap:8px; align-items:center; color:var(--muted-foreground); font-size:11px; margin-bottom:22px; flex-wrap:wrap; }
.article-layout { display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:65px; padding-block:43px 70px; }
.article-cover { width:100%; max-height:380px; aspect-ratio:1.8; object-fit:cover; border-radius:6px; margin-bottom:30px; }
.article-prose { font-size:15px; line-height:1.95; }
.article-prose p { margin-bottom:19px; }
.article-prose h2 { font-size:25px; font-weight:650; line-height:1.4; margin:35px 0 16px; }
.article-prose h3 { font-size:18px; font-weight:650; margin:25px 0 13px; }
.article-prose ul,.article-prose ol { padding-left:23px; margin:16px 0 24px; }
.article-prose ul { list-style:disc; }
.article-prose ol { list-style:decimal; }
.article-prose li { padding:4px 0; }
.article-prose a { color:var(--primary); text-decoration:underline; text-underline-offset:3px; }
.article-aside { align-self:start; position:sticky; top:25px; font-size:12px; }
.article-aside h3 { font-size:13px; font-weight:700; margin-bottom:16px; }
.article-aside a { display:block; padding:10px 0; border-bottom:1px solid var(--border); color:var(--muted-foreground); line-height:1.7; }
.article-aside a:hover { color:var(--primary); }
.editorial-note { border-left:3px solid var(--primary); background:var(--secondary); padding:19px 22px; margin:27px 0; font-size:13px; line-height:1.85; }
.reading-meta { display:flex; gap:18px; font-size:11px; color:var(--muted-foreground); margin-top:23px; flex-wrap:wrap; }
.reading-meta span { display:flex; align-items:center; gap:5px; }
.simple-page { max-width:820px; padding-top:45px; padding-bottom:70px; }
.search-field { position:relative; max-width:500px; margin-top:25px; }
.search-field svg { position:absolute; left:13px; top:12px; width:17px; color:var(--muted-foreground); }
.search-field input { padding-left:40px; }
.empty-results { grid-column:1/-1; padding:35px 0; color:var(--muted-foreground); }
@media(min-width:1600px) { .hero { min-height:610px; } }
@media(max-width:1050px) { .desktop-nav { gap:18px; } .desktop-nav .about-nav { display:none; } .hero h1 { font-size:51px; } .calculator-layout { gap:35px; } .footer-grid { gap:24px; } }
@media(max-width:760px) {
 .site-container { padding-inline:22px; } .site-header { height:76px; } .brand-name { font-size:20px; } .brand-symbol { width:34px; height:34px; } .brand-sub { font-size:8px; }
 .desktop-nav { display:none; } .mobile-menu { display:block; } .mobile-nav { position:absolute; left:0; right:0; top:75px; padding:18px 22px; background:var(--card); border-bottom:1px solid var(--border); box-shadow:var(--soft-shadow); display:flex; flex-direction:column; gap:19px; font-size:14px; }
 .hero { min-height:551px; } .hero h1 { font-size:40px; max-width:450px; } .hero-content { padding-block:46px; } .hero-image { object-position:60% center; } .hero::after { background:linear-gradient(90deg,oklch(0.16 0.03 158 / 85%),oklch(0.16 0.03 158 / 50%)); } .hero-description { font-size:14px; max-width:340px; } .hero-eyebrow { font-size:9px; }
 .trust-inner { gap:12px; padding-block:19px; } .trust-item { justify-content:flex-start; gap:7px; } .trust-item + .trust-item { border:0; } .trust-item svg { width:18px; flex-shrink:0; } .trust-item strong { font-size:10px; } .trust-item span { display:none; }
 .section { padding-block:38px; } .section-title { font-size:27px; } .section-header { align-items:start; } .section-header .view-all { font-size:11px; padding-inline:0; } .category-grid { grid-template-columns:repeat(2,1fr); gap:12px; } .category-item { padding:20px 16px; } .category-item h3 { font-size:13px; } .category-item p { font-size:11px; } .category-arrow { right:14px; top:23px; } .category-icon { margin-bottom:16px; }
 .guide-grid { grid-template-columns:1fr; gap:22px; } .guides-section { padding-top:7px; } .guide-title { font-size:20px; } .guide-body { padding:22px; } .guide-excerpt { font-size:13px; } .guide-image-wrap { aspect-ratio:1.85; }
 .calculator-layout { grid-template-columns:1fr; gap:24px; } .calculator-band { padding-block:38px; } .calculator-copy h2 { font-size:28px; } .calc-tool { padding:20px; } .calc-result-value { font-size:25px; } .calc-fields { gap:12px; }
 .latest-grid { grid-template-columns:1fr; } .latest-image { width:106px; height:100px; } .latest-item { gap:16px; } .latest-title { font-size:14px; } .faq-layout { grid-template-columns:1fr; gap:26px; }
 .footer-grid { grid-template-columns:1fr 1fr; gap:30px; } .footer-brand { grid-column:1/-1; } .footer-bottom { flex-direction:column; line-height:1.7; } .page-heading { padding-block:35px; } .page-heading h1 { font-size:32px; } .article-layout { grid-template-columns:1fr; gap:30px; } .article-aside { position:static; grid-row:1; } .article-aside a { display:inline-block; margin-right:15px; padding:5px 0; font-size:11px; } .article-prose { font-size:14px; } .article-prose h2 { font-size:23px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; animation:none!important; } }

/* --- Ajustes WordPress --- */
*,*::before,*::after{box-sizing:border-box;border-color:var(--border)}
body{margin:0;background:var(--background);color:var(--foreground);font-family:var(--font-sans);-webkit-font-smoothing:antialiased;line-height:1.5}
h1,h2,h3,h4{font-family:var(--font-heading);letter-spacing:0;margin:0}
p{margin:0}a{color:inherit;text-decoration:none;transition:color .18s}
img{max-width:100%;height:auto}
ul{margin:0;padding:0}
::selection{background:var(--sun);color:var(--foreground)}
.screen-reader-text{position:absolute;left:-9999px}
svg.i{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:6px;font:500 13px var(--font-sans);height:40px;padding:0 18px;background:var(--primary);color:var(--primary-foreground);border:1px solid transparent;cursor:pointer}
.btn svg.i{width:16px;height:16px}
.btn-outline{background:transparent;color:var(--foreground);border-color:var(--border)}
.btn-ghost{background:transparent;color:var(--foreground);height:32px;padding:0 12px;font-size:12px}
.btn-ghost:hover{background:var(--accent)}
.btn-link{background:transparent;color:var(--primary);height:auto;padding:0;font-size:12px}
.btn-link:hover{text-decoration:underline}
.btn-icon{width:40px;padding:0;background:transparent;color:var(--foreground)}
.btn-icon:hover{background:var(--accent)}
.wp-admin-fix .site-header{top:0}
.flex-c{display:flex;align-items:center;gap:8px}
.view-all{font-size:12px}
.text-primary{color:var(--primary)}
.text-destructive{color:var(--destructive);font-size:14px;margin-top:16px}
.hidden-lg{display:inline-flex}@media(max-width:1023px){.hidden-lg{display:none}}
.article-prose table{border-collapse:collapse;width:100%;font-size:14px;line-height:1.55;min-width:480px}
.tw{overflow-x:auto;margin:22px 0 28px}
.article-prose th,.article-prose td{border:1px solid var(--border);padding:9px 12px;text-align:left;vertical-align:top}
.article-prose th{background:var(--muted);font-weight:650}
.article-prose h2,.article-prose h3{scroll-margin-top:90px}
.category-grid{grid-template-columns:repeat(3,1fr)}
.category-item{display:block}
.category-item:nth-child(5) .category-icon{background:oklch(0.95 0.03 300);color:oklch(0.42 0.1 300)}
.category-item:nth-child(6) .category-icon{background:oklch(0.95 0.03 15);color:oklch(0.45 0.12 15)}
.category-icon svg.i{width:24px;height:24px}
.category-arrow{position:absolute;top:29px;right:21px;width:16px;height:16px;color:var(--muted-foreground)}
.guide-bottom svg.i,.latest-meta svg.i,.reading-meta svg.i{width:12px;height:12px}
.trust-item svg.i{width:22px;height:22px;stroke-width:1.5;color:var(--primary)}
.hero-eyebrow svg.i{width:14px;height:14px}
.hero-note svg.i{width:14px;height:14px}
.faq-list summary svg.i{width:16px;height:16px;transition:transform .2s}
.brand-symbol{width:40px;height:40px;stroke-width:1.6}
.search-field svg.i{position:absolute;left:13px;top:12px;width:17px;height:17px;color:var(--muted-foreground)}
.calc-heading svg.i{width:16px;height:16px;color:var(--primary)}
.calc-tool label{display:block}
.calc-tool select.field-control{appearance:auto}
.calc-note p+p{margin-top:8px}
.pagination{margin-top:30px;display:flex;gap:8px;flex-wrap:wrap}.pagination .page-numbers{border:1px solid var(--border);border-radius:6px;padding:6px 12px;font-size:13px}.pagination .current{background:var(--primary);color:var(--primary-foreground);border-color:var(--primary)}
.mobile-nav{display:none}
@media(max-width:760px){.mobile-nav.open{display:flex}.mobile-nav ul{list-style:none;display:flex;flex-direction:column;gap:19px}.category-grid{grid-template-columns:repeat(2,1fr)}}
.desktop-nav ul{list-style:none;display:flex;align-items:center;gap:28px}
.site-footer ul{list-style:none}
.footer-links li{margin:0}
.brand-sub{display:block}
.wp-block-image img,.alignwide{max-width:100%}
.page-body{padding-top:45px;padding-bottom:70px}


.mobile-nav:not(.open){display:none!important}
@media(max-width:760px){.category-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:1050px){.category-grid{grid-template-columns:repeat(2,1fr)}}

.btn.hero-button{background:var(--sun);color:var(--foreground);height:46px;padding:0 23px}.btn.hero-button:hover{filter:brightness(.95)}
.btn.hero-outline{border:1px solid oklch(1 0 0 / 45%);background:oklch(1 0 0 / 5%);color:var(--hero-foreground);height:46px;padding:0 21px}.btn.hero-outline:hover{background:oklch(1 0 0 / 12%)}
.btn.filter-active,.btn.filter-active:hover{background:var(--primary);color:var(--primary-foreground)}
.btn.btn-link{height:auto;padding:0}

/* menú con desplegable de categorías */
.desktop-nav>ul{display:flex;align-items:center;gap:28px}
.desktop-nav .has-sub{position:relative}
.desktop-nav .sub{display:none;position:absolute;left:-14px;top:100%;padding:8px 0;min-width:260px;background:var(--card);border:1px solid var(--border);border-radius:6px;box-shadow:var(--soft-shadow);flex-direction:column;gap:0;z-index:40;list-style:none}
.desktop-nav .has-sub:hover .sub,.desktop-nav .has-sub:focus-within .sub{display:flex}
.desktop-nav .sub a{display:block;padding:9px 18px;white-space:nowrap}
.desktop-nav .sub a:hover{background:var(--accent)}
.mobile-nav ul{list-style:none;margin:0;padding:0}
