/* ══════════════════════════════════════════════════
   Cadena de Favores
   Sigue el patrón del resto del sitio: hero oscuro
   permanente sobre la foto de fondo, secciones claras
   debajo, acento por área vía la variable --c.
══════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────── */
.fav-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;
}

/* El hero es oscuro siempre, así que en modo oscuro --white
   debe volver a ser blanco real. Mismo truco que usa style.css. */
[data-theme="dark"] .fav-hero {
  --white: #ffffff;
}

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

.fav-hero h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--white);
}

.fav-hero .eyebrow {
  color: #7fd4c4;
}

.fav-lede {
  font-size: clamp(1.02rem, 1.9vw, 1.16rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
  margin: 0 0 14px;
  max-width: 68ch;
}

.fav-lede-small {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.62);
  margin: 0;
  max-width: 64ch;
}

/* Hero de un área concreta: el icono toma el color del área */
.fav-hero-area .fav-hero-icon {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 1.7rem;
  color: var(--c, #7fd4c4);
}

.fav-hero-desc {
  margin-top: 18px;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  max-width: 70ch;
}

.fav-hero-desc p {
  margin: 0 0 12px;
}

/* ── Migas de pan ─────────────────────────────────── */
.fav-breadcrumb {
  margin-bottom: 22px;
}
.fav-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 600;
}
.fav-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.62);
}
.fav-breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(255,255,255,0.32);
}
.fav-breadcrumb a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
}
.fav-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Cifras del hero ──────────────────────────────── */
.fav-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.16);
}
.fav-hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fav-hero-stats strong {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.9rem;
  color: var(--gold);
  line-height: 1;
}
.fav-hero-stats span {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.68);
}

/* ── Secciones ────────────────────────────────────── */
.fav-section {
  padding: clamp(48px, 7vw, 76px) clamp(18px, 7vw, 88px);
  max-width: var(--max);
  margin: 0 auto;
}
.fav-section-alt {
  background: var(--bg-soft);
  max-width: none;
}
.fav-section-alt > * {
  max-width: var(--max);
  margin-inline: auto;
}

.fav-section-head {
  margin-bottom: 30px;
}
.fav-section-head h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
  color: var(--ink);
}

/* ── Rejilla de áreas ─────────────────────────────── */
.fav-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.fav-area-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fav-area-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--c, var(--teal));
}
.fav-area-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.fav-area-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--c, var(--teal));
  background: color-mix(in srgb, var(--c, var(--teal)) 12%, transparent);
}

.fav-area-card h2,
.fav-area-card h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.28rem;
  margin: 0;
  line-height: 1.25;
}
.fav-area-card h2 a,
.fav-area-card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.fav-area-card h2 a:hover,
.fav-area-card h3 a:hover {
  color: var(--c, var(--teal));
}

.fav-area-titular {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--muted);
}

.fav-area-count {
  margin: 0;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fav-area-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c, var(--teal));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.fav-area-link:hover {
  gap: 11px;
}

/* ── Lista de recursos ────────────────────────────── */
.fav-recursos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fav-recurso {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  position: relative;
}
.fav-recurso-destacado {
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: var(--shadow-soft);
}

.fav-recurso-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.fav-recurso-head h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.24rem;
  line-height: 1.3;
  margin: 0 0 6px;
}
.fav-recurso-head h2 a {
  color: var(--ink);
  text-decoration: none;
}
.fav-recurso-head h2 a:hover {
  color: var(--teal);
  text-decoration: underline;
}
.fav-recurso-head h2 i {
  font-size: 0.78em;
  opacity: 0.5;
}

.fav-recurso-autor {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}
.fav-recurso-autor strong {
  color: var(--ink-2);
}
.fav-recurso-dominio {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  opacity: 0.8;
}

.fav-recurso-nota {
  margin: 0 0 14px;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 74ch;
}

.fav-recurso-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.81rem;
  color: var(--muted);
}
.fav-recurso-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Cómo funciona ────────────────────────────────── */
.fav-porque {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.fav-porque h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin: 0;
  color: var(--ink);
}
.fav-porque-list {
  display: grid;
  gap: 22px;
}
.fav-porque-item {
  display: flex;
  gap: 16px;
  align-items: start;
}
.fav-porque-item i {
  font-size: 1.3rem;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.fav-porque-item h3 {
  font-size: 1.02rem;
  margin: 0 0 5px;
  color: var(--ink);
}
.fav-porque-item p {
  margin: 0;
  line-height: 1.62;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ── Aviso de licencias ───────────────────────────── */
.fav-aviso {
  display: flex;
  gap: 14px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  padding: 20px 24px;
}
.fav-aviso i {
  font-size: 1.2rem;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.fav-aviso p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}
.fav-aviso a {
  color: var(--teal);
}

/* ── Estado vacío ─────────────────────────────────── */
.fav-vacio {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
}
.fav-vacio i {
  font-size: 2rem;
  color: var(--gold);
}
.fav-vacio h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.4rem;
  margin: 14px 0 8px;
  color: var(--ink);
}
.fav-vacio p {
  margin: 0;
}

/* ── Llamada final ────────────────────────────────── */
.fav-cta {
  text-align: center;
}
.fav-cta-inner {
  background: linear-gradient(135deg, #102027 0%, #1a2f38 100%);
  border-radius: 16px;
  padding: clamp(34px, 6vw, 56px);
  color: #fff;
}
.fav-cta-inner h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  margin: 0 0 12px;
  color: #fff;
}
.fav-cta-inner p {
  margin: 0 auto 24px;
  max-width: 56ch;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
}

/* ── Móvil ────────────────────────────────────────── */
@media (max-width: 760px) {
  .fav-porque {
    grid-template-columns: 1fr;
  }
  .fav-recurso {
    padding: 20px;
  }
  .fav-hero-stats {
    gap: 22px;
  }
}
