/* ============================================
   Last Dance Hub — Main Stylesheet v2
   Changes: removed ad-slot placeholders,
   added player images, polls, full mobile fix
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600&display=swap');

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C96A;
  --gold-dim:    #7A5E24;
  --pitch:       #0A0A0A;
  --surface:     #111111;
  --surface2:    #1A1A1A;
  --surface3:    #242424;
  --border:      rgba(201,168,76,0.18);
  --border-sub:  rgba(255,255,255,0.07);
  --text:        #F0EDE4;
  --text-muted:  #7A776E;
  --text-dim:    #4A4740;
  --argentina:   #74ACDF;
  --portugal:    #D4000F;
  --radius:      6px;
  --radius-lg:   12px;
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:   'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--pitch);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* ---- Typography ---- */
h1,h2,h3,h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 0.8rem; font-weight: 700; font-family: var(--font-body);
     letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
p { margin-bottom: 1rem; }

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}
.section    { padding: 4rem 0; }
.section--sm { padding: 2.5rem 0; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.nav__inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  max-width: 1100px; margin: 0 auto;
  width: 100%;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 900;
  color: var(--gold); letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav__logo span { color: var(--text); }
.nav__links {
  display: flex; gap: 1.5rem; list-style: none;
  align-items: center;
}
.nav__links a {
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.2s; white-space: nowrap;
}
.nav__links a:hover,
.nav__links a.active { color: var(--gold); }
.nav__hamburger {
  display: none; cursor: pointer;
  background: none; border: none;
  color: var(--text); font-size: 1.4rem;
  padding: 0.25rem 0.5rem;
  line-height: 1; flex-shrink: 0;
}

/* Mobile nav drawer */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.98);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2rem; z-index: 199;
  }
  .nav__links.open { display: flex; }
  .nav__links a { font-size: 1.1rem; }
  .nav__hamburger { display: block; z-index: 201; position: relative; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex; align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero__bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 80%, rgba(201,168,76,0.06) 0%, transparent 70%);
}
.hero__grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero__content {
  position: relative; z-index: 2;
  padding: 3rem 0;
  width: 100%;
}
.hero__eyebrow {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero__eyebrow::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--gold);
  flex-shrink: 0;
}
.hero__title { margin-bottom: 1.25rem; }
.hero__title em { font-style: italic; color: var(--gold); display: block; }
.hero__sub {
  font-size: 1rem; color: var(--text-muted);
  max-width: 520px; margin-bottom: 2rem; line-height: 1.8;
}
.hero__ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero__countdown-label {
  font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.countdown {
  display: flex; gap: 1rem; align-items: flex-end;
  flex-wrap: wrap;
}
.countdown__unit { text-align: center; }
.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900; color: var(--gold);
  line-height: 1; display: block;
}
.countdown__label {
  font-size: 0.65rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim); margin-top: 4px;
}
.countdown__sep {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--gold-dim); margin-bottom: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.825rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer; border: none;
  transition: all 0.2s; white-space: nowrap;
}
.btn--gold { background: var(--gold); color: #0A0A0A; }
.btn--gold:hover { background: var(--gold-light); color: #0A0A0A; }
.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-head { margin-bottom: 2.5rem; }
.section-head h4 { margin-bottom: 0.4rem; }
.section-head h2 { margin-bottom: 0.6rem; }
.section-head p  { color: var(--text-muted); max-width: 500px; }

/* ============================================
   PLAYER CARDS — with image support
   ============================================ */
.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.player-card {
  background: var(--surface);
  position: relative; overflow: hidden;
  transition: background 0.2s;
}
.player-card:hover { background: var(--surface2); }
.player-card--messi   { border-top: 3px solid var(--argentina); }
.player-card--ronaldo { border-top: 3px solid var(--portugal); }

/* Player image banner */
.player-card__img-wrap {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden; background: var(--surface3);
  position: relative;
}
.player-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}
.player-card:hover .player-card__img-wrap img { transform: scale(1.03); }
.player-card__img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  font-size: 4rem;
}

.player-card__body { padding: 1.75rem; }
.player-card__country {
  font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.player-card__name {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900; margin-bottom: 1.25rem;
}
.player-card__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.stat__num {
  font-size: 1.6rem; font-weight: 700;
  font-family: var(--font-display);
  color: var(--gold); line-height: 1;
}
.stat__label {
  font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); margin-top: 3px;
}
.player-card__bio {
  font-size: 0.875rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 1.25rem;
}

/* ============================================
   COMPARE TABLE
   ============================================ */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-sub);
  font-size: 0.9rem;
}
.compare-table td:first-child  { text-align: right; color: var(--argentina); font-weight: 600; font-size: 1.05rem; }
.compare-table td:last-child   { color: var(--portugal); font-weight: 600; font-size: 1.05rem; }
.compare-table td:nth-child(2) {
  text-align: center; color: var(--text-dim);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.compare-table tr:hover td { background: var(--surface2); }

/* ============================================
   MATCHES
   ============================================ */
.matches-list { display: flex; flex-direction: column; gap: 1px; }
.match-row {
  background: var(--surface);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 90px 1fr auto;
  align-items: center; gap: 0.75rem;
  transition: background 0.15s;
}
.match-row:hover { background: var(--surface2); }
.match-row--live { border-left: 2px solid #22c55e; }
.match-team { font-size: 0.9rem; font-weight: 500; }
.match-team--home { text-align: right; }
.match-score {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700; color: var(--gold);
}
.match-score--upcoming {
  font-family: var(--font-body);
  font-size: 0.72rem; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.match-meta { font-size: 0.75rem; color: var(--text-dim); text-align: right; }
.badge {
  display: inline-block; padding: 2px 7px;
  border-radius: 20px; font-size: 0.68rem;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge--live     { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge--upcoming { background: var(--surface3); color: var(--text-dim); }
.badge--finished { background: var(--surface3); color: var(--text-dim); }

/* ============================================
   ARTICLES GRID
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
}
.article-card {
  background: var(--surface); padding: 1.5rem;
  transition: background 0.15s;
  display: flex; flex-direction: column;
}
.article-card:hover { background: var(--surface2); }
.article-card__cat {
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 0.6rem;
}
.cat--messi   { color: var(--argentina); }
.cat--ronaldo { color: var(--portugal); }
.cat--analysis,.cat--general,.cat--match { color: var(--gold); }
.article-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  line-height: 1.3; margin-bottom: 0.6rem; color: var(--text);
}
.article-card__excerpt {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.6; flex: 1; margin-bottom: 1rem;
}
.article-card__footer {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 0.72rem; color: var(--text-dim);
}

/* ============================================
   POLLS
   ============================================ */
.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.poll-card {
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.poll-card:hover { border-color: var(--border); }
.poll-card__label {
  font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.6rem;
}
.poll-card__q {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  line-height: 1.3; margin-bottom: 1.25rem;
  color: var(--text);
}
.poll-options { display: flex; flex-direction: column; gap: 0.6rem; }
.poll-option {
  position: relative; overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  cursor: pointer; transition: border-color 0.2s;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  width: 100%; text-align: left;
}
.poll-option:hover:not([disabled]) { border-color: var(--gold); color: var(--gold); }
.poll-option[disabled] { cursor: default; }
.poll-option__bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: var(--radius);
  transition: width 0.6s ease;
  z-index: 0;
}
.poll-option__bar--messi   { background: rgba(116,172,223,0.15); }
.poll-option__bar--ronaldo { background: rgba(212,0,15,0.1); }
.poll-option__bar--gold    { background: rgba(201,168,76,0.12); }
.poll-option__text {
  position: relative; z-index: 1; flex: 1;
}
.poll-option__pct {
  position: relative; z-index: 1;
  font-size: 0.8rem; font-weight: 700;
  color: var(--gold); min-width: 36px; text-align: right;
}
.poll-option.winner { border-color: var(--gold); }
.poll-total {
  font-size: 0.75rem; color: var(--text-dim);
  margin-top: 0.75rem; text-align: right;
}
.poll-voted-msg {
  font-size: 0.78rem; color: var(--gold);
  margin-top: 0.5rem; text-align: center;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem; text-align: center;
}
.newsletter h2 { margin-bottom: 0.5rem; }
.newsletter p  { color: var(--text-muted); margin-bottom: 1.5rem; }
.newsletter__form {
  display: flex; gap: 0.75rem;
  max-width: 460px; margin: 0 auto;
  flex-wrap: wrap; justify-content: center;
}
.newsletter__form input {
  flex: 1; min-width: 200px;
  background: var(--surface2);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
.newsletter__form input:focus { border-color: var(--gold); }
.newsletter__msg { margin-top: 0.75rem; font-size: 0.875rem; color: var(--gold); min-height: 1.2rem; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0; text-align: center;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 900;
  color: var(--gold); margin-bottom: 0.5rem;
}
.footer p { font-size: 0.8rem; color: var(--text-dim); }

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border-sub);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2.5rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border-sub);
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  background: none; border: none;
  padding: 0.7rem 1rem;
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all 0.2s;
  white-space: nowrap; flex-shrink: 0;
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-btn:hover  { color: var(--text-muted); }

/* ============================================
   MOBILE — comprehensive fixes
   ============================================ */
@media (max-width: 768px) {
  body { font-size: 15px; }

  .container { padding: 0 0.875rem; }
  .section    { padding: 2.5rem 0; }
  .section--sm { padding: 1.75rem 0; }
  .section-head { margin-bottom: 1.75rem; }

  /* Hero */
  .hero { min-height: auto; }
  .hero__content { padding: 2rem 0; }
  .hero__sub { font-size: 0.9rem; }
  .hero__ctas { gap: 0.6rem; }
  .hero__ctas .btn { flex: 1; justify-content: center; padding: 0.65rem 1rem; }

  /* Players */
  .players-grid { grid-template-columns: 1fr; gap: 1px; }
  .player-card__stats { grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
  .stat__num { font-size: 1.3rem; }

  /* Matches */
  .match-row {
    grid-template-columns: 1fr 70px 1fr;
    padding: 0.85rem 0.75rem; gap: 0.5rem;
  }
  .match-meta { display: none; }
  .match-team { font-size: 0.82rem; }

  /* Articles */
  .articles-grid { grid-template-columns: 1fr; }

  /* Polls */
  .polls-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* Newsletter */
  .newsletter { padding: 1.75rem 1rem; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form input { min-width: unset; width: 100%; }
  .newsletter__form .btn { width: 100%; justify-content: center; }

  /* Compare table horizontal scroll */
  .compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table td { padding: 0.75rem 0.6rem; font-size: 0.85rem; }
  .compare-table td:first-child,
  .compare-table td:last-child { font-size: 0.95rem; }
}

@media (max-width: 420px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .btn { font-size: 0.78rem; padding: 0.6rem 1.1rem; }
  .countdown__num { font-size: 1.6rem; }
  .countdown__sep { font-size: 1.3rem; }
  .player-card__body { padding: 1.25rem; }
  .poll-card { padding: 1.1rem; }
}
