/* =============================================================================
   CALCULADORASHISPANAS.COM — CSS Global compartido
   Todos los clusters usan este archivo automaticamente.
   Version: 1.1 | No editar directamente.
   Para cambiar el color dorado: busca --gold y cambia el valor.
   Para cambiar la tipografia: busca DM Sans y DM Serif Display.
============================================================================= */

/* ─── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  --ink:        #0f1923;
  --ink-60:     #0f192399;
  --ink-30:     #0f19234d;
  --paper:      #faf8f4;
  --paper-2:    #f2ede4;
  --paper-3:    #e8e0d2;
  --gold:       #c8922a;
  --gold-light: #fdf3e0;
  --teal:       #0e6b6b;
  --teal-light: #e0f4f4;
  --red:        #c0392b;
  --green:      #1a6b3c;
  --green-light:#e0f4ea;
  --blue:       #1a4a8a;
  --blue-light: #e8f0fb;
  --radius:     4px;
  --shadow-sm:  0 1px 3px rgba(15,25,35,.08);
  --shadow-md:  0 4px 16px rgba(15,25,35,.10);
  --shadow-lg:  0 12px 40px rgba(15,25,35,.13);
}

/* ─── RESET & BASE ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.ch-page-html { scroll-behavior: smooth; font-size: 16px; }

.ch-page {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

h1,h2,h3,h4 {
  font-family: 'DM Serif Display', serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── UTILITY ────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ─── GRAIN OVERLAY ──────────────────────────────────────────────────────── */
.ch-page::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: .4;
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-3);
  backdrop-filter: blur(12px);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav__logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.nav__logo span { color: var(--gold); }
.nav__links {
  display: flex; gap: 28px; list-style: none;
  font-size: .875rem; font-weight: 500;
}
.nav__links a {
  color: var(--ink-60);
  transition: color .2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.nav__cta:hover { background: var(--teal); transform: translateY(-1px); }

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 80px 0 0;
}

/* Decorative lines */
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 79px,
      rgba(255,255,255,.04) 79px,
      rgba(255,255,255,.04) 80px
    );
  pointer-events: none;
}

.hero__label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}
.hero__label::before {
  content: '';
  display: block; width: 24px; height: 1px;
  background: var(--gold);
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--paper);
  max-width: 780px;
  margin-bottom: 24px;
}
.hero__title em {
  font-style: italic;
  color: var(--gold);
}

.hero__sub {
  font-size: 1.1rem;
  color: rgba(250,248,244,.65);
  max-width: 580px;
  margin-bottom: 40px;
  font-weight: 300;
}

.hero__stats {
  display: flex; gap: 40px; flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero__stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: var(--paper);
  display: block;
}
.hero__stat-label {
  font-size: .8rem;
  color: rgba(250,248,244,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Hero bottom bar */
.hero__bar {
  background: var(--gold);
  margin-top: 0;
  padding: 14px 0;
}
.hero__bar-inner {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.hero__bar-item {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 600;
  color: var(--ink);
}
.hero__bar-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb {
  padding: 16px 0;
  font-size: .8rem;
  color: var(--ink-60);
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--teal); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--ink-30); }

/* ─── INTRO SECTION ──────────────────────────────────────────────────────── */
.intro {
  padding: 64px 0 48px;
}
.intro__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}
.intro__body h2 {
  font-size: 1.9rem;
  margin-bottom: 16px;
}
.intro__body p {
  color: var(--ink-60);
  margin-bottom: 16px;
  font-size: 1rem;
}
.intro__body p strong { color: var(--ink); font-weight: 600; }

.intro__aside {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky; top: 80px;
}
.intro__aside h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--gold);
}
.toc__list {
  list-style: none;
  display: flex; flex-direction: column; gap: 4px;
}
.toc__list li { counter-increment: toc; }
.toc__list a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: .875rem;
  color: rgba(250,248,244,.7);
  transition: all .18s;
}
.toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'DM Serif Display', serif;
  font-size: .75rem;
  color: var(--gold);
  min-width: 24px;
}
.toc__list a:hover {
  background: rgba(255,255,255,.08);
  color: var(--paper);
}

/* ─── PAYSTUB EXPLAINER ──────────────────────────────────────────────────── */
.paystub {
  padding: 64px 0;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-3);
  border-bottom: 1px solid var(--paper-3);
}
.section__label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}
.section__sub {
  font-size: 1rem;
  color: var(--ink-60);
  max-width: 600px;
  margin-bottom: 48px;
}

.paystub__mockup {
  background: white;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}
.paystub__header {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.paystub__header-left h3 {
  font-size: 1rem;
  color: var(--paper);
  margin-bottom: 2px;
}
.paystub__header-left p { font-size: .8rem; color: rgba(250,248,244,.5); }
.paystub__header-right {
  text-align: right;
}
.paystub__header-right .amount {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--gold);
}
.paystub__header-right p { font-size: .75rem; color: rgba(250,248,244,.5); }

.paystub__.ch-page { padding: 24px 28px; }
.paystub__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--paper-2);
  font-size: .9rem;
}
.paystub__row:last-child { border-bottom: none; }
.paystub__row-label { color: var(--ink-60); }
.paystub__row-value { font-weight: 600; }
.paystub__row-value.negative { color: var(--red); }
.paystub__row-value.positive { color: var(--green); }
.paystub__row-value.neutral { color: var(--teal); }

.paystub__tag {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  margin-left: 8px;
  vertical-align: middle;
}
.tag--red { background: #fde8e6; color: var(--red); }
.tag--teal { background: var(--teal-light); color: var(--teal); }
.tag--gold { background: var(--gold-light); color: var(--gold); }

.paystub__net {
  background: var(--green-light);
  border-top: 2px solid var(--green);
  padding: 16px 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.paystub__net-label { font-weight: 700; font-size: 1rem; color: var(--green); }
.paystub__net-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: var(--green);
}

/* ─── CALCULADORAS GRID ──────────────────────────────────────────────────── */
.calcs { padding: 72px 0; }

.calcs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
}

.calc-card {
  background: var(--paper);
  padding: 28px;
  display: flex; flex-direction: column;
  gap: 12px;
  transition: background .2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.calc-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 3px;
  background: var(--gold);
  transition: width .3s ease;
}
.calc-card:hover { background: var(--paper-2); }
.calc-card:hover::after { width: 100%; }

.calc-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.calc-card__badge {
  display: inline-flex; align-items: center;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px;
  align-self: flex-start;
}
.badge--high { background: #fde8e6; color: var(--red); }
.badge--med  { background: var(--gold-light); color: var(--gold); }
.badge--free { background: var(--green-light); color: var(--green); }

.calc-card__title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.25;
}
.calc-card__desc {
  font-size: .875rem;
  color: var(--ink-60);
  line-height: 1.5;
  flex: 1;
}
.calc-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem;
  color: var(--ink-30);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--paper-3);
}
.calc-card__cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 600;
  color: var(--teal);
}
.calc-card__cta svg { width: 14px; height: 14px; }

/* FEATURED card */
.calc-card--featured {
  background: var(--ink);
  grid-column: span 2;
}
.calc-card--featured:hover { background: #1a2a3a; }
.calc-card--featured .calc-card__title { color: var(--paper); font-size: 1.4rem; }
.calc-card--featured .calc-card__desc { color: rgba(250,248,244,.6); }
.calc-card--featured .calc-card__meta { border-color: rgba(255,255,255,.1); color: rgba(250,248,244,.3); }
.calc-card--featured .calc-card__cta { color: var(--gold); }
.calc-card--featured::after { background: var(--gold); }

/* ─── LIVE CALCULATOR ────────────────────────────────────────────────────── */
.live-calc {
  padding: 72px 0;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.live-calc::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(200,146,42,.15) 0%, transparent 70%);
  pointer-events: none;
}

.live-calc__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.live-calc__copy h2 { color: var(--paper); font-size: clamp(1.6rem,3vw,2.4rem); margin-bottom: 16px; }
.live-calc__copy .section__label { margin-bottom: 12px; }
.live-calc__copy p { color: rgba(250,248,244,.6); margin-bottom: 24px; }

.live-calc__form {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 32px;
}

.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(250,248,244,.5);
  margin-bottom: 8px;
}
.field__input-wrap {
  position: relative;
}
.field__prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--gold);
  font-size: .95rem;
}
.field input, .field select {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  padding: 12px 14px;
  transition: border-color .2s;
  appearance: none;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
}
.field--with-prefix input { padding-left: 34px; }
.field select option { background: var(--ink); }

.calc__btn {
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .02em;
}
.calc__btn:hover {
  background: #d9a030;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,146,42,.3);
}

.calc__result {
  margin-top: 20px;
  display: none;
}
.calc__result.visible { display: block; }

.result__card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}
.result__header {
  background: var(--green);
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.result__header span { font-size: .8rem; color: rgba(255,255,255,.7); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.result__amount {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: white;
}
.result__breakdown { padding: 16px 20px; }
.result__line {
  display: flex; justify-content: space-between;
  font-size: .85rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--paper-2);
  color: var(--ink-60);
}
.result__line:last-child { border: none; }
.result__line strong { color: var(--ink); }
.result__note {
  font-size: .75rem;
  color: rgba(250,248,244,.35);
  margin-top: 12px;
  line-height: 1.5;
}

/* ─── DIFERENCIAS W2 vs 1099 ─────────────────────────────────────────────── */
.compare {
  padding: 72px 0;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-3);
}

.compare__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.compare__card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.compare__card-header {
  padding: 24px 28px;
  display: flex; align-items: center; gap: 14px;
}
.compare__card--w2 .compare__card-header { background: var(--blue); color: white; }
.compare__card--1099 .compare__card-header { background: var(--teal); color: white; }

.compare__card-header h3 {
  font-size: 1.4rem;
  color: white;
}
.compare__card-header p { font-size: .85rem; opacity: .75; margin-top: 2px; }
.compare__badge {
  background: rgba(255,255,255,.2);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
  margin-left: auto;
}

.compare__card-.ch-page {
  background: white;
  padding: 24px 28px;
}
.compare__item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--paper-2);
  font-size: .9rem;
}
.compare__item:last-child { border: none; }
.compare__item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 6px;
}
.compare__card--w2 .compare__item-dot { background: var(--blue); }
.compare__card--1099 .compare__item-dot { background: var(--teal); }
.compare__item-text strong { display: block; font-weight: 600; margin-bottom: 2px; }
.compare__item-text span { color: var(--ink-60); font-size: .85rem; }

/* ─── FAQ ─────────────────────────────────────────────────────────────────── */
.faq { padding: 72px 0; }

.faq__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-top: 48px;
}

.faq__item {
  border-bottom: 1px solid var(--paper-3);
  padding: 0;
}
.faq__question {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.faq__icon {
  width: 24px; height: 24px; flex-shrink: 0;
  background: var(--paper-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  color: var(--gold);
  transition: transform .2s, background .2s;
}
.faq__item.open .faq__icon {
  transform: rotate(45deg);
  background: var(--gold);
  color: white;
}
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq__answer p {
  font-size: .9rem;
  color: var(--ink-60);
  padding-bottom: 20px;
  line-height: 1.65;
}
.faq__item.open .faq__answer { max-height: 300px; }

/* ─── RESOURCES ──────────────────────────────────────────────────────────── */
.resources {
  padding: 72px 0;
  background: var(--paper-2);
  border-top: 1px solid var(--paper-3);
}

.resources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.resource-card {
  background: white;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .2s, transform .2s;
}
.resource-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.resource-card__icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.resource-card__name {
  font-weight: 700;
  font-size: .9rem;
}
.resource-card__desc {
  font-size: .8rem;
  color: var(--ink-60);
  flex: 1;
}
.resource-card__link {
  font-size: .78rem;
  color: var(--teal);
  font-weight: 600;
  margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}

/* ─── DISCLAIMER ─────────────────────────────────────────────────────────── */
.disclaimer {
  background: var(--paper-3);
  padding: 20px 0;
  border-top: 1px solid var(--paper-3);
}
.disclaimer p {
  font-size: .78rem;
  color: var(--ink-60);
  line-height: 1.6;
  max-width: 900px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 32px;
}
.footer__brand p {
  font-size: .875rem;
  color: rgba(250,248,244,.45);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 260px;
}
.footer__col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer__col a {
  font-size: .85rem;
  color: rgba(250,248,244,.45);
  transition: color .2s;
}
.footer__col a:hover { color: var(--paper); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem;
  color: rgba(250,248,244,.3);
}
.footer__bottom a { color: rgba(250,248,244,.5); }
.footer__bottom a:hover { color: var(--paper); }

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes ch-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__label  { animation: ch-fadeUp .5s ease both; }
.hero__title  { animation: ch-fadeUp .5s .1s ease both; }
.hero__sub    { animation: ch-fadeUp .5s .2s ease both; }
.hero__stats  { animation: ch-fadeUp .5s .3s ease both; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .intro__grid { grid-template-columns: 1fr; }
  .intro__aside { position: static; }
  .live-calc__inner { grid-template-columns: 1fr; }
  .compare__grid { grid-template-columns: 1fr; }
  .faq__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .calc-card--featured { grid-column: span 1; }
}
@media (max-width: 600px) {
  .nav__links { display: none; }
  .hero__stats { gap: 24px; }
  .footer__grid { grid-template-columns: 1fr; }
  .calcs__grid { grid-template-columns: 1fr; }
}