/* MoroccoWorldCup.com - Professional Fan & Partner Platform CSS
   Morocco red #b91c1c, green #047857, ink, gold accents. Clean, data-rich, trustworthy.
   Enhanced for pro look: rich images, better data viz, partner appeal, modern components.
*/

:root {
  --red: #b91c1c;
  --green: #047857;
  --ink: #111827;
  --muted: #5b6472;
  --paper: #f7f7f4;
  --line: #ddd8cc;
  --gold: #b7791f;
  --white: #fff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; font-size: 15.5px; }
a { text-decoration: none; color: inherit; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; height: auto; }

.container { 
  width: min(1200px, calc(100% - 32px)); 
  margin: 0 auto; 
}
.container-narrow { width: min(720px, calc(100% - 32px)); margin: 0 auto; }

.nav { 
  position: sticky; top: 0; z-index: 50; 
  background: rgba(247,247,244,0.96); 
  backdrop-filter: blur(16px); 
  border-bottom: 1px solid var(--line); 
}
.nav-inner { 
  min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; 
}
.brand { 
  font-weight: 900; font-size: 21px; letter-spacing: -0.02em; color: var(--ink); 
}
.nav-links { 
  display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14.2px; font-weight: 600; 
}
.nav-links a { 
  padding: 8px 14px; border-radius: 999px; transition: all .15s ease; 
}
.nav-links a:hover, .nav-links a[aria-current="page"] { 
  background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.06); 
}
.nav-links .button { font-size: 13.5px; padding: 8px 15px; min-height: 38px; }

.button, button {
  display: inline-flex; align-items: center; justify-content: center; 
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--ink); background: var(--ink); color: #fff; 
  font-weight: 700; font-size: 14.5px; cursor: pointer; transition: transform .1s ease, box-shadow .1s;
  text-decoration: none;
}
.button:hover, button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(17,24,39,0.25); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button.secondary:hover { background: #fff; border-color: var(--ink); }
.button.light { background: #fff; color: var(--ink); border-color: #fff; }
.button.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.button.red { background: var(--red); border-color: var(--red); color: #fff; }
.button.green { background: var(--green); border-color: var(--green); color: #fff; }

.hero {
  color: #fff; 
  background: linear-gradient(92deg, rgba(17,24,39,0.92), rgba(17,24,39,0.55)), url("/static/img/morocco-robots-hero.png") center/cover no-repeat;
  min-height: 560px; display: flex; align-items: center; padding: 80px 0;
  position: relative;
}
.hero::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 40%; 
  background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
}
.hero-content { max-width: 820px; position: relative; z-index: 1; }
.eyebrow { 
  color: #a3e635; text-transform: uppercase; font-size: 11.5px; font-weight: 800; 
  letter-spacing: 1.5px; margin-bottom: 8px; display: inline-block;
}
.hero .eyebrow { color: #bef575; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.025em; }
h1 { font-size: clamp(38px, 7.5vw, 68px); }
h2 { font-size: clamp(26px, 4.8vw, 40px); }
h3 { font-size: 20px; font-weight: 700; }
.lead { font-size: 19px; color: rgba(255,255,255,0.88); max-width: 46ch; }

.section { padding: 64px 0; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { 
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; 
  margin-bottom: 22px; flex-wrap: wrap;
}
.section-head > div { max-width: 620px; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0,1fr)); }

.card { 
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); 
  padding: 20px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card img { border-radius: var(--radius-sm); margin-bottom: 12px; }
.muted { color: var(--muted); }

.tag { 
  display: inline-flex; width: fit-content; border-radius: 999px; 
  background: #fee2e2; color: #991b1b; padding: 3px 9px; font-size: 11.5px; font-weight: 700; 
  letter-spacing: .3px;
}
.tag.green { background: #dcfce7; color: #166534; }
.tag.gold { background: #fef3c7; color: #854d0e; }

.team-list { display: grid; gap: 2px; margin-top: 10px; }
.team-link { 
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 4px; border-top: 1px solid var(--line); font-size: 14.5px; 
}
.team-link:first-child { border-top: none; }
.team-link:hover strong { color: var(--red); }

.match { border-left: 5px solid var(--red); padding-left: 14px; }
.match .tag { margin-bottom: 6px; }

.youtube { background: #0f172a; color: #e0e7ff; }
.youtube .muted { color: rgba(224,231,255,0.7); }
.youtube .card { background: #1e2937; border-color: #334155; color: #e0e7ff; }

form { display: grid; gap: 14px; }
label { font-weight: 700; font-size: 13.5px; color: var(--ink); }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); 
  padding: 11px 13px; font: inherit; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(185,28,28,0.1); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-weight: 600; font-size: 13.5px; }
.checkbox input { width: auto; margin-top: 3px; }

.messages { margin: 14px 0; display: grid; gap: 8px; }
.message { 
  background: #ecfdf5; color: #14532d; border: 1px solid #86efac; 
  border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14.5px;
}

.footer { 
  border-top: 1px solid var(--line); padding: 36px 0 28px; color: var(--muted); font-size: 13.5px; 
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 700; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

.cookie-banner {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; gap: 16px; align-items: center; 
  max-width: min(540px, calc(100vw - 36px));
  background: #111827; color: #fff; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-lg);
}

/* Robust cookie banner visibility controls (works even if the `hidden` attribute or .hidden property has quirks) */
.cookie-banner.hidden,
.cookie-banner[hidden] {
  display: none !important;
}
.cookie-banner.visible {
  display: flex !important;
}
.cookie-banner .muted { color: rgba(255,255,255,0.7); }

/* Pro data components */
.pro-table { 
  width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); 
  border-radius: var(--radius); overflow: hidden; font-size: 14.5px;
}
.pro-table th, .pro-table td { 
  border-bottom: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top; 
}
.pro-table th { 
  background: #f8f1e9; color: var(--muted); font-size: 11px; text-transform: uppercase; 
  font-weight: 700; letter-spacing: .6px;
}
.pro-table tr:hover { background: #fafaf8; }
.pro-table .score { font-weight: 700; font-variant-numeric: tabular-nums; }

.entity-img { 
  width: 58px; height: 58px; object-fit: cover; border-radius: var(--radius-sm); 
  border: 1px solid var(--line); background: #f1f0eb;
}
.entity-img.round { border-radius: 9999px; }
.entity-img.crest { width: 48px; height: 48px; border-radius: 4px; }

.team-card, .player-card { 
  display: flex; gap: 14px; align-items: flex-start; 
}
.team-card .info, .player-card .info { flex: 1; min-width: 0; }

.stat-grid { 
  display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; 
}
.stat { 
  background: #f8f1e9; border: 1px solid var(--line); border-radius: var(--radius-sm); 
  padding: 8px 10px; font-size: 13px; 
}
.stat strong { display: block; font-size: 18px; line-height: 1; margin-bottom: 1px; }

.breadcrumb { 
  font-size: 13px; color: var(--muted); margin-bottom: 10px; 
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }

.badge { 
  font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--line); 
  color: var(--ink); font-weight: 600;
}
.badge.verified { background: #dcfce7; color: #166534; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.narrow { width: min(780px, 100%); margin: 0 auto; }

.legal-copy p { margin: 0 0 11px; }
.legal-copy p:last-child { margin-bottom: 0; }

/* Dashboard */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { 
  background: #111827; color: #fff; padding: 22px 18px; font-size: 14px; 
}
.side h2 { color: #fff; font-size: 17px; margin-bottom: 8px; }
.side a { 
  display: block; padding: 8px 10px; color: rgba(255,255,255,0.78); border-radius: 6px; 
  margin: 1px 0; font-weight: 500;
}
.side a:hover, .side a.active { background: rgba(255,255,255,0.08); color: #fff; }
.main { padding: 26px 28px; background: var(--paper); }

@media (max-width: 860px) {
  .nav-inner, .section-head { align-items: flex-start; flex-direction: column; }
  .nav-links { flex-wrap: wrap; gap: 2px; }
  .grid.two, .grid.three, .grid.four, .grid.five, .form-row, .dash, .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 480px; padding-top: 70px; }
  .main { padding: 16px; }
  .cookie-banner { left: 14px; right: 14px; flex-direction: column; align-items: flex-start; }
  .dash { grid-template-columns: 1fr; }
  .side { padding: 14px; }
  .pro-table th, .pro-table td { padding: 9px 8px; font-size: 14px; }
}

/* Image + content polish */
.detail-header { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.detail-header .info { flex: 1; }

/* Subtle pro touches */
.section .card h3 { margin-bottom: 6px; }
.team-link span { color: var(--muted); font-size: 12.5px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }