/* ============================================================
   SOLAR CÓRDOBA — Design System v2.0
   Paleta: Ámbar Solar + Verde Eco + Azul Noche
   ============================================================ */

:root {
  --sol-yellow:   #F59E0B;
  --sol-yellow-d: #D97706;
  --sol-green:    #10B981;
  --sol-green-d:  #059669;
  --sol-navy:     #1E3A5F;
  --sol-navy-d:   #152B47;
  --sol-sky:      #EFF6FF;
  --sol-sky-d:    #DBEAFE;
  --sol-gray:     #F8FAFC;
  --sol-border:   #E2E8F0;
  --sol-text:     #1E293B;
  --sol-muted:    #64748B;
  --sol-white:    #FFFFFF;
  --radius:       12px;
  --shadow:       0 4px 20px rgba(30,58,95,.10);
  --shadow-lg:    0 8px 40px rgba(30,58,95,.15);
  --font-main:    'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── BASE ── */
.solar-post {
  font-family: var(--font-main);
  color: var(--sol-text);
  line-height: 1.75;
  max-width: 860px;
  margin: 0 auto;
}

.solar-post *,
.solar-post *::before,
.solar-post *::after { box-sizing: border-box; }

/* ── HERO BANNER ── */
.sp-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}
.sp-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.65);
}
.sp-hero-body {
  position: relative;
  padding: 2.5rem;
  color: var(--sol-white);
}
.sp-hero-badge {
  display: inline-block;
  background: var(--sol-yellow);
  color: var(--sol-navy-d);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .85rem;
}
.sp-hero-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 .75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.sp-hero-meta {
  font-size: .82rem;
  opacity: .85;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.sp-hero-meta span::before { margin-right: .35rem; }

/* ── LEAD PARAGRAPH ── */
.sp-lead {
  font-size: 1.1rem;
  color: var(--sol-navy);
  background: var(--sol-sky);
  border-left: 4px solid var(--sol-yellow);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* ── HEADINGS ── */
.solar-post h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--sol-navy);
  border-bottom: 3px solid var(--sol-yellow);
  padding-bottom: .5rem;
  margin: 2.5rem 0 1rem;
}
.solar-post h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sol-navy);
  margin: 1.8rem 0 .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.solar-post h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--sol-green);
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── CALLOUT BOXES ── */
.sp-callout {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  border: 1px solid transparent;
}
.sp-callout strong.sp-callout-title,
strong.sp-callout-title {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-weight: 700;
  font-size: .93rem;
  margin: 0 0 .5rem 0;
  padding: 0;
}
.sp-callout p {
  display: block;
  width: 100%;
  margin: 0;
  font-size: .94rem;
  line-height: 1.65;
}
.sp-callout p + p { margin-top: .4rem; }
/* hide legacy icon spans */
.sp-callout > span.sp-callout-icon { display: none; }
.sp-callout-body { display: block; width: 100%; }

.sp-callout--info    { background: #EFF6FF; border-color: #BFDBFE; }
.sp-callout--info strong.sp-callout-title    { color: #1D4ED8; }
.sp-callout--warning { background: #FFFBEB; border-color: #FDE68A; }
.sp-callout--warning strong.sp-callout-title { color: var(--sol-yellow-d); }
.sp-callout--success { background: #ECFDF5; border-color: #A7F3D0; }
.sp-callout--success strong.sp-callout-title { color: var(--sol-green-d); }
.sp-callout--danger  { background: #FEF2F2; border-color: #FECACA; }
.sp-callout--danger strong.sp-callout-title  { color: #DC2626; }

/* old rules removed — replaced above */

/* ── STATS ROW ── */
.sp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.sp-stat {
  background: var(--sol-white);
  border: 1px solid var(--sol-border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.sp-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.sp-stat-num {
  display: block;
  font-size: clamp(1rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--sol-yellow-d);
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.sp-stat-label {
  font-size: .8rem;
  color: var(--sol-muted);
  margin-top: .3rem;
  display: block;
}
.sp-stat-icon { font-size: 1.6rem; margin-bottom: .4rem; display: block; }

/* ── TABLES ── */
.sp-table-wrap { overflow-x: auto; margin: 1.75rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: var(--sol-white);
  border-radius: var(--radius);
  overflow: hidden;
}
.sp-table caption {
  caption-side: top;
  text-align: left;
  padding: .9rem 1.1rem;
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: var(--sol-navy);
  color: var(--sol-white);
}
.sp-table thead th {
  background: var(--sol-navy);
  color: var(--sol-white);
  padding: .85rem 1rem;
  font-weight: 700;
  font-size: .85rem;
  text-align: left;
}
.sp-table tbody td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--sol-border);
  vertical-align: top;
}
.sp-table tbody tr:nth-child(even) { background: var(--sol-gray); }
.sp-table tbody tr:hover { background: var(--sol-sky); }
.sp-table .badge-yes  { color: var(--sol-green-d); font-weight: 700; }
.sp-table .badge-no   { color: #EF4444; font-weight: 700; }
.sp-table .badge-good { background: #D1FAE5; color: var(--sol-green-d); padding: .2rem .6rem; border-radius: 20px; font-size: .8rem; font-weight: 700; }
.sp-table .badge-mid  { background: #FEF3C7; color: var(--sol-yellow-d); padding: .2rem .6rem; border-radius: 20px; font-size: .8rem; font-weight: 700; }

/* ── STEPS / TIMELINE ── */
.sp-steps { list-style: none; padding: 0; margin: 1.75rem 0; }
.sp-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: .75rem 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.sp-step::before {
  content: '';
  position: absolute;
  left: 1.45rem;
  top: 3rem;
  bottom: -1.25rem;
  width: 2px;
  background: var(--sol-border);
}
.sp-step:last-child::before { display: none; }
.sp-step-num {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--sol-yellow);
  color: var(--sol-navy-d);
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(245,158,11,.15);
}
.sp-step-body h3 {
  margin: .4rem 0 .3rem;
  font-size: 1rem;
}
.sp-step-body p { font-size: .92rem; color: var(--sol-muted); margin: 0; }

/* ── CHART CONTAINER ── */
.sp-chart-wrap {
  background: var(--sol-white);
  border: 1px solid var(--sol-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}
.sp-chart-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--sol-navy);
  margin: 0 0 1.2rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sp-chart-wrap canvas { max-height: 320px; }

/* ── COMPARISON CARDS ── */
.sp-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}
@media(max-width:600px){ .sp-compare { grid-template-columns: 1fr; } }
.sp-compare-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 2px solid transparent;
}
.sp-compare-card--a { background: #EFF6FF; border-color: #3B82F6; }
.sp-compare-card--b { background: #ECFDF5; border-color: var(--sol-green); }
.sp-compare-card h4 { margin: 0 0 1rem; font-size: 1rem; font-weight: 800; color: var(--sol-navy); }
.sp-compare-card ul { margin: 0; padding: 0 0 0 1.2rem; }
.sp-compare-card li { font-size: .9rem; margin-bottom: .45rem; }

/* ── FAQ ── */
.sp-faq { margin: 2rem 0; }
.sp-faq-item {
  border: 1px solid var(--sol-border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.sp-faq-q {
  width: 100%;
  text-align: left;
  background: var(--sol-white);
  border: none;
  padding: 1.1rem 1.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sol-navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background .15s;
}
.sp-faq-q:hover { background: var(--sol-sky); }
.sp-faq-q::after {
  content: '＋';
  font-size: 1.3rem;
  color: var(--sol-yellow-d);
  flex-shrink: 0;
  transition: transform .25s;
}
.sp-faq-item.open .sp-faq-q { background: var(--sol-sky-d); }
.sp-faq-item.open .sp-faq-q::after { content: '－'; }
.sp-faq-a {
  display: none;
  padding: 1rem 1.3rem 1.2rem;
  font-size: .94rem;
  color: var(--sol-text);
  background: var(--sol-gray);
  border-top: 1px solid var(--sol-border);
}
.sp-faq-item.open .sp-faq-a { display: block; }

/* ── HIGHLIGHT / KEY FACT ── */
.sp-keyfact {
  background: linear-gradient(135deg, var(--sol-navy) 0%, #2D5A8E 100%);
  color: var(--sol-white);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sp-keyfact::before {
  content: '☀';
  position: absolute;
  font-size: 8rem;
  opacity: .06;
  right: -1rem;
  top: -1rem;
  line-height: 1;
}
.sp-keyfact-num {
  display: block;
  font-size: clamp(1.4rem, 6vw, 3.5rem);
  font-weight: 900;
  color: var(--sol-yellow);
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
}
.sp-keyfact-text { font-size: 1.05rem; margin-top: .5rem; opacity: .9; }

/* ── PROGRESS BARS ── */
.sp-bars { margin: 1.5rem 0; }
.sp-bar-item { margin-bottom: 1rem; }
.sp-bar-label { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; }
.sp-bar-track { background: var(--sol-border); border-radius: 20px; height: 12px; overflow: hidden; }
.sp-bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--sol-yellow), var(--sol-green)); transition: width .8s ease; }

/* ── CTA BANNER ── */
.sp-cta {
  background: linear-gradient(135deg, var(--sol-yellow) 0%, var(--sol-yellow-d) 100%);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.sp-cta-text h3 { color: var(--sol-navy-d); margin: 0 0 .4rem; font-size: 1.2rem; }
.sp-cta-text p  { color: var(--sol-navy); margin: 0; font-size: .92rem; }
.sp-cta-btn {
  display: inline-block;
  background: var(--sol-navy);
  color: var(--sol-white);
  padding: .85rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}
.sp-cta-btn:hover { background: var(--sol-navy-d); transform: translateY(-2px); color: #fff; }

/* ── IMAGE CAPTION ── */
.sp-img-wrap { margin: 1.75rem 0; }
.sp-img-wrap img { width: 100%; border-radius: var(--radius); display: block; }
.sp-img-caption { font-size: .8rem; color: var(--sol-muted); margin-top: .5rem; text-align: center; }

/* ── CHECKLIST ── */
.sp-checklist { list-style: none; padding: 0; margin: 1rem 0; }
.sp-checklist li {
  padding: .55rem .75rem .55rem 2.2rem;
  position: relative;
  font-size: .95rem;
  border-bottom: 1px solid var(--sol-border);
}
.sp-checklist li:last-child { border: none; }
.sp-checklist li::before {
  content: '✓';
  position: absolute;
  left: .5rem;
  top: .55rem;
  color: var(--sol-green);
  font-weight: 900;
}

/* ── TABLE OF CONTENTS ── */
.sp-toc {
  background: var(--sol-sky);
  border: 1px solid var(--sol-sky-d);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
}
.sp-toc-title { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; color: var(--sol-navy); margin: 0 0 .75rem; }
.sp-toc ol { margin: 0; padding-left: 1.4rem; }
.sp-toc li { font-size: .9rem; margin-bottom: .35rem; }
.sp-toc a { color: var(--sol-navy); text-decoration: none; }
.sp-toc a:hover { color: var(--sol-yellow-d); text-decoration: underline; }

/* ── AUTHOR BOX ── */
.sp-author {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  background: var(--sol-gray);
  border: 1px solid var(--sol-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0 1rem;
}
.sp-author-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--sol-yellow);
  flex-shrink: 0;
}
.sp-author-name { font-weight: 700; font-size: .95rem; color: var(--sol-navy); }
.sp-author-bio  { font-size: .85rem; color: var(--sol-muted); margin: .2rem 0 0; }

/* ── RESPONSIVE ── */
@media(max-width:640px){
  .sp-hero-body { padding: 1.5rem; }
  .sp-hero-title { font-size: 1.3rem; }
  .sp-stats { grid-template-columns: 1fr 1fr; }
  .sp-keyfact-num { font-size: 2.5rem; }
  .sp-cta { flex-direction: column; text-align: center; }
  .sp-compare { grid-template-columns: 1fr; }
}

/* ── FAQ JS ── */
