/* ============================================================
   HABITUS — capa de marca sobre style.css
   Archivo nuevo: si se borra, la web vuelve al diseño anterior.
   ============================================================ */

/* Verde oliva de marca en toda la web (botones, tarjetas, modales) */
:root {
  --green-dark:  #3d4230;
  --green-mid:   #6B7350;
  --green-light: #dfe3cf;
  --green-pale:  #f4f5ee;
  --terra:       #c8571e;
  --hb-ink:      #17180f;
}
.btn-primary { box-shadow: 0 4px 20px rgba(107,115,80,0.35); }
.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(107,115,80,0.5);
  background: linear-gradient(135deg, #7d8660, #2f3325);
}

/* ===== PORTADA ===== */
.hb-hero {
  position: relative;
  padding: calc(var(--navbar-h) + 48px) 0 64px;
  background:
    radial-gradient(ellipse at 85% 30%, rgba(107,115,80,0.35) 0%, transparent 60%),
    linear-gradient(160deg, #1d1f15 0%, #2b2e20 60%, #3d4230 100%);
  color: #fff;
  overflow: hidden;
}
.hb-hero.reveal { opacity: 1; transform: none; }
.hb-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hb-kicker {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d9dec4;
  margin-bottom: 20px;
}
.hb-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 20px;
}
.hb-title span { display: block; color: #b9c28f; }
.hb-sub {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  max-width: 540px;
  margin-bottom: 28px;
}
.hb-cta-row { margin-bottom: 14px; }
.hb-cta {
  background: linear-gradient(135deg, #8a9460, #6B7350);
  font-size: 1.15rem;
  padding: 19px 38px;
  box-shadow: 0 10px 36px rgba(0,0,0,0.35);
}
.hb-note { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin-bottom: 26px; }
.hb-note a { color: #fff; text-decoration: underline; font-weight: 600; }
.hb-proof {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
}
.hb-proof::before {
  content: 'f';
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-weight: 900;
  font-family: Arial, sans-serif;
}
.hb-proof strong { color: #fff; font-size: 1.05rem; }
.hb-hero-img { display: flex; justify-content: center; align-items: flex-end; }
.hb-hero-img img {
  width: 100%;
  max-width: 440px;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.45));
}
.hb-sin-img .hb-hero-grid { grid-template-columns: 1fr; }
.hb-sin-img .hb-hero-img { display: none; }

/* ===== 3 RAZONES ===== */
.hb-razones { padding: 80px 0; background: var(--green-pale); }
.hb-razones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.hb-razon {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid #e4e6da;
  box-shadow: var(--shadow-sm);
}
.hb-razon-num {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--green-mid);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.hb-razon h3 { font-size: 1.35rem; font-weight: 800; color: var(--hb-ink); margin-bottom: 8px; }
.hb-razon p { font-size: 0.95rem; line-height: 1.6; color: var(--slate-700); }

/* ===== PROGRAMAS ===== */
.hb-meta span {
  opacity: 1;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--green-pale);
  color: var(--green-dark);
}
.program-featured .hb-meta span { background: rgba(255,255,255,0.12); color: #fff; }
.program-featured .btn-primary { background: #fff; color: var(--green-dark); }
.program-featured span[style*="color:var(--green-dark)"] { color: #fff !important; }
.program-featured span[style*="line-through"] { color: rgba(255,255,255,0.6) !important; }
.program-featured span[style*="color:var(--slate-500)"] { color: rgba(255,255,255,0.7) !important; }

/* Con 2 programas, centrarlos en vez de dejar un hueco a la derecha */
.programs-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  justify-content: center;
}

/* ===== CALCULADORA: colores de marca (el HTML trae verdes viejos) ===== */
#btn-kg, #btn-lbs, #btn-cm, #btn-ft { font-family: inherit; }
.calc-form [style*="rgba(74,158,120"] { background: var(--green-pale) !important; }
.calc-form [style*="#1a4a3a"] { color: var(--green-dark) !important; }
#result-placeholder > div[style*="rgba(26,74,58"] {
  background: linear-gradient(to top, rgba(29,31,21,0.9) 0%, rgba(29,31,21,0.35) 50%, rgba(0,0,0,0) 100%) !important;
}

/* ===== CIERRE FINAL ===== */
.final-cta { background: linear-gradient(135deg, #1d1f15 0%, #3d4230 100%); }

/* ===== MÓVIL (casi todo el tráfico viene de Facebook) ===== */
@media (max-width: 900px) {
  .hb-hero { padding: calc(var(--navbar-h) + 24px) 0 44px; }
  .hb-hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hb-hero-img { order: -1; }
  .hb-hero-img img { max-width: 230px; }
  .hb-hero-text { text-align: center; }
  .hb-sub { margin-left: auto; margin-right: auto; font-size: 1rem; }
  .hb-razones-grid { grid-template-columns: 1fr; gap: 14px; }
  .hb-razones { padding: 56px 0; }
}
@media (max-width: 480px) {
  .hb-title { font-size: 1.9rem; }
  .hb-cta { width: 100%; justify-content: center; padding: 18px 20px; }
  .hb-note { font-size: 0.8rem; line-height: 1.7; }
  .hb-nav-cta { padding: 10px 16px; font-size: 0.85rem; }
  .hb-razon { padding: 22px; }
}

/* Calculadora en móvil: en la vista previa los campos se salían por la derecha */
@media (max-width: 600px) {
  .calc-wrapper { display: block; overflow: hidden; }
  .calc-form { padding: 22px 16px; }
  .calc-form, .calc-form * { box-sizing: border-box; }
  .calc-form > div:first-child { flex-wrap: wrap; }
  .calc-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .calc-form .form-group { min-width: 0; }
  .calc-form input, .calc-form select { width: 100%; max-width: 100%; min-width: 0; }
  .calc-results { margin-top: 18px; }
  .programs-grid { grid-template-columns: 1fr; }
}

/* Botones kg/lbs/cm/ft: el JS les pone el verde viejo; se pasa a oliva */
#btn-kg[style*="#4a9e78"], #btn-lbs[style*="#4a9e78"], #btn-cm[style*="#4a9e78"], #btn-ft[style*="#4a9e78"],
#btn-kg[style*="rgb(74, 158, 120)"], #btn-lbs[style*="rgb(74, 158, 120)"], #btn-cm[style*="rgb(74, 158, 120)"], #btn-ft[style*="rgb(74, 158, 120)"] {
  color: var(--green-mid) !important;
}
#btn-kg[style*="background:#4a9e78"], #btn-lbs[style*="background:#4a9e78"], #btn-cm[style*="background:#4a9e78"], #btn-ft[style*="background:#4a9e78"],
#btn-kg[style*="background: rgb(74, 158, 120)"], #btn-lbs[style*="background: rgb(74, 158, 120)"], #btn-cm[style*="background: rgb(74, 158, 120)"], #btn-ft[style*="background: rgb(74, 158, 120)"] {
  background: var(--green-mid) !important;
  color: #fff !important;
}
