/* ══════════════════════════════════════════════════════════════
   HERRAMIENTAS.CSS — Página índice + calculadoras
══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────── */

.tools-hero {
  background:
    linear-gradient(135deg, rgba(16,32,39,0.97) 0%, rgba(31,111,104,0.78) 100%),
    url("../img/hero-bg.jpg") center / cover;
  color: var(--white);
  padding: 88px clamp(18px, 7vw, 88px) 76px;
}

.tools-hero-inner {
  width: min(900px, 100%);
}

.tools-breadcrumb {
  margin-bottom: 22px;
}

.tools-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 600;
}

.tools-breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.62);
}

.tools-breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(255,255,255,0.32);
  font-weight: 400;
}

.tools-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.68);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}

.tools-breadcrumb a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tools-breadcrumb li[aria-current="page"] {
  color: var(--white);
  font-weight: 700;
}

.tools-hero h1 {
  margin: 0 0 18px;
  color: var(--white);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.02;
}

.tools-hero > .tools-hero-inner > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 1.12rem;
  line-height: 1.6;
}

/* ── Quicknav de categorías ──────────────────────────────────── */

.tools-quicknav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px clamp(18px, 6vw, 76px) 0;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.tools-quicknav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 180ms ease;
}

.tools-quicknav a:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.tools-quicknav a i {
  font-size: 0.95rem;
}

/* ── Cabeceras de categoría ──────────────────────────────────── */

.tools-grid-section {
  padding: 48px clamp(18px, 6vw, 76px);
  background: var(--paper);
  scroll-margin-top: 96px;
}

.tools-grid-section-alt {
  background: var(--paper-2);
}

.tools-category-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.tools-category-head > div {
  flex: 1;
  min-width: 0;
}

.tools-category-head .eyebrow {
  margin: 0 0 4px;
}

.tools-category-head h2 {
  margin: 0 0 6px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  color: var(--ink);
  line-height: 1.18;
}

.tools-category-head > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
  max-width: 680px;
}

.tools-category-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--teal)) 14%, transparent);
  color: var(--c, var(--teal));
  font-size: 1.4rem;
}

@media (max-width: 640px) {
  .tools-category-head {
    flex-direction: column;
    gap: 14px;
  }
  .tools-category-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.tool-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 240ms ease,
              border-color 240ms ease;
  overflow: hidden;
}

.tool-card:not(.tool-card-soon):hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(16, 32, 39, 0.14);
  border-color: rgba(31, 111, 104, 0.32);
}

.tool-card-featured {
  background:
    linear-gradient(135deg, var(--white) 0%, rgba(31,111,104,0.06) 100%);
  border-color: rgba(31, 111, 104, 0.35);
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(31, 111, 104, 0.08);
}

.tool-card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 99px;
}

.tool-card-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--icon-color) 12%, transparent);
  color: var(--icon-color);
  font-size: 1.7rem;
  flex-shrink: 0;
  margin-bottom: 18px;
  transition: transform 240ms ease;
}

.tool-card:not(.tool-card-soon):hover .tool-card-icon {
  transform: scale(1.05);
}

.tool-card-featured .tool-card-icon {
  margin-bottom: 0;
  width: 72px;
  height: 72px;
  font-size: 2rem;
}

.tool-card-body {
  flex: 1;
}

.tool-card h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.2;
}

.tool-card-featured h2 {
  font-size: 1.6rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.tool-card-features {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.tool-card-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.tool-card-features i {
  color: var(--teal);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 0.94rem;
  transition: gap 220ms ease, color 220ms ease;
}

.tool-card-featured .tool-card-cta {
  margin-top: 0;
  flex-shrink: 0;
}

.tool-card:not(.tool-card-soon):hover .tool-card-cta {
  gap: 12px;
  color: var(--gold);
}

.tool-card-secondary {
  background: var(--paper-2);
  border-color: transparent;
}

.tool-card-secondary h2 {
  font-size: 1.2rem;
}

.tool-card-soon {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.tool-card-soon .tool-card-cta {
  margin-top: 14px;
  font-size: 0.86rem;
}

.tool-card-soon .tool-card-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  border-bottom: 2px solid rgba(196, 134, 60, 0.4);
  padding-bottom: 2px;
}

.tool-card-soon .tool-card-cta a:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

/* ── Sección de contexto ─────────────────────────────────────── */

.tools-context {
  padding: 72px clamp(18px, 6vw, 76px);
  background: var(--paper-2);
}

.tools-context-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: 48px;
  width: min(1180px, 100%);
  margin: 0 auto;
  align-items: start;
}

.tools-context-text h2 {
  margin: 12px 0 18px;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.tools-context-text p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.tools-context-features {
  display: grid;
  gap: 16px;
}

.tools-context-features article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.tools-context-features i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(31, 111, 104, 0.1);
  color: var(--teal);
  font-size: 1.15rem;
  grid-row: 1 / 3;
}

.tools-context-features h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.tools-context-features p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-card-features {
    grid-template-columns: 1fr;
  }

  .tools-context-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tool-card {
    padding: 22px;
  }

  .tool-card-featured h2 {
    font-size: 1.35rem;
  }
}


/* ══════════════════════════════════════════════════════════════
   Páginas de categoría (landings dedicadas)
══════════════════════════════════════════════════════════════ */

.cat-intro {
  padding: 56px clamp(18px, 6vw, 76px);
  background: var(--paper);
}
.cat-intro-inner {
  width: min(820px, 100%);
  margin: 0 auto;
}
.cat-intro h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 18px;
}
.cat-intro p {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 14px;
}
.cat-intro p:last-child { margin-bottom: 0; }

/* Orden pedagógico — pasos numerados */
.cat-order {
  padding: 56px clamp(18px, 6vw, 76px);
  background: var(--paper-2);
}
.cat-order-inner {
  width: min(960px, 100%);
  margin: 0 auto;
}
.cat-order .eyebrow {
  margin: 0 0 8px;
}
.cat-order h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 28px;
}

.cat-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cat-steps > li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.cat-steps > li:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.cat-step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
}

.cat-steps h3 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.cat-steps p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.55;
}

.cat-step-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-right: 14px;
  transition: color 160ms ease;
}
.cat-step-link:hover { color: var(--teal-dark); text-decoration: underline; }

[data-theme="dark"] .cat-step-link { color: var(--teal); }
[data-theme="dark"] .cat-step-link:hover { color: var(--teal-dark); }

@media (max-width: 640px) {
  .cat-steps > li {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Artículos relacionados */
.cat-articles {
  padding: 56px clamp(18px, 6vw, 76px);
  background: var(--paper);
}
.cat-articles-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}
.cat-articles .eyebrow {
  margin: 0 0 8px;
}
.cat-articles h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 24px;
}

.cat-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.cat-article-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: inherit;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.cat-article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--teal);
}

.cat-article-card > i {
  font-size: 1.4rem;
  color: var(--teal);
  margin-bottom: 4px;
}

.cat-article-card h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1.25;
}

.cat-article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
