/* ==========================================================================
   Potencia Firme — hoja de estilos
   Paleta "natural y cercano": verdes de bosque, tierra, cielo y ámbar.
   ========================================================================== */

:root {
  --green-900: #163d2e;
  --green-800: #1c4d3a;
  --green-700: #22664a;
  --green-500: #2e8b57;
  --leaf: #7dbb57;
  --leaf-light: #d9ecc9;
  --earth: #a97c50;
  --earth-light: #e9dcc8;
  --sand: #f6f1e7;
  --sand-dark: #ebe3d3;
  --sky: #e3f0f7;
  --amber: #e0a030;
  --ink: #1e2a24;
  --muted: #5b6b62;
  --white: #ffffff;
  --danger: #b3261e;
  --ok: #2e7d32;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(22, 61, 46, 0.10);
  --shadow-sm: 0 3px 10px rgba(22, 61, 46, 0.08);
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--green-900); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--green-500); margin-bottom: 0.6rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-alt { background: var(--white); }
.section-green { background: var(--green-900); color: var(--sand); }
.section-green h2, .section-green h3 { color: var(--white); }
.section-green .lead { color: rgba(255,255,255,0.8); }
.center { text-align: center; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--green-500); color: var(--white); }
.btn-primary:hover { background: var(--green-700); }
.btn-amber { background: var(--amber); color: var(--green-900); }
.btn-outline { background: transparent; border-color: var(--green-700); color: var(--green-700); }
.section-green .btn-outline, .hero .btn-outline { border-color: rgba(255,255,255,0.6); color: var(--white); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-light { background: var(--white); color: var(--green-900); }
.btn-whatsapp { background: #25d366; color: #0b3d22; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand-dark);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 74px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--green-900); }
.brand img { height: 44px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.01em; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-500); }

.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--green-500); }
.nav-actions { display: flex; align-items: center; gap: 0.8rem; }

.lang-switch {
  display: inline-flex; border: 1.5px solid var(--green-700); border-radius: 999px; overflow: hidden;
  font-size: 0.8rem; font-weight: 700;
}
.lang-switch button {
  background: transparent; border: 0; padding: 0.35rem 0.7rem; cursor: pointer;
  color: var(--green-700); font-family: var(--font-body); font-weight: 700;
}
.lang-switch button.active { background: var(--green-700); color: var(--white); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--green-900); margin: 5px 0; border-radius: 2px; }

@media (max-width: 1080px) {
  .nav-links {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--sand); border-bottom: 1px solid var(--sand-dark); padding: 0.5rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.9rem clamp(1rem, 4vw, 2.5rem); }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
}
.brand-name { white-space: nowrap; }
@media (max-width: 480px) {
  .brand img { height: 38px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name small { display: none; }
  .hero { min-height: 0; }
  .hero .container { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 60%, #3e8f5f 100%);
  min-height: 78vh; display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.55; mix-blend-mode: luminosity;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(22,61,46,0.92) 0%, rgba(22,61,46,0.75) 50%, rgba(22,61,46,0.35) 100%);
}
.hero .container { position: relative; z-index: 1; padding-top: 5rem; padding-bottom: 5rem; }
.hero h1 { color: var(--white); max-width: 780px; }
.hero h1 em { font-style: italic; color: var(--leaf); }
.hero .lead { color: rgba(255,255,255,0.85); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.2rem; }
.hero-tags span {
  border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; padding: 0.3rem 0.9rem;
  font-size: 0.85rem; font-weight: 600; background: rgba(255,255,255,0.08);
}

.page-hero { min-height: 42vh; }
.page-hero .container { padding-top: 4rem; padding-bottom: 4rem; }

/* ---------- Tarjetas y rejillas ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--white); border-radius: var(--radius); padding: 1.8rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--sand-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--leaf-light); color: var(--green-700); margin-bottom: 1rem;
}
.card-icon svg, .mode-icon svg { width: 26px; height: 26px; display: block; }
.mode-icon { color: var(--green-500); margin-bottom: 0.6rem; }
.calc-mode.active .mode-icon { color: var(--green-800); }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.card-link { display: inline-block; margin-top: 0.8rem; font-weight: 700; text-decoration: none; }

.section-green .card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: var(--sand); }
.section-green .card p { color: rgba(255,255,255,0.78); }
.section-green .card-icon { background: rgba(125,187,87,0.2); color: var(--leaf); }

/* ---------- Pasos / línea de tiempo ---------- */
.steps { counter-reset: step; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding: 1.6rem 1.4rem 1.4rem; background: var(--white); border-radius: var(--radius); border: 1px solid var(--sand-dark); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 1.2rem;
  width: 36px; height: 36px; border-radius: 50%; background: var(--amber); color: var(--green-900);
  font-weight: 800; display: grid; place-items: center; font-family: var(--font-head);
}
.step h4 { margin: 0.4rem 0 0.4rem; }
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Dos columnas texto/imagen ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.check-list { list-style: none; padding: 0; margin: 1rem 0; }
.check-list li { padding-left: 2rem; position: relative; margin-bottom: 0.6rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green-500); font-weight: 800; }

/* ---------- Tabla comparativa alianza ---------- */
.compare { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare th, .compare td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--sand-dark); vertical-align: top; }
.compare th { background: var(--green-800); color: var(--white); font-family: var(--font-head); font-size: 1.05rem; }
.compare tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- Estadísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--leaf); }
.stat-label { color: rgba(255,255,255,0.8); font-size: 0.95rem; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--green-900); }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.95rem; border: 1.5px solid var(--sand-dark); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--leaf); border-color: var(--leaf); }
.field textarea { min-height: 130px; resize: vertical; }
.field.error input, .field.error select { border-color: var(--danger); }
.field .error-msg { color: var(--danger); font-size: 0.85rem; margin-top: 0.35rem; display: none; }
.field.error .error-msg { display: block; }
.field-inline { display: flex; align-items: center; gap: 0.6rem; }
.field-inline input[type="checkbox"] { width: auto; }

fieldset.form { border: 1px solid var(--sand-dark); border-radius: var(--radius-sm); padding: 1.1rem; margin: 0; background: var(--sand); }
.form-note { background: var(--sky); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-size: 0.92rem; color: var(--green-900); }
.form-status { padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; display: none; }
.form-status.ok { display: block; background: var(--leaf-light); color: var(--ok); }
.form-status.err { display: block; background: #fbe4e2; color: var(--danger); }

.calc-attach { background: var(--leaf-light); border: 1px dashed var(--green-500); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: 0.92rem; }
.calc-attach pre { white-space: pre-wrap; font-family: var(--font-body); margin: 0.5rem 0 0; font-size: 0.88rem; }

/* ---------- Calculadora ---------- */
.calc-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.8rem; margin-bottom: 2rem; }
.calc-mode {
  background: var(--white); border: 2px solid var(--sand-dark); border-radius: var(--radius); padding: 1.1rem 1rem;
  cursor: pointer; text-align: left; font-family: var(--font-body); transition: border-color 0.15s ease, transform 0.15s ease;
}
.calc-mode:hover { transform: translateY(-2px); }
.calc-mode.active { border-color: var(--green-500); background: var(--leaf-light); }
.calc-mode .mode-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.calc-mode strong { display: block; color: var(--green-900); font-size: 1rem; }
.calc-mode span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

.calc-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: start; }
.contact-layout { grid-template-columns: 1.7fr 1fr; }
@media (max-width: 920px) { .calc-layout { grid-template-columns: 1fr; } }
.calc-panel { background: var(--white); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); border: 1px solid var(--sand-dark); }
.calc-panel h3 { margin-bottom: 1.2rem; }
.calc-form[hidden] { display: none; }

.range-wrap { display: flex; align-items: center; gap: 0.8rem; }
.range-wrap input[type="range"] { flex: 1; accent-color: var(--green-500); }
.range-wrap output { min-width: 3.5rem; font-weight: 700; color: var(--green-900); text-align: right; }

.results { position: sticky; top: 90px; }
.results-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.results-empty .big { font-size: 3rem; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; margin: 1rem 0 1.4rem; }
.result-tile { background: var(--sand); border-radius: var(--radius-sm); padding: 0.9rem 1rem; border: 1px solid var(--sand-dark); }
.result-tile .rt-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.result-tile .rt-value { font-family: var(--font-head); font-size: 1.55rem; color: var(--green-900); font-weight: 700; line-height: 1.1; margin-top: 0.2rem; }
.result-tile .rt-sub { font-size: 0.8rem; color: var(--muted); }
.result-tile.highlight { background: var(--green-800); border-color: var(--green-800); }
.result-tile.highlight .rt-label { color: rgba(255,255,255,0.7); }
.result-tile.highlight .rt-value { color: var(--white); }
.result-tile.highlight .rt-sub { color: rgba(255,255,255,0.7); }

.mix-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 0.4rem 0 0.3rem; background: var(--sand-dark); }
.mix-bar span { display: block; height: 100%; }
.mix-solar { background: var(--amber); }
.mix-wind { background: #5aa9d6; }
.mix-legend { display: flex; gap: 1.2rem; font-size: 0.85rem; color: var(--muted); }
.mix-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.35rem; }

.disclaimer { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--sand-dark); padding-top: 0.9rem; margin-top: 1rem; }

/* ---------- Noticias ---------- */
.news-card { display: flex; flex-direction: column; }
.news-meta { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 0.4rem; }
.news-card .btn { margin-top: auto; align-self: flex-start; }
.news-badge { display: inline-block; background: var(--earth-light); color: var(--earth); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.75rem; font-weight: 700; margin-left: 0.5rem; }

/* ---------- CTA final ---------- */
.cta-band { background: linear-gradient(120deg, var(--green-700), var(--green-500)); color: var(--white); border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { color: var(--white); margin: 0 0 0.3rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,0.85); }

/* ---------- Pie ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,0.8); padding: 3rem 0 1.5rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.8rem; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: var(--leaf); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; font-size: 0.95rem; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; color: var(--white); }
.footer-brand img { height: 42px; }
.footer-brand .brand-name { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.2rem; padding-top: 1.2rem; font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; color: rgba(255,255,255,0.6); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 0.6rem;
  background: #25d366; color: #fff; text-decoration: none; font-weight: 700;
  padding: 0.75rem 1.1rem 0.75rem 0.8rem; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }
.cta-float { background: var(--amber); color: var(--green-900); }
.cta-float svg { width: 22px; height: 22px; fill: none; }
@media (max-width: 600px) { .wa-float span { display: none; } .wa-float { padding: 0.8rem; } }

/* ---------- Utilidades ---------- */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
[hidden] { display: none !important; }
