:root {
  --bg: #050608;
  --panel: #0b0f14;
  --panel-soft: #101722;
  --line: rgba(88, 149, 255, 0.16);
  --text: #f5f8fc;
  --muted: #a8b6c9;

  /* Palette Atalanta */
  --accent: #0057b8;
  --accent-strong: #00449a;
  --accent-soft: #59a8ff;
  --accent-pale: #b8dbff;

  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.22);
  --glow: 0 0 0 1px rgba(89, 168, 255, 0.10), 0 10px 26px rgba(0, 87, 184, 0.18);

  --radius: 20px;
  --maxw: 1600px;

  --ease: 220ms cubic-bezier(.2,.8,.2,1);

  /* Sticky layout */
  --header-sticky-top: 0px;
  --sports-sticky-top: 22px;
  --sidebar-top: 210px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 87, 184, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(89, 168, 255, 0.12), transparent 24%),
    linear-gradient(to bottom, #030405, #08111b 32%, #05080d 100%);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
}

.hero {
  position: sticky;
  top: var(--header-sticky-top);
  z-index: 80;
  overflow: hidden;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(0, 87, 184, 0.18), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(8, 14, 22, 0.97), rgba(8, 14, 22, 0.94));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 87, 184, 0.055) 0px,
      rgba(0, 87, 184, 0.055) 16px,
      rgba(0, 0, 0, 0) 16px,
      rgba(0, 0, 0, 0) 32px
    ),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  opacity: 0.28;
  pointer-events: none;
}

.hero-inner,
.page,
.footer-inner {
  position: relative;
  z-index: 1;
  width: min(var(--maxw), 100%);
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid rgba(89, 168, 255, 0.22);
  border-radius: 999px;
  color: var(--accent-pale);
  background: rgba(0, 87, 184, 0.10);
  transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.eyebrow:hover {
  transform: translateY(-1px);
  border-color: rgba(89, 168, 255, 0.32);
  background: rgba(0, 87, 184, 0.14);
  box-shadow: 0 8px 20px rgba(0, 87, 184, 0.12);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lead {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.stat {
  min-width: 150px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(0, 87, 184, 0.10), rgba(255,255,255,0.03));
  border: 1px solid rgba(89, 168, 255, 0.16);
  border-radius: 16px;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 168, 255, 0.26);
  background: linear-gradient(180deg, rgba(0, 87, 184, 0.16), rgba(255,255,255,0.035));
  box-shadow: var(--glow);
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat strong {
  font-size: 1.15rem;
}

.update-info {
  color: var(--muted);
  font-size: 0.98rem;
}

.update-info strong {
  color: var(--text);
}

.update-info.warning {
  color: #ffd27d;
}

.page {
  padding: 30px 20px 60px;
}

/* =========================
   LAYOUT PRINCIPALE A 3 COLONNE
   ========================= */

.page-layout {
  display: grid;
  grid-template-columns: minmax(300px, 320px) minmax(0, 1fr) minmax(320px, 360px);
  gap: 20px;
  align-items: start;
}

.sidebar {
  align-self: start;
}

.sidebar-left,
.sidebar-right {
  position: sticky;
  top: var(--sidebar-top);
}

.content-column {
  min-width: 0;
}

/* =========================
   BLOCCHI GENERICI
   ========================= */

.source-block {
  margin-bottom: 28px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 87, 184, 0.04));
  border: 1px solid rgba(89, 168, 255, 0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.news-block {
  margin-bottom: 0;
}

.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.source-head h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
}

.source-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.source-link {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--ease), opacity var(--ease), box-shadow var(--ease), filter var(--ease);
  box-shadow: 0 8px 22px rgba(0, 87, 184, 0.28);
}

.source-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.18) 45%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 600ms ease;
}

.source-link:hover {
  transform: translateY(-2px);
  opacity: 0.99;
  box-shadow: 0 12px 28px rgba(0, 87, 184, 0.36);
  filter: saturate(1.05);
}

.source-link:hover::before {
  transform: translateX(130%);
}

.source-link:active {
  transform: translateY(0);
}

/* =========================
   WIDGET SPORTIVI
   ========================= */

.sports-block {
  margin-bottom: 0;
}

.sports-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sports-subblock {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sports-subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-pale);
}

.widget-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(89, 168, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0, 87, 184, 0.04)),
    #0a0f15;
  box-shadow: var(--shadow-soft);
}

.widget-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 30%),
    radial-gradient(circle at top right, rgba(89, 168, 255, 0.08), transparent 24%);
  pointer-events: none;
  z-index: 1;
}

.sports-widget-frame {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
}

.widget-shell-upcoming {
  min-height: 250px;
  padding: 12px;
}

.widget-shell-recent {
  min-height: 420px;
}

.sports-widget-frame-recent {
  height: 420px;
}

.widget-shell-tall {
  min-height: 620px;
}

.sports-widget-frame-tall {
  height: 620px;
}

.widget-shell-standings {
  min-height: 1180px;
}

.sports-widget-frame-standings {
  height: 1180px;
}

.widget-credit {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.widget-credit a {
  color: var(--accent-pale);
  text-decoration: none;
  transition: color var(--ease), text-shadow var(--ease);
}

.widget-credit a:hover {
  color: var(--accent-soft);
  text-shadow: 0 0 14px rgba(89, 168, 255, 0.18);
}

.widget-placeholder {
  padding: 22px;
  border-radius: 16px;
  border: 1px dashed rgba(89, 168, 255, 0.22);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  line-height: 1.7;
}

.widget-placeholder strong {
  color: var(--text);
}

.widget-placeholder code {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 87, 184, 0.14);
  color: var(--accent-pale);
  font-size: 0.9em;
}

/* =========================
   NEWS GRID
   ========================= */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(89, 168, 255, 0.10);
  border-radius: 18px;
  background: linear-gradient(180deg, #0b1118, #0a0f15);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(89, 168, 255, 0.22);
  box-shadow: var(--glow);
  background: linear-gradient(180deg, #0c131b, #0b1017);
}

.article-image-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.article-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #0b1118;
  transition: transform 420ms ease, filter 260ms ease;
}

.article-card:hover .article-image {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.03);
}

.article-content {
  padding: 16px;
}

.article-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.article-source {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 87, 184, 0.16);
  border: 1px solid rgba(89, 168, 255, 0.20);
  color: var(--accent-pale);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.article-card:hover .article-source,
.archive-item:hover .article-source {
  transform: translateY(-1px);
  border-color: rgba(89, 168, 255, 0.32);
  background: rgba(0, 87, 184, 0.22);
  box-shadow: 0 6px 16px rgba(0, 87, 184, 0.14);
}

.article-date {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #89a7cf;
  margin-bottom: 0;
}

.article-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.45;
}

.article-card h3 a {
  text-decoration: none;
  transition: color var(--ease), text-shadow var(--ease);
}

.article-card h3 a:hover,
.archive-title a:hover {
  color: var(--accent-soft);
  text-shadow: 0 0 14px rgba(89, 168, 255, 0.18);
}

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

.empty-state {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,0.16);
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}

.empty-state.big {
  padding: 30px;
  text-align: center;
}

/* =========================
   FOOTER
   ========================= */

.footer {
  border-top: 1px solid rgba(89, 168, 255, 0.14);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0, 87, 184, 0.05));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner-stacked {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-sources {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footer-sources-title {
  margin-bottom: 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.footer-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-source-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 87, 184, 0.08);
  border: 1px solid rgba(89, 168, 255, 0.14);
  transition: transform var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.footer-source-item:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 168, 255, 0.24);
  background: rgba(0, 87, 184, 0.12);
  box-shadow: 0 8px 18px rgba(0, 87, 184, 0.12);
}

.footer-source-name {
  color: var(--text);
  font-size: 0.88rem;
}

.footer-source-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 87, 184, 0.18);
  color: var(--accent-pale);
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
}

.footer-source-item:hover .footer-source-count {
  transform: scale(1.05);
  background: rgba(0, 87, 184, 0.24);
  box-shadow: 0 6px 14px rgba(0, 87, 184, 0.16);
}

.footer-source-item.is-error {
  border: 1px solid rgba(255, 89, 89, 0.7) !important;
  background: rgba(255, 89, 89, 0.12) !important;
}

.footer-source-item.is-error .footer-source-name {
  color: #ffd5d5 !important;
}

.footer-source-item.is-error .footer-source-count {
  background: rgba(255, 89, 89, 0.22) !important;
  color: #ff5f5f !important;
}

/* =========================
   ARCHIVIO
   ========================= */

.hero-small {
  padding-top: 42px;
  padding-bottom: 28px;
}

.hero-actions {
  margin: 20px 0 10px;
}

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

.archive-item {
  padding: 16px 18px;
  border: 1px solid rgba(89, 168, 255, 0.10);
  border-radius: 16px;
  background: linear-gradient(180deg, #0b1118, #0a0f15);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.archive-item:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 168, 255, 0.22);
  box-shadow: var(--glow);
  background: linear-gradient(180deg, #0c131b, #0b1017);
}

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

.archive-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.archive-title a {
  text-decoration: none;
  transition: color var(--ease), text-shadow var(--ease);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1420px) {
  .page-layout {
    grid-template-columns: minmax(280px, 300px) minmax(0, 1fr) minmax(300px, 330px);
  }

  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar-left,
  .sidebar-right {
    position: static;
    top: auto;
  }

  .articles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .widget-shell-recent {
    min-height: 420px;
  }

  .sports-widget-frame-recent {
    height: 420px;
  }

  .widget-shell-standings {
    min-height: 1123px;
  }

  .sports-widget-frame-standings {
    height: 1123px;
  }
}

@media (max-width: 860px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    position: static;
    top: auto;
    padding-top: 32px;
  }

  .source-head h2 {
    font-size: 1.35rem;
  }
}

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

  .hero,
  .page,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lead {
    font-size: 1rem;
  }

  .article-image {
    height: 200px;
  }

  .hero::before {
    opacity: 0.18;
  }

  .widget-shell-upcoming {
    min-height: 220px;
  }

  .widget-shell-recent {
    min-height: 380px;
  }

  .sports-widget-frame-recent {
    height: 380px;
  }

  .widget-shell-standings {
    min-height: 980px;
  }

  .sports-widget-frame-standings {
    height: 980px;
  }
}