/* ============================================================
   ISM Football — premium dark theme
   Brand: Deep Black & Gold (#daa520) on near-black backgrounds.
   ============================================================ */

:root {
  --bg: #0B0B0C;
  --surface: #121214;
  --surface-2: #1A1A1D;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #F5F5F7;
  --fg-soft: rgba(245, 245, 247, 0.85);
  --muted: rgba(245, 245, 247, 0.6);
  
  /* Jednotná zlatá paleta */
  --primary: #daa520;                         /* Hlavní zlatá */
  --primary-hover: #b8860b;                   /* Tmavší zlatá pro hover stavy */
  --hover-color: #daa520;                     /* Sjednoceno na zlatou */
  --hover-bg: rgba(255, 255, 255, 0.02);
  --primary-soft: rgba(218, 165, 32, 0.12);   /* Jemný zlatý podmaz (12% průhlednost) */
  --primary-fg: #0B0B0C;                      /* Černý text na zlatých prvcích pro luxusní kontrast */
  
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1280px;
  --font-display: "Oswald", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
} 

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

* { box-sizing: border-box; }
html, body {
  overflow-x: hidden; /* Tohle je klíčová oprava černého pruhu a scrollování do strany */
  width: 100%;
  max-width: 100vw;
}

html { 
  color-scheme: dark; 
  scroll-behavior: smooth; 
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem; /* Mírně jsme zvětšili základ i pro telefony */
  box-sizing: border-box;
}
@media (min-width: 768px) { 
  .container { padding-inline: 3rem; } 
}
@media (min-width: 1024px) { 
  .container { padding-inline: 2rem; } 
}

.text-primary { color: var(--primary); }
.text-muted { color: var(--muted); }

/* Podpora pro obě třídy (novou i stávající v JS) s prémiovým zlatým přechodem */
.text-gradient-gold,
.text-gradient-red {
  background: linear-gradient(135deg, #ffe082, #daa520, #a57c10);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--primary);
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); gap: 0.75rem; }
.btn-outline {
  background: rgba(18,18,20,0.6);
  border-color: var(--border);
  color: var(--fg-soft);
  backdrop-filter: blur(6px);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ───────── Navbar ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,12,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 1rem; 
  height: 64px;
  width: 100%;
}

.nav-brand { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  flex-shrink: 1; /* Dovolí levé části se smrsknout, pokud chybí místo */
  min-width: 0;   /* Zabrání přetékání textu ve flexboxu */
}
.nav-brand img { height: 36px; width: auto; object-fit: contain; }
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Přidá tečky, pokud se název na obrazovku už nevejde */
}
@media (max-width: 640px) { .nav-brand-name { display: none; } }

.nav-tools { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  flex-shrink: 0; /* Zaručí, že hamburger menu a přepínač jazyků nikdy nezmizí */
}

.nav-links { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--fg-soft); transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }


.lang-switch {
  display: inline-flex; padding: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px;
}
.lang-switch button {
  padding: 0.35rem 0.8rem;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: transparent; border: 0; color: var(--muted);
  border-radius: 999px;
}
.lang-switch button.active { background: var(--primary); color: var(--primary-fg); }

.menu-toggle {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: transparent; color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
@media (min-width: 900px) { .menu-toggle { display: none; } }

/* ───────── Navbar — Upravené mobilní menu pro maximální plynulost ───────── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  background: var(--bg);
  border-top: 1px solid transparent;
  
  /* Kombinace pro super plynulý chod animovaný přes grafickou kartu */
  transition: 
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s ease;
}

.mobile-menu.open {
  max-height: 400px; /* Bezpečná rezerva, kam se všechny odkazy pohodlně vejdou */
  opacity: 1;
  transform: translateY(0);
  border-top: 1px solid var(--border);
}

.mobile-menu a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem; font-weight: 500;
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a.active { color: var(--primary); }

/* ───────── Hero ───────── */
.hero {
  position: relative; isolate: isolate;
  overflow: hidden;
}
.hero picture {
  position: absolute; 
  inset: 0; 
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
}

/* 1. ZMĚNA: Vrácen stoprocentní jas původní fotky */
.hero-bg {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  opacity: 1; /* Původně 0.45 — nyní fotka svítí naplno */
}

/* 2. ZMĚNA: Černý přechodový filtr je kompletně vypnutý */
.hero::after {
  display: none; /* Úplně skryje ten ztmavovací gradient, co byl přes fotku */
}
.hero-inner { padding: 3.5rem 1.25rem 4rem; max-width: 56rem;}
@media (min-width: 768px) { .hero-inner { padding: 10rem 0 11rem; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(218, 165, 32, 0.4); /* Sjednoceno na zlatou */
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.7rem; font-weight: 600;
  color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.18em;
}
.hero-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }
.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
}
.hero p.lead {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--fg-soft);
  max-width: 40rem;
}
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ───────── Page header (subpages) ───────── */
.page-header {
  border-bottom: 1px solid var(--border);
  background: rgba(18,18,20,0.4);
}
.page-header-inner { padding: 2.5rem 1.25rem; max-width: 56rem; }
@media (min-width: 768px) { .page-header-inner { padding: 6rem 0; } }
.page-header h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
}
.page-header p {
  margin-top: 1rem;
  font-size: 1.1rem; color: var(--muted);
  max-width: 36rem;
}

/* ───────── Sections ───────── */
section.section { padding: 5rem 0; }
@media (min-width: 768px) { section.section { padding: 6rem 0; } }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.section-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}
.view-all {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 600; color: var(--primary);
  transition: gap 0.2s;
}
.view-all:hover { gap: 0.85rem; }

/* ───────── Stats ───────── */
.stats-strip {
  border-block: 1px solid var(--border);
  background: rgba(18,18,20,0.4);
}
.stats-strip-inner {padding: 2rem 1.25rem; }
.stats-title { font-size: 1.6rem; text-align: center; margin-bottom: 2.5rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}
.stat-card {
  padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.stat-card .icon {
  width: 28px; height: 28px; margin: 0 auto;
  color: var(--primary);
}
.stat-value {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 800;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #c2c2c2 !important;
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* ───────── Cards generic ───────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { 
  border-color: var(--hover-color); 
  transform: translateY(-2px); 
}
.card .media { overflow: hidden; background: #0c0c0c; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .media img { transform: scale(1.05); }

/* ───────── Player card ───────── */
.player-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .player-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (min-width: 1100px) { .player-grid { grid-template-columns: repeat(4, 1fr); } }

.player-card { position: relative; }
.player-card .media { aspect-ratio: 4 / 5; position: relative; }
.player-card .badge {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: var(--primary); color: var(--primary-fg);
  font-size: 0.65rem; font-weight: 700;
  padding: 0.25rem 0.5rem; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.player-card .body { padding: 1rem; }
.player-card h3 { font-size: 1.05rem; line-height: 1.2; }
.player-card .born { margin-top: 0.2rem; font-size: 0.75rem; color: var(--muted); }
.player-card .club {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; color: var(--fg-soft);
}
.player-card .club img { width: 22px; height: 22px; object-fit: contain; }

/* ───────── Team card ───────── */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.team-grid > .team-card {
  flex: 1 1 280px;
}

@media (min-width: 1024px) {
  .team-grid.cols-3 > .team-card {
    max-width: calc(33.333% - 0.84rem);
  }
  .team-grid.cols-4 > .team-card {
    max-width: calc(25% - 0.94rem);
  }
}

.team-card .media { aspect-ratio: 4 / 5; }
.team-card .body { padding: 1.25rem; }
.team-card h3 { font-size: 1.1rem; }
.team-card .role { margin-top: 0.3rem; color: var(--primary); font-weight: 500; font-size: 0.875rem; }
.team-card .contacts {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.78rem;
}
.team-card .contacts a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--fg-soft); transition: color 0.2s;
}
.team-card .contacts a:hover { color: var(--primary); }

/* ───────── Team preview (Homepage) ───────── */
.team-preview-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.team-preview-grid > .team-preview {
  flex: 0 0 calc(50% - 0.5rem);
  max-width: calc(50% - 0.5rem);
}

@media (min-width: 768px) {
  .team-preview-grid {
    gap: 1.5rem;
  }
  .team-preview-grid > .team-preview {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
  }
}

.team-preview .media { aspect-ratio: 1 / 1; }
.team-preview .body { padding: 1rem; }

/* ───────── News card ───────── */
.news-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .news-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .news-grid.lg-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .news-grid.md-2 { grid-template-columns: repeat(2, 1fr); } }
.news-card { display: flex; flex-direction: column; }
.news-card .media { aspect-ratio: 16 / 10; }
.news-card .body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.news-card .date {
  font-size: 0.72rem; color: var(--primary);
  font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.news-card h3 { margin-top: 0.75rem; font-size: 1.25rem; line-height: 1.3; }
.news-card .excerpt {
  margin-top: 0.5rem; color: var(--muted);
  font-size: 0.9rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .read-more {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 0.4rem;
}

/* ───────── About blocks ───────── */
.about-blocks { max-width: 56rem; }
.about-blocks > * + * { margin-top: 3.5rem; }
.about-block h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 0.85rem;
}
.about-block h2 span { color: var(--primary); }
.about-block p { color: var(--fg-soft); font-size: 1rem; }
.values-grid {
  margin-top: 2rem;
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card {
  padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.value-card h3 { color: var(--primary); font-size: 1.2rem; }
.value-card p { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

/* ───────── About preview (home) ───────── */
.about-preview {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .about-preview { grid-template-columns: 1fr 1fr; } }
.about-preview h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-top: 1rem; line-height: 1.25; }
.about-preview .value-mini-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}

/* ───────── Players controls ───────── */
.controls {
  display: grid; gap: 0.75rem;
  grid-template-columns: 1fr;
  padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
@media (min-width: 768px) {
  .controls { grid-template-columns: 1fr 1fr 1fr auto; }
}
.controls input, .controls select, .controls button {
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.controls input::placeholder { color: var(--muted); }
.controls input:focus, .controls select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.controls .sort-dir {
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s;
}
.controls .sort-dir:hover { color: var(--primary); border-color: var(--primary); }
.empty-state {
  padding: 5rem 0; text-align: center; color: var(--muted);
}

/* ───────── SEKCE KONTAKT ───────── */
.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

a.contact-card:hover {
  border-color: var(--hover-color);
  background-color: var(--hover-bg);
  cursor: pointer;
}

.contact-card .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  flex-shrink: 0;
  color: var(--primary, #daa520); /* Sjednoceno na zlatou */
}

.contact-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-card .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.contact-card .lines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-card .lines p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr); 
  }

  .contact-card:first-child {
    grid-column: span 3;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.75rem;
  }

  .contact-card:first-child .contact-body,
  .contact-card:first-child .lines {
    align-items: center;
  }
}

/* ───────── Section title with rule ───────── */
.rule-title {
  display: flex; align-items: center; gap: 0.85rem;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin-bottom: 2rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.rule-title::before {
  content: ""; display: block; width: 40px; height: 1px; background: var(--primary);
}

/* ───────── Footer ───────── */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: #0e0e10;
}
.footer-grid {
  padding-block: 3.5rem;
  display: grid; 
  gap: 1.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { 
  .footer-grid { 
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem; 
  } 
}
.footer-col h4 {
  font-size: 0.72rem; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.18em;
  margin-bottom: 0.75rem;
}
.footer-col p, .footer-col a {
  font-size: 0.875rem; color: var(--fg-soft);
}
.footer-col a:hover { color: var(--primary); }
.footer-col .with-ico {
  display: inline-flex; align-items: center; gap: 0.5rem; margin: 0.3rem 0;
}
.footer-instagram {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.875rem; transition: all 0.2s;
}
.footer-instagram:hover { border-color: var(--primary); color: var(--primary); }

.sub-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--muted);
}

/* ───────── Icons ───────── */
.icon { width: 1em; height: 1em; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 22px; height: 22px; }

/* ───────── News Detail Modal ───────── */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease forwards;
}

.news-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.news-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary); /* Sjednoceno na zlatou */
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0;
  display: block; 
}

.news-modal-close::before,
.news-modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background-color: var(--primary-fg); /* Tmavá barva pro skvělý kontrast */
  border-radius: 10px;
}

.news-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.news-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.news-modal-close:hover {
  transform: rotate(90deg);
  background: var(--primary-hover);
}

.news-modal-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

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

.news-modal-body {
  padding: 2rem;
}

.news-modal-body h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-top: 0.5rem;
  line-height: 1.2;
}

.news-modal-text {
  margin-top: 1.5rem;
  color: var(--fg-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Animace */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.news-modal-content::-webkit-scrollbar {
  width: 8px;
}
.news-modal-content::-webkit-scrollbar-track {
  background: var(--surface);
}
.news-modal-content::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
.news-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ───────── MODÁLNÍ OKNO (ZATMĚNÍ POZADÍ) ───────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: flex-start; 
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 3000;
  padding: 3rem 1.5rem;
  animation: modalFadeIn 0.2s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

.modal-overlay.closing {
  animation: modalFadeOut 0.2s ease forwards;
}
@keyframes modalFadeOut {
  from { opacity: 1; } to { opacity: 0; }
}

/* ───────── KARTA DETAILU HRÁČE ───────── */
.player-detail-card {
  position: relative;
  background: #111111;
  border: 1px solid #222222;
  border-radius: var(--radius, 14px);
  width: 100%;
  max-width: 760px;
  padding: 3rem 2.5rem 2.5rem 2.5rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  margin-top: auto;
  margin-bottom: auto;
}

.modal-close-btn {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 34px;
  height: 34px;
  background: var(--primary); /* Sjednoceno na zlatou */
  color: var(--primary-fg);   /* Tmavý text pro excelentní čitelnost */
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 100;
}

.modal-close-btn:hover {
  transform: scale(1.1);
  background: var(--primary-hover);
}

.player-modal-body {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* LEVÁ STRANA */
.player-media-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 35%;
}

.club-logo-wrapper {
  min-height: 65px;
  display: flex;
  align-items: center;
}

.club-logo {
  max-height: 65px;
  width: auto;
  object-fit: contain;
}

.player-image-wrapper {
  width: 100%;
  border-radius: var(--radius, 8px);
  overflow: hidden;
}

.player-main-img {
  width: 100%;
  height: auto;
  display: block;
}

/* PRAVÁ STRANA */
.player-info-block {
  width: 65%;
  display: flex;
  flex-direction: column;
}

.player-header-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.player-number {
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary); /* Používá hlavní zlatou */
  line-height: 0.85;
}

.player-title-box h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  line-height: 1.1;
}

.player-modal-divider {
  height: 1px;
  background: #222222;
  margin: 2rem 0;
}

.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

.player-description-box {
  margin-top: 0.5rem;
}

.player-description-box p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cccccc;
  margin: 0;
  text-align: justify;
}

/* RESPONSIVNÍ MOBILNÍ MODAL */
@media (max-width: 680px) {
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-start !important;
  }

  .player-detail-card {
    margin: 0 !important;
    width: 100% !important;
    min-height: 100vh;
    border-radius: 0 !important;
    border: none !important;
    padding: 5rem 1.5rem 3rem 1.5rem !important;
  }

  .modal-close-btn {
    position: fixed !important;
    top: 15px !important;
    left: 15px !important;
    margin: 0 !important;
    z-index: 3100 !important;
  }

  .player-modal-body {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .player-media-block, 
  .player-info-block {
    width: 100% !important;
    align-items: center;
  }

  .club-logo-wrapper {
    min-height: auto;
  }

  .player-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .player-number {
    font-size: 4rem;
  }

  .player-title-box h2 {
    font-size: 2rem;
  }

  .player-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    text-align: center;
  }

  .player-description-box p {
    text-align: left !important;
    font-size: 0.95rem;
  }
}

/* ───────── Legendu karty ───────── */
.legends-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}

.legend-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.legend-card .body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.legend-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.legend-teams {
  font-size: 0.8rem;
  color: var(--primary); /* Používá zlatou */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.85rem 0;
}

.legend-desc {
  font-size: 0.9rem;
  color: var(--fg-soft);
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .legends-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.legend-card .media {
  width: 100%;
  aspect-ratio: 3 / 2; 
  overflow: hidden;
  background: #121214;
}

.legend-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;   
  object-position: center center; 
  transition: transform 0.3s ease;
}

/* ───────── SEKCE 404 ───────── */
.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 250px); 
  padding: 6rem 1.5rem;
  box-sizing: border-box;
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 540px;
  width: 100%;
}

.error-code {
  font-size: clamp(6rem, 16vw, 10rem);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--border);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.error-code::after {
  content: '.';
  color: var(--primary); /* Sjednoceno na zlatou */
  -webkit-text-stroke: 0;
}

.error-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 1rem 0;
}

.error-text {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 2.5rem 0;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 2.25rem;
  background: var(--primary); /* Sjednoceno na zlatou */
  color: var(--primary-fg);  /* Tmavá barva textu */
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.375rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.error-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  cursor: pointer;
}

/* ───────── Resizing & Adjustments ───────── */
.nav-row {
  height: 72px; 
}

.nav-brand img {
  height: 42px;
}

.mobile-menu a {
  font-size: 1.1rem;
  padding: 1rem 0;
}

.menu-toggle {
  width: 44px;
  height: 44px;
}

@media (min-width: 900px) {
  .nav-row {
    height: 95px; 
  }

  .nav-brand img {
    height: 73px;
  }
  
  .nav-brand-name {
    font-size: 1.4rem; 
  }

  .nav-links a {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
}

/* ───────── Karusel Top Hráčů ───────── */
.top-players-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* FIX: Vytvoříme bezpečný prostor pro hover efekt */
  padding-top: 12px;
  margin-top: -12px;
  padding-bottom: 1.25rem;
}

.top-players-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-nav {
  display: flex;
  gap: 0.5rem;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg);
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg); /* Tmavý vnitřek na hover */
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .carousel-slide { 
    flex: 0 0 calc(50% - 0.75rem); 
  }
}

@media (min-width: 1024px) {
  .carousel-nav {
    display: none;
  }
  
  .top-players-carousel {
    overflow-x: visible;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .carousel-slide { 
    flex: 0 0 calc(25% - 1.125rem); 
    max-width: calc(25% - 1.125rem);
  }
}

.footer-logo {
  display: block;
  margin-bottom: 1rem;
  height: auto; 
  width: 200px;
}

@media (max-width: 767px) {
  .footer-logo {
    height: 80px; 
    width: auto;
  }
}

@media (max-width: 767px) {
  .desktop-only {
    display: none;
  }
}

@media (min-width: 768px) {
  .desktop-only {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
}

/* ==========================================
   DYNAMICKÝ MOBILNÍ HERO (PROFILISM)
   ========================================== */

/* Globální nastavení výšky navbaru pro odečet */
:root {
  --navbar-height-mobile: 70px; /* Upravte podle skutečné výšky vašeho navbaru na mobilu */
}

/* Na počítači a tabletech schováme mobilní hero */
.hero-mobile.mobile-only {
  display: none !important;
}

/* Na mobilech (do šířky 767px) */
@media (max-width: 767px) {
  /* Skryjeme původní desktopový hero */
  .hero.desktop-only {
    display: none !important;
  }

  /* Aktivujeme a stylovaný nový mobilní hero */
  .hero-mobile.mobile-only {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    width: 100% !important;
    
    /* OPRAVA: Změněno z 100dvh na 100svh — výška se teď při scrollu nebude měnit */
    height: calc(100svh - var(--navbar-height-mobile, 70px)) !important;
    
    position: relative !important;
    overflow: hidden !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    
    /* Pozadí se bude plynule posouvat společně se stránkou */
    background-attachment: scroll !important; 
    
    transition: background-image 0.5s ease-in-out !important;
    box-sizing: border-box !important;
  }

  /* Černý přechod zespodu nahoru pro perfektní kontrast textů */
  .hero-mobile-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.4) 45%,
      rgba(0, 0, 0, 0.85) 75%,
      #000000 100%
    ) !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }

  /* Vnitřní obal s obsahem */
  .hero-mobile-inner {
    position: relative !important;
    z-index: 2 !important;
    padding: 0 24px 32px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Horní badge (tagline) */
  .hero-mobile-badge {
    align-self: flex-start !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    color: #dfa129 !important; /* Zlatá barva */
    background-color: rgba(223, 161, 41, 0.15) !important;
    border: 1px solid rgba(223, 161, 41, 0.3) !important;
    padding: 6px 14px !important;
    border-radius: 100px !important;
    text-transform: uppercase !important;
    margin: 0 !important;
  }

  /* Hlavní nadpis H1 na mobilu */
  .hero-mobile-inner h1 {
    color: #ffffff !important;
    font-size: 28px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    margin: 0 !important;
    letter-spacing: -0.5px !important;
    text-align: left !important;
  }

  /* Popisný odstavec (lead) */
  .hero-mobile-inner .lead {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    font-weight: 400 !important;
    max-width: 95% !important;
    text-align: left !important;
  }

  /* Skupina tlačítek seřazených pod sebou */
  .hero-mobile-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 8px !important;
    width: 100% !important;
  }

  /* Tlačítka */
  .hero-mobile-actions .btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
  }

  /* Hlavní zlaté tlačítko */
  .hero-mobile-actions .btn-primary {
    background-color: #dfa129 !important;
    color: #000000 !important;
    border: none !important;
  }

  /* Ikona šipky v tlačítku */
  .hero-mobile-actions .btn-primary svg {
    margin-left: 6px !important;
    width: 16px !important;
    height: 16px !important;
  }

  /* Sekundární tmavé tlačítko */
  .hero-mobile-actions .btn-outline {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
}
