/* =========================================================================
   STRUTTURE DEL SITO PUBBLICO — moduli condivisi da TUTTE le pelli (27/10/2026)
   Ogni struttura (includes/themes.php → site_structures) accende alcuni moduli,
   che diventano classi st-<modulo> sul body:
     classica  —                         centrata  — hdr-center, news-rail
     copertina — hdr-over, hero-tall, hero-low, news-over
     giornale  — hdr-bar, news-lead, news-list      laterale — style-laterale.css
   I moduli leggono i token --m-* (colori, caratteri, raggi). Le pelli 2027 / Serie A li
   definiscono già; per le pelli storiche (Classico, Editoriale) qui sotto c'è un "ponte".
   Caricato dopo la pelle e prima di style-laterale.css. Solo sito pubblico.
   ========================================================================= */

/* ---------- Valori di base dei token di struttura (le pelli li ridefiniscono) ---------- */
body{
  --sa-head-h:96px;                      /* altezza testata, per non coprire i banner */
  --sa-over:linear-gradient(180deg,rgba(4,12,20,.82) 0%,rgba(4,12,20,.35) 70%,rgba(4,12,20,0) 100%);
  --sa-bar-bg:#0B2233; --sa-bar-ink:#cfe3f2;
  --sa-bar-text:"SITO UFFICIALE  ·  A.C.D. SOLIGNANO  ·  DAL 1977";
}

/* ---------- Ponte: le pelli storiche espongono i token --m-* ---------- */
body.layout-classico{
  --m-bg:var(--c-bg,#fff); --m-bg2:var(--c-surface); --m-surface:#fff; --m-surface2:var(--c-surface);
  --m-ink:var(--c-text,#1a1a1a); --m-muted:var(--gray-500); --m-line:var(--c-border);
  --m-acc:var(--c-accent,#2FA8E0); --m-acc-ink:#fff; --m-acc-text:var(--c-accent-text,#1b6e97);
  --m-head-bg:var(--c-header-bg,#0B2233); --m-head-ink:var(--c-header-text,#fff);
  --m-display:var(--font-display); --m-body:var(--font-base,system-ui,sans-serif);
  --m-radius:var(--radius,14px); --m-radius-sm:8px;
}
body.layout-editoriale{
  --m-bg:var(--ed-bg); --m-bg2:var(--ed-bg2); --m-surface:var(--ed-card); --m-surface2:var(--gray-100);
  --m-ink:var(--ed-text); --m-muted:var(--ed-muted); --m-line:var(--ed-line);
  --m-acc:var(--ed-acc); --m-acc-ink:#06121a; --m-acc-text:var(--ed-acc);
  --m-head-bg:var(--c-header-bg,#0B2233); --m-head-ink:var(--c-header-text,#fff);
  --m-display:var(--font-display,'Oswald',sans-serif); --m-body:'Inter',system-ui,sans-serif;
  --m-radius:18px; --m-radius-sm:10px;
}

/* =========================================================================
   MODULO hdr-bar — barra sottile sopra la testata (lingua/sito ufficiale nei siti dei club)
   ========================================================================= */
body.st-hdr-bar .site-header::before{content:var(--sa-bar-text);display:block;background:var(--sa-bar-bg);color:var(--sa-bar-ink);
  font:600 .7rem/1 var(--m-body);letter-spacing:.18em;text-align:center;padding:8px 16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.st-hdr-bar .site-header.shrink::before{display:none}

/* =========================================================================
   MODULO hdr-center — stemma al centro, menu su una seconda riga (desktop)
   ========================================================================= */
@media(min-width:861px){
  body.st-hdr-center{--sa-head-h:150px}
  body.st-hdr-center .header-inner{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:". brand icons" "nav nav nav";row-gap:4px;padding-top:12px;padding-bottom:0;gap:4px 20px}
  body.st-hdr-center .brand{grid-area:brand;justify-self:center;flex:none}
  body.st-hdr-center .brand-text{display:none}
  body.st-hdr-center .brand-logo{height:78px !important;max-height:78px}
  body.st-hdr-center .site-header.shrink .brand-logo{height:50px !important}
  body.st-hdr-center .header-icons{grid-area:icons;justify-self:end}
  body.st-hdr-center .site-nav{grid-area:nav;margin:0;justify-self:stretch}
  body.st-hdr-center .site-nav>ul{justify-content:center;gap:2px 10px}
  body.st-hdr-center .site-nav>ul>li.active>a{box-shadow:inset 0 -3px 0 var(--m-acc)}
  body.st-hdr-center .site-nav .submenu{left:50%;transform:translateX(-50%)}
}

/* =========================================================================
   MODULO hdr-over — testata trasparente sopra il carosello/banner iniziale,
   diventa piena allo scroll (classe "scrolled" messa da site.js)
   ========================================================================= */
@media(min-width:861px){
body.st-hdr-over.page-has-hero .site-header{position:fixed;top:0;left:0;right:0;z-index:100;background:var(--sa-over);border-bottom-color:transparent;box-shadow:none;transition:background .3s ease,box-shadow .3s ease}
body.st-hdr-over.page-has-hero.scrolled .site-header,
body.st-hdr-over.page-has-hero.nav-open .site-header{background:var(--m-head-bg);border-bottom-color:var(--m-line);box-shadow:0 6px 24px rgba(0,0,0,.2)}
body.st-hdr-over.page-has-hero:not(.scrolled) .site-nav>ul>li>a,
body.st-hdr-over.page-has-hero:not(.scrolled) .brand{color:#fff}
body.st-hdr-over.page-has-hero:not(.scrolled) .header-icons a{color:#fff;border-color:rgba(255,255,255,.4)}
body.st-hdr-over.page-has-hero:not(.scrolled) .nav-toggle span{background:#fff}
/* il primo blocco passa sotto la testata: spazio per titoli e testo */
body.st-hdr-over.page-has-hero .site-main>.block-page-banner:first-child{padding-top:calc(var(--sa-head-h) + 56px)}
body.st-hdr-over.page-has-hero .site-main>.block-hero:first-child{padding-top:calc(var(--sa-head-h) + 40px)}
body.st-hdr-over.page-has-hero .site-main>.block-slideshow:first-child .slide-inner{padding-top:calc(var(--sa-head-h) - 20px)}
}  /* su telefono la testata resta normale (non copre il banner, che è basso) */

/* =========================================================================
   MODULO hero-tall — carosello / video quasi a tutto schermo
   ========================================================================= */
body.st-hero-tall .block-hero{min-height:min(86vh,900px);display:flex;align-items:center}
body.st-hero-tall .block-hero .hero-inner{width:100%}
@media(max-width:860px){ body.st-hero-tall .block-hero{min-height:72vh} }

/* =========================================================================
   MODULO hero-low — testo in basso a sinistra, molto grande (copertina)
   ========================================================================= */
body.st-hero-low .slide{align-items:flex-end}
body.st-hero-low .slide-inner{padding-bottom:84px}
body.st-hero-low .slide-inner h2,body.st-hero-low .block-hero h1{font-size:clamp(2.8rem,7.5vw,7rem);line-height:.9;text-transform:uppercase;max-width:1100px}
body.st-hero-low .block-hero{display:flex;align-items:flex-end;min-height:min(78vh,820px);padding-bottom:72px}
body.st-hero-low .block-hero .hero-inner{width:100%}

/* =========================================================================
   MODULO news-lead — in home la prima notizia è grande, le altre in elenco a lato
   ========================================================================= */
@media(min-width:901px){
  body.st-news-lead.is-home .block-news .cards-grid{grid-template-columns:minmax(0,1.85fr) minmax(0,1fr);gap:18px 32px;align-items:start}
  body.st-news-lead.is-home .block-news .cards-grid>.card:first-child,
  body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:has(img){grid-column:1;grid-row:1 / span 6}
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child){grid-column:2;display:flex;gap:14px;align-items:flex-start;background:transparent;border:0;border-bottom:1px solid var(--m-line);border-radius:0;padding:0 0 16px;box-shadow:none}
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child)>a{flex:0 0 112px}
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child) img{width:112px;height:84px;object-fit:cover;border-radius:var(--m-radius-sm);aspect-ratio:auto}
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child) .card-body{padding:0}
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child) h3{font-size:1.02rem;line-height:1.15;margin:4px 0 0}
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child) p,
  body.st-news-lead.is-home .block-news .cards-grid>.card:not(:first-child) .card-link{display:none}
}
/* la notizia guida: foto piena con titolo sopra (o pannello colorato se non ha foto) */
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child{position:relative;overflow:hidden}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:has(img) img{aspect-ratio:16/10;width:100%;height:100%;object-fit:cover}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:has(img) .card-body{position:absolute;left:0;right:0;bottom:0;padding:90px 30px 28px;background:linear-gradient(0deg,rgba(4,12,20,.92),rgba(4,12,20,0))}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:has(img) :is(h3,p,.card-date,.card-link){color:#fff}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child h3{font-size:clamp(1.6rem,2.6vw,2.5rem);line-height:1.02}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:not(:has(img)){background:var(--m-acc);border-color:var(--m-acc);min-height:340px;display:flex;align-items:flex-end}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:not(:has(img)) :is(h3,p,.card-date,.card-link){color:var(--m-acc-ink)}
body.st-news-lead.is-home .block-news .cards-grid>.card:first-child:not(:has(img)) .card-body{padding:30px}

/* =========================================================================
   MODULO news-over — tutte le notizie con titolo sopra la foto
   ========================================================================= */
body.st-news-over .block-news .card{position:relative;overflow:hidden}
body.st-news-over .block-news .card:has(img) img{aspect-ratio:4/5;width:100%;object-fit:cover;transition:transform .5s ease}
body.st-news-over .block-news .card:has(img):hover img{transform:scale(1.04)}
body.st-news-over .block-news .card:has(img) .card-body{position:absolute;left:0;right:0;bottom:0;padding:80px 22px 22px;background:linear-gradient(0deg,rgba(4,12,20,.95) 10%,rgba(4,12,20,0))}
body.st-news-over .block-news .card:has(img) :is(h3,.card-date,.card-link){color:#fff}
body.st-news-over .block-news .card:has(img) p{display:none}
body.st-news-over .block-news .card:not(:has(img)){display:flex;align-items:flex-end;min-height:260px;background:var(--m-surface2)}
@media(min-width:901px){ body.st-news-over.layout-moderno.is-home .block-news .cards-grid.cols-3>.card:first-child:has(img) img{aspect-ratio:4/5} }

/* =========================================================================
   MODULO news-rail — notizie in fila orizzontale scorrevole (home)
   ========================================================================= */
body.st-news-rail.is-home .block-news .cards-grid{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 2px 18px;scrollbar-width:thin;scrollbar-color:var(--m-acc) transparent}
body.st-news-rail.is-home .block-news .cards-grid>.card{flex:0 0 min(340px,82vw);scroll-snap-align:start;grid-column:auto !important;grid-row:auto !important}
body.st-news-rail.is-home .block-news .cards-grid>.card img{aspect-ratio:16/10 !important;object-fit:cover;width:100%}
body.st-news-rail.is-home .block-news .cards-grid>.card h3{font-size:1.15rem !important}
body.st-news-rail.is-home .block-news .cards-grid>.card p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
body.st-news-rail.is-home .block-news .cards-grid::-webkit-scrollbar{height:6px}
body.st-news-rail.is-home .block-news .cards-grid::-webkit-scrollbar-thumb{background:var(--m-acc);border-radius:3px}

/* =========================================================================
   MODULO news-list — notizie in elenco, stile giornale (pagina News e pagine interne; in home c'è news-lead)
   ========================================================================= */
body.st-news-list:not(.is-home) .block-news .cards-grid{grid-template-columns:1fr !important;gap:0;max-width:1000px}
body.st-news-list:not(.is-home) .block-news .card{display:grid;grid-template-columns:minmax(0,300px) minmax(0,1fr);gap:26px;align-items:start;background:transparent;border:0;border-bottom:1px solid var(--m-line);border-radius:0;padding:22px 0;box-shadow:none;grid-column:auto !important;grid-row:auto !important}
body.st-news-list:not(.is-home) .block-news .card:not(:has(img)){grid-template-columns:1fr}
body.st-news-list:not(.is-home) .block-news .card img{aspect-ratio:16/10 !important;object-fit:cover;width:100%;border-radius:var(--m-radius-sm)}
body.st-news-list:not(.is-home) .block-news .card .card-body{padding:0}
body.st-news-list:not(.is-home) .block-news .card h3{font-size:1.45rem !important;line-height:1.15;margin:6px 0 8px}
body.st-news-list:not(.is-home) .block-news .card:first-child h3{font-size:clamp(1.6rem,2.4vw,2.1rem) !important}
@media(max-width:700px){ body.st-news-list:not(.is-home) .block-news .card{grid-template-columns:1fr;gap:12px} }

/* ---------- Telefono ---------- */
@media(max-width:860px){
  body{--sa-head-h:70px}
  body.st-hdr-bar .site-header::before{font-size:.62rem;letter-spacing:.12em;padding:6px 10px}
}
