/*
 * Barón Theme · Integración Tarificador Vida · v0.7.20
 *
 * Responsabilidad del theme: landing, hero, anchura y contexto exterior.
 * La interfaz .tvida-* pertenece desde Tarificador Vida v0.1.1 al plugin.
 */

.baron-life-calculator .baron-main {
  overflow-x: clip;
}

.baron-life-calculator .baron-container--content,
.baron-life-calculator .baron-container--calculator {
  width: min(calc(100% - 32px), 1240px);
  max-width: none;
}

.baron-calculator-page--landing {
  padding: 0 !important;
  background: #fff;
}

/* HERO */
.baron-calculator-landing-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(44px,5.5vw,76px) 0 clamp(54px,6vw,86px);
  background: linear-gradient(118deg,#f8fbff 0%,#eef5fd 58%,#e8f2fc 100%);
}
.baron-calculator-landing-hero__wash {
  position: absolute;
  right: -18vw;
  bottom: -38vw;
  width: 66vw;
  height: 66vw;
  border: 1px solid rgba(13,70,145,.05);
  border-radius: 50%;
  box-shadow: 0 0 0 5vw rgba(255,255,255,.18),0 0 0 10vw rgba(255,255,255,.11);
  pointer-events: none;
}
.baron-calculator-landing-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1.06fr) minmax(360px,.94fr);
  align-items: center;
  gap: clamp(38px,6vw,84px);
}
.baron-calculator-landing-hero__copy { min-width: 0; }
.baron-calculator-eyebrow {
  margin: 0 0 10px;
  color: var(--baron-blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.baron-calculator-landing-hero h1 {
  max-width: 710px;
  margin: 0;
  color: var(--baron-blue-dark);
  font-size: clamp(2.7rem,4.7vw,4.8rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.045em;
}
.baron-calculator-landing-hero__lead {
  max-width: 670px;
  margin: 20px 0 0;
  color: #40546b;
  font-size: clamp(1rem,1.32vw,1.12rem);
  line-height: 1.68;
}
.baron-calculator-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: auto !important;
  margin: 22px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}
.baron-calculator-benefits li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #d4e1ef;
  border-radius: 999px;
  background: rgba(255,255,255,.84);
  color: #31475f;
  box-shadow: 0 6px 18px rgba(18,55,94,.035);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
}
.baron-calculator-benefits li::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #eaf8f1;
  color: #168654;
  font-size: .72rem;
  font-weight: 900;
}
.baron-calculator-landing-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.baron-calculator-primary-cta,
.baron-calculator-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: .86rem;
  font-weight: 780;
  text-decoration: none;
  transition: background .15s ease,border-color .15s ease,color .15s ease;
}
.baron-calculator-primary-cta { border: 1px solid var(--baron-blue-dark); background: var(--baron-blue-dark); color: #fff; }
.baron-calculator-primary-cta:hover,
.baron-calculator-primary-cta:focus-visible { border-color: var(--baron-blue); background: var(--baron-blue); color: #fff; }
.baron-calculator-secondary-cta { border: 1px solid #c9d8e8; background: rgba(255,255,255,.75); color: var(--baron-blue-dark); }
.baron-calculator-secondary-cta:hover,
.baron-calculator-secondary-cta:focus-visible { border-color: #9eb8d8; background: #fff; color: var(--baron-blue); }

.baron-calculator-landing-hero__media {
  position: relative;
  min-width: 0;
  margin: 0;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 24px;
  background: #dceaf8;
  box-shadow: 0 22px 54px rgba(18,55,94,.13);
}
.baron-calculator-landing-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,transparent 58%,rgba(5,46,112,.56) 100%);
  pointer-events: none;
}
.baron-calculator-landing-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.baron-calculator-landing-hero__media figcaption {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #fff;
  line-height: 1.3;
}
.baron-calculator-landing-hero__media figcaption strong { font-size: 1rem; font-weight: 800; }
.baron-calculator-landing-hero__media figcaption span { color: rgba(255,255,255,.86); font-size: .76rem; }

/* TARIFICADOR. Sin carcasa extra: el plugin controla su propia UI. */
.baron-calculator-tool-section {
  padding: clamp(42px,5vw,66px) 0 clamp(48px,5.5vw,72px);
  background: #fff;
}
.baron-calculator-tool-section__intro { width: min(100%,760px); margin: 0 auto 22px; text-align: center; }
.baron-calculator-tool-section__intro h2 {
  margin: 0;
  color: var(--baron-blue-dark);
  font-size: clamp(1.9rem,3.4vw,2.8rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -.03em;
}
.baron-calculator-tool-section__intro > p:last-child { max-width: 680px; margin: 12px auto 0; color: #52667c; font-size: .96rem; line-height: 1.65; }
.baron-calculator-tool-card { width: min(100%,980px); margin: 0 auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.baron-calculator-tool-card__head { display: none !important; }
.baron-calculator-landing-hero__tool { width: 100%; min-width: 0; margin-inline: auto; }
.baron-calculator-tool-card__note { max-width: 760px; margin: 14px auto 0; color: #7a899a; font-size: .72rem; line-height: 1.5; text-align: center; }
.baron-calculator-missing { padding: 26px; border-radius: 12px; background: #f5f8fb; text-align: center; }
.baron-calculator-missing p { margin: 0 0 12px; }
.baron-calculator-missing a { color: var(--baron-blue); font-weight: 750; }

/* EDITORIAL */
.baron-calculator-editorial { padding: clamp(44px,5vw,72px) 0; border-top: 1px solid #edf2f7; background: #f8fbfe; }
.baron-calculator-editorial__content { width: min(100%,940px) !important; max-width: 940px !important; margin: 0 auto; color: #33485e; font-size: .98rem; line-height: 1.72; }
.baron-calculator-editorial__content > :where(h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote,figure,table,.baron-toc) { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.baron-calculator-editorial__content h2 { margin-top: clamp(38px,5vw,58px); margin-bottom: 14px; color: var(--baron-blue-dark); font-size: clamp(1.65rem,2.7vw,2.35rem); line-height: 1.12; letter-spacing: -.025em; }
.baron-calculator-editorial__content h3 { margin-top: 30px; margin-bottom: 10px; color: var(--baron-blue); font-size: 1.22rem; line-height: 1.22; }
.baron-calculator-editorial__content p { margin-top: 0; margin-bottom: 17px; }
.baron-calculator-editorial__content ul,
.baron-calculator-editorial__content ol { padding-left: 1.25rem; }
.baron-calculator-editorial__content li { margin: .45rem 0; }
.baron-calculator-editorial__content figure { margin-top: 24px !important; margin-bottom: 32px !important; }
.baron-calculator-editorial__content figure img,
.baron-calculator-editorial__content > img { display: block; max-width: 100%; height: auto; border-radius: 16px; box-shadow: 0 12px 32px rgba(18,55,94,.08); }
.baron-calculator-editorial__content .baron-toc { margin: 28px 0 38px !important; padding: 18px 20px; border: 1px solid #d8e4ef; border-radius: 13px; background: #fff; box-shadow: none; }

.baron-calculator-final { padding: clamp(44px,5vw,68px) 0; background: #fff; }
.baron-calculator-final__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 32px; border-radius: 18px; background: linear-gradient(115deg,#0a3d84,#073675); color: #fff; box-shadow: 0 16px 34px rgba(7,54,117,.12); }
.baron-calculator-final__inner h2 { margin: 0; color: #fff; font-size: clamp(1.55rem,2.7vw,2.2rem); line-height: 1.1; }
.baron-calculator-final__inner p:not(.baron-calculator-eyebrow) { max-width: 720px; margin: 8px 0 0; color: rgba(255,255,255,.8); }
.baron-calculator-final .baron-calculator-eyebrow { color: #bcd5f4; }
.baron-calculator-final__inner > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border-radius: 9px; background: #fff; color: var(--baron-blue-dark); font-size: .86rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.baron-calculator-final__inner > a:hover,
.baron-calculator-final__inner > a:focus-visible { background: #eef5ff; }

/* RESULTADOS: solo contexto exterior, no estilos internos del plugin. */
.baron-results-page { padding: clamp(34px,4vw,56px) 0 clamp(50px,6vw,80px); }
.baron-results-page__header { width: min(100%,1180px); margin: 0 auto 24px; }
.baron-results-page__header h1 { margin: 0; color: var(--baron-blue-dark); font-size: clamp(2rem,4vw,3.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.035em; }

@media (max-width: 980px) {
  .baron-calculator-landing-hero__grid { grid-template-columns: 1fr; max-width: 820px; }
  .baron-calculator-landing-hero__copy { text-align: center; }
  .baron-calculator-landing-hero h1,
  .baron-calculator-landing-hero__lead { margin-left: auto; margin-right: auto; }
  .baron-calculator-benefits,
  .baron-calculator-landing-hero__actions { justify-content: center; }
  .baron-calculator-landing-hero__media { width: min(100%,620px); margin-inline: auto; aspect-ratio: 16/10; }
  .baron-calculator-final__inner { align-items: flex-start; }
}

@media (max-width: 680px) {
  .baron-life-calculator .baron-container--content,
  .baron-life-calculator .baron-container--calculator { width: min(calc(100% - 20px),640px); }
  .baron-calculator-landing-hero { padding: 32px 0 38px; }
  .baron-calculator-landing-hero__grid { width: min(calc(100% - 20px),640px); gap: 28px; }
  .baron-calculator-landing-hero h1 { font-size: clamp(2.15rem,11vw,3.1rem); }
  .baron-calculator-landing-hero__lead { font-size: .94rem; line-height: 1.6; }
  .baron-calculator-benefits { gap: 6px; }
  .baron-calculator-benefits li { padding: 7px 9px; font-size: .72rem; }
  .baron-calculator-landing-hero__actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .baron-calculator-primary-cta,
  .baron-calculator-secondary-cta { width: 100%; }
  .baron-calculator-landing-hero__media { aspect-ratio: 4/3; border-radius: 18px; }
  .baron-calculator-landing-hero__media figcaption { left: 17px; right: 17px; bottom: 15px; }
  .baron-calculator-tool-section { padding: 34px 0 42px; }
  .baron-calculator-tool-section__intro { margin-bottom: 17px; }
  .baron-calculator-tool-section__intro h2 { font-size: 1.8rem; }
  .baron-calculator-tool-card__note { padding-inline: 8px; margin-top: 11px; }
  .baron-calculator-editorial { padding: 36px 0 44px; }
  .baron-calculator-editorial__content { font-size: .94rem; line-height: 1.68; }
  .baron-calculator-editorial__content h2 { font-size: 1.65rem; }
  .baron-calculator-final__inner { flex-direction: column; padding: 23px 20px; text-align: center; }
  .baron-calculator-final__inner > a { width: 100%; }
  .baron-results-page { padding-top: 26px; }
  .baron-results-page__header { margin-bottom: 18px; text-align: center; }
}
