/* =========================================================================
   DEMO CAGLIARI — stylesheet condiviso (home + biglietti)
   Palette e tipografia ispirate al sito ufficiale.
   Font heading: Oswald (sostituto libero di "transducer-condensed").
   ========================================================================= */

:root {
  --navy:        #002B49;   /* sfondo principale          */
  --navy-dark:   #001E33;   /* header / footer            */
  --navy-soft:   #0A3A5C;   /* card secondarie            */
  --navy-line:   #15466A;   /* bordi / divisori           */
  --crimson:     #9E1B32;   /* accento rossoblù           */
  --crimson-2:   #B81E3A;   /* hover accento              */
  --paper:       #EAECEF;   /* card chiara (featured)     */
  --ink:         #002B49;   /* testo su card chiara       */
  --white:       #FFFFFF;
  --muted:       #9FB3C4;   /* testo attenuato            */
  --radius:      14px;
  --maxw:        1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
.crest, .cr { object-fit: contain; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, .cond {
  font-family: "Saira Condensed", "Oswald", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.02;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ----------------------------- HEADER ----------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy-dark);
  border-bottom: 1px solid var(--navy-line);
}
.site-header .bar {
  min-height: 72px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 10px;
}
.site-header .brand { grid-column: 2; display: flex; justify-content: center; }
.site-header .brand .crest { width: 46px; height: 52px; }

/* Nav orizzontale (desktop) */
.mainnav { display: flex; align-items: center; }
.mainnav.left  { grid-column: 1; justify-content: flex-start; }
.mainnav.right { grid-column: 3; justify-content: flex-end; }
.nav-item { position: relative; }
.nav-item > a, .nav-tool {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 26px 11px; font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--white); white-space: nowrap; cursor: pointer;
  background: none; border: none; transition: color .15s;
}
.nav-item > a:hover, .nav-tool:hover { color: var(--crimson-2); }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 212px;
  background: var(--navy-dark); border: 1px solid var(--navy-line); border-top: 2px solid var(--crimson);
  padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 70;
}
.mainnav.right .dropdown { left: auto; right: 0; }
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 9px 18px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.dropdown a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.nav-tools { display: inline-flex; align-items: center; gap: 2px; padding-left: 6px; }
.nav-tool svg { stroke: currentColor; }
.lang { font-size: 12px; letter-spacing: .08em; color: var(--muted); padding: 0 8px; white-space: nowrap; }
.lang b { color: var(--white); font-weight: 600; }

/* Hamburger (mobile) */
.hamburger {
  grid-column: 3; justify-self: end;
  width: 46px; height: 46px; border: none; background: transparent; cursor: pointer;
  display: none; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
}
.hamburger span { width: 26px; height: 2px; background: var(--white); transition: .25s; }
.hamburger.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity: 0; }
.hamburger.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1040px){
  .mainnav { display: none; }
  .hamburger { display: flex; }
}

/* Mega menu overlay */
.nav-overlay {
  position: fixed; inset: 0; background: var(--navy-dark);
  transform: translateY(-100%); transition: transform .35s ease;
  z-index: 55; overflow-y: auto; padding: 100px 24px 60px;
}
.nav-overlay.open { transform: translateY(0); }
.nav-overlay .cols {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px;
}
.nav-overlay h4 { color: var(--crimson-2); font-size: 15px; margin-bottom: 14px; letter-spacing: .08em; }
.nav-overlay a { display: block; padding: 7px 0; color: var(--muted); font-size: 15px; }
.nav-overlay a:hover { color: var(--white); }

/* ----------------------------- SECTIONS --------------------------------- */
section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 40px); }
.section-head a { color: var(--muted); font-size: 14px; letter-spacing: .06em; }
.section-head a:hover { color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Saira Condensed", "Oswald", sans-serif; text-transform: uppercase; font-weight: 600;
  letter-spacing: .04em; font-size: 14px;
  padding: 13px 26px; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: .2s;
}
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--white); background: transparent; }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-red { background: var(--crimson); color: var(--white); }
.btn-red:hover { background: var(--crimson-2); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--crimson); }
.btn[disabled], .btn.is-disabled {
  opacity: .5; cursor: not-allowed; pointer-events: none;
  border-color: rgba(255,255,255,.2); color: var(--muted);
}
.btn .arrow { font-size: 16px; }

/* ----------------------------- HERO (home) ------------------------------ */
.hero { padding-top: 40px; }
.hero-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(78%, 1fr);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px;
}
.hero-card {
  scroll-snap-align: start; position: relative; border-radius: var(--radius);
  overflow: hidden; min-height: 460px; display: flex; align-items: flex-end;
}
.hero-card .ph { position: absolute; inset: 0; }
.hero-card .shade { position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,20,35,.92) 10%, rgba(0,20,35,.15) 60%); }
.hero-card .meta { position: relative; padding: 34px; max-width: 640px; }
.hero-card .tag { font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.hero-card h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 10px 0 20px; }

/* ----------------------------- MATCH WIDGET ----------------------------- */
.match-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.next-match, .results {
  background: var(--navy-soft); border: 1px solid var(--navy-line);
  border-radius: var(--radius); padding: 28px;
}
.next-match .lbl { color: var(--crimson-2); letter-spacing: .1em; font-size: 13px; }
.next-match .teams { display: flex; align-items: center; justify-content: space-between; margin: 20px 0; }
.next-match .teams .t { text-align: center; flex: 1; }
.next-match .teams .t .crest { width: 54px; height: 60px; margin: 0 auto 8px; }
.next-match .teams .t span { font-family: "Saira Condensed", "Oswald", sans-serif; text-transform: uppercase; font-size: 18px; }
.next-match .teams .vs { color: var(--muted); font-family: "Saira Condensed", "Oswald"; padding: 0 14px; }
.next-match .info { color: var(--muted); font-size: 14px; text-align: center; }
.countdown { display: flex; gap: 14px; justify-content: center; margin: 22px 0; }
.countdown div { text-align: center; }
.countdown b { font-family: "Saira Condensed", "Oswald"; font-size: 32px; display: block; line-height: 1; }
.countdown small { color: var(--muted); font-size: 11px; letter-spacing: .1em; }

.results h3 { font-size: 18px; margin-bottom: 14px; color: var(--muted); }
.result-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--navy-line); font-size: 15px;
}
.result-row .score { font-family: "Saira Condensed", "Oswald"; font-size: 20px; color: var(--crimson-2); }
.result-row .cr { width: 26px; height: 29px; }

/* ----------------------------- NEWS GRID -------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card {
  background: var(--navy-soft); border: 1px solid var(--navy-line);
  border-radius: var(--radius); overflow: hidden; transition: .2s;
}
.news-card:hover { transform: translateY(-4px); border-color: var(--crimson); }
.news-card .ph { aspect-ratio: 16/10; }
.news-card .body { padding: 18px 18px 22px; }
.news-card .tag { font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.news-card h3 { font-size: 20px; margin-top: 8px; }

/* ----------------------------- SHOP ------------------------------------- */
.shop { background: var(--navy-dark); }
.shop-card {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  overflow: hidden; text-align: center; padding-bottom: 22px;
}
.shop-card .ph { aspect-ratio: 1/1; background: var(--paper); }
.shop-card h3 { font-size: 20px; margin: 16px 0 4px; }
.shop-card .price { font-family: "Saira Condensed", "Oswald"; font-size: 15px; color: var(--crimson); margin-bottom: 14px; }

/* ----------------------------- MEMBERSHIP ------------------------------- */
.membership {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 300px; display: flex; align-items: center;
  background: linear-gradient(120deg, var(--crimson), var(--navy));
}
.membership .meta { padding: 46px; position: relative; }
.membership .lbl { letter-spacing: .14em; font-size: 13px; opacity: .85; }
.membership h2 { font-size: clamp(34px, 6vw, 64px); margin: 8px 0 22px; }

/* ----------------------------- PLAYERS ---------------------------------- */
.players { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.player-card {
  scroll-snap-align: start; background: var(--navy-soft); border: 1px solid var(--navy-line);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.player-card .ph { aspect-ratio: 3/4; background:
  radial-gradient(120% 90% at 50% 0%, #0E4668 0%, var(--navy-dark) 70%); position: relative; }
.player-card .num { position: absolute; top: 10px; right: 14px; font-family: "Saira Condensed", "Oswald"; font-size: 40px; color: rgba(255,255,255,.14); }
.player-card .nm { padding: 14px; }
.player-card .nm small { color: var(--muted); display: block; font-size: 12px; letter-spacing: .08em; }
.player-card .nm b { font-family: "Saira Condensed", "Oswald"; text-transform: uppercase; font-size: 22px; font-weight: 600; }

/* ----------------------------- PARTNERS --------------------------------- */
.partners { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.partners .p { height: 60px; flex: 1 1 140px; background: rgba(255,255,255,.06);
  border: 1px solid var(--navy-line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* ===================== PAGINA BIGLIETTI ================================== */
.tickets-hero { padding: 70px 0 10px; text-align: center; position: relative; }
.tickets-hero .ghost {
  font-size: clamp(60px, 16vw, 170px); color: rgba(255,255,255,.05);
  letter-spacing: .02em; line-height: .9;
}
.tickets-hero .sub { color: var(--muted); font-size: 18px; margin-top: 6px; }

/* Featured ticket card */
.ticket-feature {
  display: grid; grid-template-columns: 110px 1fr; background: var(--paper);
  color: var(--ink); border-radius: var(--radius); overflow: hidden; margin-top: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.ticket-feature .date-band {
  background: var(--crimson); color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 26px;
}
.ticket-feature .date-band b { font-family: "Saira Condensed", "Oswald"; font-size: 46px; line-height: .9; }
.ticket-feature .date-band span { font-family: "Saira Condensed", "Oswald"; letter-spacing: .1em; font-size: 15px; }
.ticket-feature .body { padding: 34px; position: relative; }
.ticket-feature .fixture { display: flex; align-items: center; gap: 22px; }
.ticket-feature .fixture .crest { width: 72px; height: 80px; }
.ticket-feature .fixture .team { font-family: "Saira Condensed", "Oswald"; font-size: clamp(30px, 5vw, 56px); font-weight: 600; }
.ticket-feature .fixture .vs { color: var(--muted); font-family: "Saira Condensed", "Oswald"; font-size: 24px; }
.ticket-feature .league { color: #5A7183; font-size: 14px; margin: 18px 0 0; letter-spacing: .04em; }
.ticket-feature .time { font-family: "Saira Condensed", "Oswald"; font-size: clamp(44px, 8vw, 92px); margin-top: 26px; line-height: .9; }
.ticket-feature .venue { color: #5A7183; font-size: 15px; }
.ticket-feature .cta { position: absolute; top: 28px; right: 28px; }

@media (max-width: 760px){
  .ticket-feature .cta { position: static; margin-top: 24px; }
}

/* Secondary ticket cards */
.ticket-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 20px; margin-top: 24px; }
.ticket-card {
  background: var(--navy-soft); border: 1px solid var(--navy-line);
  border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden;
}
.ticket-card .wm {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: .06; pointer-events: none;
}
.ticket-card .wm .crest { width: 190px; height: 210px; }
.ticket-card .d { font-family: "Saira Condensed", "Oswald"; font-size: 22px; }
.ticket-card .v { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ticket-card .time { font-family: "Saira Condensed", "Oswald"; font-size: 54px; margin: 40px 0 4px; position: relative; }
.ticket-card .league { color: var(--muted); font-size: 13px; position: relative; }
.ticket-card .teams { margin-top: 20px; position: relative; display: grid; gap: 10px; }
.ticket-card .teams .r { display: flex; align-items: center; gap: 12px; font-family: "Saira Condensed", "Oswald"; font-size: 22px; }
.ticket-card .teams .r .cr { width: 30px; height: 33px; }
.ticket-card .status { margin-top: 24px; position: relative; }

/* ----------------------------- FOOTER ----------------------------------- */
.site-footer { background: var(--navy-dark); border-top: 1px solid var(--navy-line); padding: 54px 0 30px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 30px; }
.site-footer h4 { color: var(--crimson-2); font-size: 14px; margin-bottom: 12px; letter-spacing: .06em; }
.site-footer a { color: var(--muted); font-size: 14px; display: block; padding: 5px 0; }
.site-footer a:hover { color: var(--white); }
.site-footer .legal {
  border-top: 1px solid var(--navy-line); margin-top: 38px; padding-top: 22px;
  color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between;
}

/* Placeholder background utility (nessuna immagine protetta) */
.ph {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 14px, rgba(255,255,255,0) 14px 28px),
    linear-gradient(135deg, #0E4668, var(--navy-dark));
}
.ph.red { background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 14px, rgba(255,255,255,0) 14px 28px),
    linear-gradient(135deg, var(--crimson), var(--navy-dark)); }

/* Immagini reali */
.hero-card .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-card .media { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.shop-card .media { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

/* ----------------------------- MODALE LOGIN ----------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,16,28,.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  width: 100%; max-width: 420px; background: var(--white); color: var(--ink);
  border-radius: 16px; padding: 34px 30px 28px; position: relative;
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.modal-close {
  position: absolute; top: 12px; right: 16px; border: none; background: none;
  font-size: 30px; line-height: 1; color: #90A2B0; cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.modal-head .crest { width: 42px; height: 46px; object-fit: contain; }
.modal-head .brandname { font-family: "Saira Condensed", sans-serif; text-transform: uppercase; font-weight: 600; font-size: 24px; letter-spacing: .01em; color: #0A2A4A; line-height: 1; }
.modal-head .brandname b { color: var(--crimson); font-weight: 700; }
.modal-card h3 { font-size: 26px; color: var(--ink); }
.modal-sub { color: #5A7183; font-size: 14px; margin: 6px 0 20px; }
.modal-card form { display: grid; gap: 14px; }
.modal-card label { font-family: "Poppins", sans-serif; font-size: 13px; font-weight: 600; color: #3A4A58; display: grid; gap: 7px; }
.modal-card input {
  font-family: "Poppins", sans-serif; font-size: 15px; font-weight: 400;
  padding: 13px 14px; border: 1px solid #CDD5DC; border-radius: 10px; color: var(--ink); background: #F7F9FB;
}
.modal-card input:focus { outline: none; border-color: var(--crimson); background: #fff; box-shadow: 0 0 0 3px rgba(158,27,50,.12); }
.modal-submit { width: 100%; justify-content: center; margin-top: 6px; }
.modal-note { color: #8694A0; font-size: 12px; text-align: center; margin-top: 4px; }

/* ----------------------------- RESPONSIVE ------------------------------- */
@media (max-width: 860px){
  .match-grid { grid-template-columns: 1fr; }
  .hero-track { grid-auto-columns: 90%; }
}

@media (max-width: 640px){
  /* Gutter e spaziatura più compatti */
  .wrap { padding: 0 16px; }
  section { padding: 40px 0; }
  .section-head { margin-bottom: 20px; }
  .section-head h2 { font-size: 26px; }

  /* Header */
  .site-header .bar { min-height: 62px; }
  .site-header .brand .crest { width: 42px; height: 48px; }

  /* Menu overlay */
  .nav-overlay { padding: 88px 16px 40px; }
  .nav-overlay .cols { gap: 22px; }

  /* Hero: una card a schermo intero */
  .hero { padding-top: 22px; }
  .hero-track { grid-auto-columns: 100%; gap: 12px; }
  .hero-card { min-height: 360px; }
  .hero-card .meta { padding: 22px; }

  /* Widget partite */
  .next-match, .results { padding: 20px; }

  /* Membership */
  .membership { min-height: 240px; }
  .membership .meta { padding: 30px 22px; }

  /* Footer */
  .site-footer { padding: 40px 0 26px; }
  .site-footer .legal { flex-direction: column; gap: 6px; }

  /* BIGLIETTI — card in evidenza: nomi squadra impilati e centrati */
  .tickets-hero { padding: 46px 0 4px; }
  .tickets-hero .sub { font-size: 16px; }
  .ticket-feature { grid-template-columns: 62px 1fr; margin-top: 22px; }
  .ticket-feature .date-band { padding-top: 20px; }
  .ticket-feature .date-band b { font-size: 34px; }
  .ticket-feature .date-band span { font-size: 13px; }
  .ticket-feature .body { padding: 24px 18px; text-align: center; }
  .ticket-feature .fixture { flex-direction: column; align-items: center; gap: 6px; }
  .ticket-feature .fixture .crest { width: 58px; height: 64px; }
  .ticket-feature .fixture .team { font-size: 34px; line-height: 1; }
  .ticket-feature .fixture .vs { font-size: 18px; margin: 2px 0; }
  .ticket-feature .league { margin-top: 14px; }
  .ticket-feature .time { font-size: 58px; margin-top: 16px; }
  .ticket-feature .venue { font-size: 14px; }
  .ticket-feature .cta { display: flex; width: 100%; justify-content: center; margin-top: 22px; }

  /* BIGLIETTI — card secondarie */
  .ticket-cards { grid-template-columns: 1fr; gap: 16px; }
  .ticket-card { padding: 22px; }
  .ticket-card .time { font-size: 46px; margin-top: 30px; }
  .ticket-card .wm .crest { width: 150px; height: 166px; }
}

@media (max-width: 400px){
  .section-head { flex-wrap: wrap; gap: 6px; }
  .countdown { gap: 10px; }
  .countdown b { font-size: 27px; }
  .ticket-feature .fixture .team { font-size: 30px; }
  .btn { padding: 12px 20px; }
}

/* Banner demo (chiarisce che è un mockup, non il sito reale) */
.demo-ribbon {
  background: var(--crimson); color: #fff; text-align: center;
  font-size: 12.5px; letter-spacing: .06em; padding: 6px 12px;
}
.demo-ribbon b { font-weight: 700; }
