*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #161616;
  --paper: #f7f4ee;
  --paper-2: #fffdfa;
  --rule: #ddd6ca;
  --muted: #6f6a64;
  --accent: #b51f17;
  --accent-soft: rgba(181, 31, 23, 0.12);
  --warm: #efe9df;
  --card: #ffffff;
  --card-2: #fcfaf6;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --container: 1280px;
}

body.dark {
  --ink: #f3efe8;
  --paper: #111111;
  --paper-2: #171717;
  --rule: #2b2b2b;
  --muted: #b4aea6;
  --warm: #1d1d1d;
  --card: #181818;
  --card-2: #1d1d1d;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 24px;
}

.error-bar {
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 10px 18px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.88rem;
  position: sticky;
  top: 0;
  z-index: 300;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom: 1px solid var(--rule);
}

.topbar {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 92%, transparent);
}

.topbar-inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  opacity: 0.55;
}

.icon-button {
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
}

.masthead {
  padding: 16px 0;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
}

.masthead-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.brand-tagline {
  font-family: "DM Sans", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

.search-form {
  display: flex;
  gap: 8px;
  width: min(420px, 100%);
}

.search-input {
  flex: 1;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 11px 14px;
  font-family: "DM Sans", sans-serif;
}

.search-btn,
.newsletter-btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  font-family: "DM Sans", sans-serif;
}

.search-btn:hover,
.newsletter-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.nav {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 95%, transparent);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  gap: 14px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover {
  background: var(--warm);
  transform: translateY(-1px);
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  background: var(--card);
  border-radius: 999px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.ticker {
  border-bottom: 1px solid var(--rule);
  background: var(--card);
}

.ticker-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-badge {
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 7px 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-2);
}

.ticker-marquee {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  padding: 9px 18px;
  animation: marquee 26s linear infinite;
  font-family: "DM Sans", sans-serif;
  font-size: 0.88rem;
}

.ticker-item strong {
  color: var(--accent);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-45%);
  }
}

.main {
  padding: 28px 0 56px;
}

.section-title {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 3px double var(--rule);
  font-family: "DM Sans", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-bottom: 24px;
  align-items: start; /* evita que la columna derecha se estire */
}

.hero-feature {
  position: relative;
  min-height: 520px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--warm);
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
}

.hero-feature-image,
.hero-feature-image img {
  width: 100%;
  height: 100%;
}

.hero-feature-image img {
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-feature:hover .hero-feature-image img {
  transform: scale(1.05);
}

.hero-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  display: flex;
  align-items: end;
  padding: 28px;
}

.hero-feature-content {
  max-width: 760px;
  color: white;
}

.hero-feature-title {
  margin: 0 0 12px;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.06;
}

.hero-feature-summary {
  margin: 0 0 12px;
  font-size: 1.02rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.9);
}

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-feature .kicker {
  color: #ffd6d1;
}

.meta {
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-feature .meta {
  color: rgba(255, 255, 255, 0.78);
}

.hero-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start; /* importante */
}

.mini-feature {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease;
  min-height: 118px; /* control mínimo */
  max-height: 118px; /* evita que se estire */
}

.mini-feature:hover {
  transform: translateY(-2px);
}

.mini-feature-thumb {
  height: 118px;
  min-height: 118px;
  max-height: 118px;
  background: var(--warm);
  overflow: hidden;
}

.mini-feature-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-feature-body {
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.mini-feature-title {
  margin: 0 0 6px;
  font-family: "Playfair Display", serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.22;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 22px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.featured-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.featured-card:hover {
  transform: translateY(-3px);
}

.featured-card-image {
  height: 180px;
  background: var(--warm);
  overflow: hidden;
}

.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.featured-card:hover .featured-card-image img {
  transform: scale(1.05);
}

.featured-card-body {
  padding: 15px;
}

.featured-card-title {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.24;
}

.featured-card-summary {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

.news-stream {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stream-item {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--rule);
  transition:
    background 0.2s ease,
    padding-left 0.2s ease;
}

.stream-item:last-child {
  border-bottom: none;
}

.stream-item:hover {
  background: var(--card-2);
  padding-left: 20px;
}

.stream-title {
  margin: 0 0 7px;
  font-family: "Playfair Display", serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.22;
}

.stream-summary {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--muted);
}

.stream-thumb {
  height: 108px;
  border-radius: 12px;
  background: var(--warm);
  overflow: hidden;
}

.stream-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}

.panel-title {
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-body {
  padding: 14px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trending-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.trending-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.trending-title {
  font-family: "Playfair Display", serif;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.22;
}

.trending-meta {
  margin-top: 4px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.76rem;
  color: var(--muted);
}

.editorial-box {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
}

.editorial-box p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.empty-state {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.article-shell {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
}

.back-btn,
.share-btn {
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}

.article-head {
  padding: 22px 22px 0;
}

.article-title {
  margin: 8px 0 12px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.08;
}

.article-summary {
  margin: 0 0 16px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink);
  opacity: 0.92;
  font-weight: 600;
}

.article-meta {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
}

.article-image {
  margin-top: 16px;
  background: var(--warm);
}

.article-image img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.article-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 22px 34px;
  font-size: 1.06rem;
  line-height: 2;
  color: var(--ink);
  white-space: pre-line;
}

.related-section {
  margin-top: 16px;
  padding: 0 22px 28px;
}

.related-title {
  margin: 0 0 14px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.related-card {
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
}

.related-card-image {
  height: 150px;
  background: var(--warm);
}

.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-body {
  padding: 12px;
}

.related-card-title {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.24;
}

.footer {
  border-top: 3px double var(--rule);
  background: var(--paper-2);
  padding: 30px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 20px;
}

.footer-brand {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
}

.footer-title {
  margin-bottom: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 12px;
  font-family: "DM Sans", sans-serif;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .masthead-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    width: 100%;
  }

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .stream-item {
    grid-template-columns: 1fr;
  }

  .stream-thumb {
    display: none;
  }

  .mini-feature {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
  }

  .mini-feature-thumb {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
  }

  .mini-feature-body {
    padding: 12px;
  }

  .hero-feature {
    min-height: 380px;
  }

  .hero-feature-overlay {
    padding: 20px;
  }

  .newsletter-form {
    flex-direction: column;
  }
}
