/* El Obituario — Estilos de la página de crónicas y blog */
.obituario-hero {
  text-align: center;
  padding: 68px 24px 44px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.obituario-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 50% at 50% 20%, rgba(179, 19, 26, 0.2), transparent 70%);
}

.obituario-hero .kicker {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--blood-bright);
  text-transform: uppercase;
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.obituario-hero .kicker:before,
.obituario-hero .kicker:after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--blood-bright);
  opacity: 0.6;
}

.obituario-hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.obituario-hero h1 em {
  font-style: italic;
  color: var(--blood-bright);
  text-shadow: 0 0 30px rgba(179, 19, 26, 0.35);
}

.obituario-hero-sub {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--bone-dim);
  max-width: 58ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filtros por categoría */
.filters-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 28px 20px;
  border-bottom: 1px solid rgba(179, 19, 26, 0.12);
}

.filter-btn {
  background: rgba(18, 10, 11, 0.7);
  border: 1px solid rgba(179, 19, 26, 0.22);
  color: var(--bone-dim);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--bone);
  border-color: var(--blood-bright);
  background: rgba(179, 19, 26, 0.15);
}

.filter-btn.active {
  color: var(--bone);
  border-color: var(--blood-bright);
  background: var(--blood-bright);
  box-shadow: 0 4px 14px rgba(179, 19, 26, 0.4);
}

/* Contenedor principal de crónicas */
.obituario-main {
  padding: 50px 0 90px;
  min-height: 480px;
}

/* Grid de Artículos */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.article-card {
  background: linear-gradient(180deg, rgba(23, 12, 13, 0.8) 0%, rgba(15, 8, 9, 0.95) 100%);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.article-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blood-bright), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 19, 26, 0.55);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(122, 13, 18, 0.25);
}

.article-card:hover:before {
  opacity: 1;
}

.article-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #090405;
  border: 1px solid rgba(179, 19, 26, 0.22);
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-thumb img {
  transform: scale(1.05);
}

.article-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.75rem;
}

.article-card .card-kicker {
  color: var(--blood-bright);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.article-card .card-meta {
  color: var(--bone-dim);
}

.article-card h2,
.article-card h3 {
  font-family: "Fraunces", serif;
  font-size: 1.32rem;
  line-height: 1.3;
  margin: 0 0 12px;
  font-weight: 440;
  color: var(--bone);
  transition: color 0.2s;
}

.article-card:hover h2,
.article-card:hover h3 {
  color: #fff;
}

.article-card .card-excerpt {
  color: rgba(233, 226, 218, 0.72);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 20px;
  flex: 1;
}

.article-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(179, 19, 26, 0.14);
  font-size: 0.82rem;
  color: var(--blood-bright);
  font-weight: 500;
}

.article-card .card-footer svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.article-card:hover .card-footer svg {
  transform: translateX(5px);
}

/* ================= PÁGINA INDIVIDUAL DE CRÓNICA (SINGLE ARTICLE) ================= */
.single-article-page {
  padding: 40px 0 90px;
  max-width: 820px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--bone-dim);
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-breadcrumb a:hover {
  color: var(--blood-bright);
}

.article-breadcrumb .separator {
  opacity: 0.4;
}

.article-breadcrumb .current {
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.single-article-header {
  margin-bottom: 32px;
}

.single-article-header .article-category-badge {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blood-bright);
  background: rgba(179, 19, 26, 0.14);
  border: 1px solid rgba(179, 19, 26, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 16px;
}

.single-article-header h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--bone);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--bone-dim);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(179, 19, 26, 0.2);
  flex-wrap: wrap;
}

.article-meta-row .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-featured-image {
  margin: 0 0 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(179, 19, 26, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  background: #080304;
}

.article-featured-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-featured-image figcaption {
  font-size: 0.78rem;
  color: var(--bone-dim);
  padding: 10px 16px;
  background: rgba(18, 9, 11, 0.9);
  border-top: 1px solid rgba(179, 19, 26, 0.15);
  font-style: italic;
  text-align: right;
}

/* Tipografía de Lectura Extensa */
.single-article-body {
  font-size: 1.12rem;
  line-height: 1.85;
  color: rgba(233, 226, 218, 0.92);
}

.single-article-body p {
  margin-bottom: 1.55em;
}

.single-article-body p:first-of-type {
  font-size: 1.22rem;
  line-height: 1.8;
  color: var(--bone);
  font-family: "Fraunces", serif;
  font-style: italic;
  border-left: 2px solid var(--blood-bright);
  padding-left: 18px;
  margin-bottom: 2em;
}

.single-article-body h2 {
  font-family: "Fraunces", serif;
  font-size: 1.85rem;
  font-weight: 400;
  color: var(--bone);
  margin: 2.2em 0 0.8em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(179, 19, 26, 0.2);
  letter-spacing: -0.01em;
}

.single-article-body h3 {
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  font-weight: 440;
  color: #fff;
  margin: 1.9em 0 0.7em;
  letter-spacing: -0.01em;
}

.single-article-body h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bone);
  margin: 1.5em 0 0.6em;
}

.single-article-body a {
  color: var(--blood-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.single-article-body a:hover {
  color: #ff4754;
  text-shadow: 0 0 10px rgba(220, 39, 67, 0.45);
}

.single-article-body blockquote {
  border-left: 3px solid var(--blood-bright);
  padding: 18px 24px;
  margin: 2.2em 0;
  background: rgba(179, 19, 26, 0.08);
  border-radius: 0 6px 6px 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.16rem;
  line-height: 1.75;
  color: var(--bone);
  box-shadow: inset 2px 0 10px rgba(179, 19, 26, 0.1);
}

.single-article-body ul,
.single-article-body ol {
  padding-left: 28px;
  margin-bottom: 1.8em;
}

.single-article-body li {
  margin-bottom: 0.8em;
  line-height: 1.75;
}

.single-article-body strong {
  color: #fff;
}

/* Caja de Llamada a la Acción (CTA) de Finitud */
.article-cta-box {
  margin: 50px 0;
  background: linear-gradient(180deg, rgba(26, 13, 15, 0.9) 0%, rgba(14, 7, 9, 0.98) 100%);
  border: 1px solid var(--blood-bright);
  border-radius: 6px;
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(179, 19, 26, 0.15);
}

.article-cta-box:before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(179, 19, 26, 0.3);
  border-radius: 4px;
  pointer-events: none;
}

.article-cta-box .cta-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood-bright);
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}

.article-cta-box h3 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--bone);
}

.article-cta-box p {
  color: var(--bone-dim);
  font-size: 0.96rem;
  max-width: 52ch;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.article-cta-box .btn-cta-oraculo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--blood-bright), var(--blood-deep));
  color: var(--bone);
  text-decoration: none;
  padding: 13px 30px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 3px;
  border: 1px solid rgba(233, 226, 218, 0.25);
  box-shadow: 0 8px 24px rgba(179, 19, 26, 0.45);
  transition: all 0.2s ease;
}

.article-cta-box .btn-cta-oraculo:hover {
  background: linear-gradient(180deg, #c81820, var(--blood-bright));
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(179, 19, 26, 0.65);
}

/* Sección de Artículos Relacionados */
.related-articles-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(179, 19, 26, 0.25);
}

.related-articles-section h2,
.related-articles-section h3 {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0 0 24px;
  color: var(--bone);
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

/* Firma de Redacción */
.article-author-box {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 45px;
  padding: 22px;
  background: rgba(18, 9, 11, 0.6);
  border: 1px solid rgba(179, 19, 26, 0.2);
  border-radius: 4px;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(179, 19, 26, 0.2);
  border: 1px solid var(--blood-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blood-bright);
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.author-info h4 {
  margin: 0 0 4px;
  font-size: 0.96rem;
  color: var(--bone);
}

.author-info p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--bone-dim);
  line-height: 1.5;
}

/* Fallback silencioso para el lector emergente por compatibilidad */
.reader-modal-overlay {
  display: none !important;
}

@media (max-width: 768px) {
  .single-article-page {
    padding: 24px 16px 60px;
  }
  .single-article-header h1 {
    font-size: 2.1rem;
  }
  .article-cta-box {
    padding: 28px 18px;
  }
  .article-author-box {
    flex-direction: column;
    text-align: center;
  }
}
