:root {
  --accent: #1da1f2;
  --accent-2: #0d8ddb;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #0f172a;
  --muted: #5f6b7a;
  --line: #dbe3ec;
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.14);
}

body.modo-oscuro {
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #172033;
  --text: #e5eef9;
  --muted: #9eb0c9;
  --line: #26344b;
  --shadow: 0 12px 34px rgba(2, 6, 23, 0.6);
  --shadow-strong: 0 20px 44px rgba(2, 6, 23, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -12%, rgba(29, 161, 242, 0.22), transparent 42%),
    radial-gradient(circle at 86% -18%, rgba(56, 189, 248, 0.16), transparent 46%),
    var(--bg);
  min-height: 100vh;
}

.news-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav-back,
.nav-bot {
  text-decoration: none;
  font-weight: 800;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-bot {
  justify-self: end;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.nav-bot:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.nav-title {
  text-align: center;
  min-width: 0;
}

.nav-title h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.nav-title p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.news-wrap {
  width: min(1100px, calc(100% - 22px));
  margin: 16px auto 44px;
  display: grid;
  gap: 14px;
}

.news-hero {
  display: grid;
}

.hero-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(29, 161, 242, 0.18), transparent 60%),
    radial-gradient(140% 120% at 100% 80%, rgba(34, 211, 238, 0.12), transparent 64%),
    var(--surface);
  box-shadow: var(--shadow-strong);
  padding: 16px 16px 14px;
}

.hero-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.4px;
}

.hero-card p {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  font-size: 12px;
}

.hero-meta .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 128px;
}

.news-media {
  background: color-mix(in srgb, var(--surface-soft) 75%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.news-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.news-snippet {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.news-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.news-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.news-open {
  text-decoration: none;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  transition: transform 0.15s ease, background 0.2s ease;
  white-space: nowrap;
}

.news-open:hover {
  transform: translateY(-1px);
  background: var(--accent-2);
}

.news-empty {
  text-align: center;
  padding: 28px 10px;
  color: var(--muted);
  border: 1px dashed color-mix(in srgb, var(--muted) 30%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  font-weight: 800;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 820px) {
  .news-nav {
    grid-template-columns: 1fr minmax(0, 2fr);
  }
  .nav-bot {
    display: none;
  }
  .news-card {
    grid-template-columns: 1fr;
  }
  .news-media {
    height: 190px;
  }
}

