/* base.css — struttura della pagina. Colori, font, larghezze: variabili scritte da site.php
   (dalle impostazioni). Qui non c'e' nessun valore di aspetto scelto da Michele. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* ombra leggera sotto la barra, usata quando header_shadow = 1 (site.php scrive --header-shadow) */
:root { --header-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-background);
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

a { color: var(--color-link); }

img { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* header: due modelli, scelti dall'impostazione header_layout (mai hamburger, mai menu nascosto)
   - header--bar: barra in alto, logo piccolo a sinistra, voci e lingue a destra
   - header--centered: logo piccolo centrato, menu e lingue sotto (lo schizzo di Michele) */
.site-header {
  width: 100%;
  background-color: var(--header-bg);
  color: var(--header-text);
  border-bottom: var(--header-border);
  box-shadow: var(--header-shadow);
}
/* header fisso (header_sticky): sticky e non fixed, cosi' la barra tiene il suo spazio reale nella
   pagina e il contenuto parte sempre sotto di lei, qualunque sia la sua altezza; poi scorre sotto */
.header--sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header a { color: var(--header-text); }
.site-logo { display: block; flex: 0 0 auto; }
.site-logo img { display: block; }

.site-menu ul, .site-langs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.site-menu a {
  font-weight: var(--menu-font-weight);
  text-transform: var(--menu-text-transform);
  text-decoration: none;
}
.site-menu a:hover, .site-menu a:focus-visible { text-decoration: underline; }
/* icona accanto alla voce (impostazione menu_show_icons) */
.site-menu .icon { width: 1em; height: 1em; margin-right: 0.35em; vertical-align: -0.125em; }
.site-menu a[aria-current="page"] {
  color: var(--color-menu-active);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.site-langs ul { font-size: 0.75em; letter-spacing: 0.05em; }
.site-langs a { text-decoration: none; }
.site-langs a[aria-current="true"] { font-weight: 700; text-decoration: underline; }

/* barra */
.header--bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.6rem 1.5rem;
}
.header--bar .site-logo img { height: var(--logo-height-bar); width: auto; }
.header--bar .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 1.5rem;
  min-width: 0;
}
.header--bar .site-menu ul { justify-content: flex-end; gap: 0.2rem 1.4rem; }
.header--bar .site-langs ul { justify-content: flex-end; gap: 0.2rem 0.6rem; }

/* centrato */
.header--centered {
  padding: 2.5rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.header--centered .site-logo { width: 100%; max-width: var(--logo-max-width); }
.header--centered .site-logo img { width: 100%; height: auto; }
.header--centered .site-nav { width: 100%; max-width: var(--layout-max-width); display: flex; flex-direction: column; gap: 1.2rem; }
.header--centered .site-menu ul { justify-content: var(--menu-justify); gap: 0.4rem 2rem; }
.header--centered .site-menu a { font-size: 1.15em; }
.header--centered .site-langs ul { justify-content: var(--menu-justify); gap: 0.2rem 0.9rem; }

@media (max-width: 600px) {
  /* sul telefono la barra resta orizzontale: logo a sinistra, le voci vanno a capo a destra */
  .header--bar { padding: 0.5rem 0.9rem; gap: 0.4rem 0.8rem; }
  .header--bar .site-logo img { height: var(--logo-height-bar-mobile); }
  .header--bar .site-nav { gap: 0.3rem 0.8rem; flex: 1 1 0; }
  .header--bar .site-menu ul { gap: 0.15rem 0.9rem; }
  .header--bar .site-menu a { font-size: 0.95em; }
}

/* contenuto */
.site-content {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 4rem 1rem 3rem;
}
.page-body { max-width: 34em; margin: 0 auto; }
.page-body p { margin: 0 0 1em; }
.contact-email { text-align: center; font-size: 1.1em; }

/* footer: logo grande (footer_logo_show), poi email */
.footer-logo { display: block; width: fit-content; max-width: 100%; margin: 0 auto 1.5rem; }
.footer-logo img { display: block; width: var(--footer-logo-width); max-width: 100%; height: auto; }
@media (max-width: 600px) {
  .footer-logo img { width: var(--footer-logo-width-mobile); }
}
.site-footer {
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  text-align: center;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: underline; }

@media (max-width: 480px) {
  .header--centered { padding-top: 1.5rem; padding-bottom: 1rem; gap: 1rem; }
  .site-content { padding-top: 2.5rem; }
}

/* artisti (brief admin_artisti, passo 4): schede semplificate, pagina completa, galleria. Colori e font
   sono quelli di AIR (variabili e currentColor), niente valori propri. */
.section-title { text-align: center; font-size: 1.6em; margin: 0 0 1.5rem; }
.artists-search {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 0 2rem;
}
.artists-search input, .artists-search select, .artists-search button {
  font: inherit; font-size: 0.9em; color: inherit; background: transparent;
  border: 1px solid currentColor; border-radius: 0; padding: 0.35em 0.6em;
}
.artists-search input[type="search"] { flex: 1 1 12em; max-width: 20em; }
.artists-search button { cursor: pointer; font-weight: 700; }
.artists-none { text-align: center; }
.artists-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1.5rem;
}
.artist-card {
  display: flex; flex-direction: column; gap: 0.5rem; height: 100%;
  padding: 0.75rem; border: 1px solid currentColor; color: var(--color-text); text-decoration: none;
}
.artist-card:hover, .artist-card:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.artist-card:hover .artist-name { text-decoration: underline; }
.artist-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.artist-name { font-weight: 700; font-size: 1.1em; }
.artist-summary { font-size: 0.9em; }
.tags, .artist-genres { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag { display: inline-block; padding: 0.05em 0.5em; border: 1px solid currentColor; border-radius: 999px; font-size: 0.75em; }
.back-link { max-width: 34em; margin: 0 auto 1.5rem; }
.back-link a { text-decoration: none; font-weight: 700; }
.back-link a:hover, .back-link a:focus-visible { text-decoration: underline; }
.artist { max-width: 34em; margin: 0 auto; }
.artist-photo { display: block; width: 100%; max-width: 34em; margin: 0 auto 1.5rem; }
.artist .artist-genres { justify-content: center; margin: -0.8rem 0 1rem; }
.artist .artist-summary { text-align: center; }
.artist h2 { font-size: 1.1em; margin: 2rem 0 0.8rem; }
.artist-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-button {
  display: inline-flex; align-items: center; gap: 0.45em; padding: 0.4em 0.8em;
  border: 1px solid currentColor; text-decoration: none; font-weight: 700;
}
.link-button:hover, .link-button:focus-visible { background: var(--color-text); color: var(--color-background); }
.link-button .icon { width: 1.1em; height: 1.1em; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; }
.gallery-item { display: block; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-item:hover img, .gallery-item:focus-visible img { opacity: 0.85; }
/* player Bandcamp e Spotify (altezze da players.json, scritte nella pagina) */
.player { display: block; width: 100%; border: 0; margin: 0 0 1rem; }
.video-item { margin: 0 0 1.2rem; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { margin: 0.3rem 0 0; font-size: 0.9em; }

/* catalogo (brief catalogo_statistiche, passo 6): schede delle uscite, pagina del disco */
.catalogue-search { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 0 2rem; }
.catalogue-search input, .catalogue-search select, .catalogue-search button {
  font: inherit; font-size: 0.9em; color: inherit; background: transparent;
  border: 1px solid currentColor; border-radius: 0; padding: 0.35em 0.6em; max-width: 100%;
}
.catalogue-search input[type="search"] { flex: 1 1 12em; max-width: 20em; }
.catalogue-search button { cursor: pointer; font-weight: 700; }
.release-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1.5rem;
}
.release-card {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%;
  padding: 0.75rem; border: 1px solid currentColor; color: var(--color-text); text-decoration: none;
}
.release-card:hover, .release-card:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.release-card:hover .release-title { text-decoration: underline; }
.release-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.release-title { font-weight: 700; font-size: 1.05em; }
.release-artists, .release-year { font-size: 0.9em; }
.release-cover { display: block; width: 100%; max-width: 34em; margin: 0 auto 1.5rem; }
/* width e height veri nell'HTML (I7): il posto e' tenuto, l'altezza viene dalle proporzioni */
.artist-photo, .release-cover { height: auto; }
.release-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1rem; margin: -0.8rem 0 1rem; }
.release-catno { font-weight: 700; letter-spacing: 0.05em; }
.tracklist { margin: 0; padding-left: 1.6em; }
.tracklist li { padding: 0.15em 0; }
.track-time { float: right; font-variant-numeric: tabular-nums; }
.formats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.tag-soldout { margin-left: 0.4em; font-weight: 700; }
.link-buy { margin-left: 0.4em; padding: 0.15em 0.6em; font-size: 0.9em; }
.artist-releases .release-list { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
@media (max-width: 600px) {
  /* telefono: schede delle uscite una sotto l'altra */
  .release-list { grid-template-columns: 1fr; }
  .artist-releases .release-list { grid-template-columns: 1fr; }
}

/* pagina Privacy e cookie; link in fondo a ogni pagina */
.privacy { max-width: 46rem; margin: 0 auto; }
.privacy h1 { margin-top: 0; }
.privacy h2 { font-size: 1.15rem; margin: 1.4rem 0 0.4rem; }
.privacy-draft { display: inline-block; padding: 0.3rem 0.7rem; border: 2px dashed currentColor; font-weight: 700; }
.privacy-missing { font-style: italic; }
.privacy code { overflow-wrap: anywhere; }
.footer-privacy { display: block; margin-top: 0.4rem; font-size: 0.9em; }

/* like (cuore col numero) sulle pagine di artisti e dischi */
.like-box { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; margin: 0 0 1rem; }
.like {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.3em 0.8em;
  font: inherit; font-weight: 700; color: inherit; background: transparent;
  border: 1px solid currentColor; border-radius: 999px; cursor: pointer;
}
.like .icon { width: 1.2em; height: 1.2em; }
.like[aria-pressed="true"] .icon { fill: currentColor; }
.like:hover, .like:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.like-msg { margin: 0; font-size: 0.85em; text-align: center; }

/* immagine della galleria a tutto schermo (site.js) */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: calc(100vw - 2rem); max-height: calc(100vh - 6rem); object-fit: contain; }
.lightbox-count { position: absolute; bottom: 0.8rem; left: 0; right: 0; margin: 0; text-align: center; color: #fff; font-size: 0.9em; }
.lightbox-btn {
  position: absolute; width: 3rem; height: 3rem; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15); color: #fff; font: inherit; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255, 255, 255, 0.35); outline: 2px solid #fff; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close { top: 0.8rem; right: 0.8rem; }
.lightbox-prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.8rem; top: 50%; transform: translateY(-50%); }
html.lightbox-open { overflow: hidden; }

@media (max-width: 600px) {
  /* telefono: schede una sotto l'altra */
  .artists-list { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 0.4rem; transform: none; }
}

/* news (brief ignorant_news, passo 4): filtri come il catalogo, "Prossimi concerti", schede una sotto l'altra, post */
.news-filters .news-date { display: inline-flex; align-items: center; gap: 0.3em; font-size: 0.9em; }
.news-reset { align-self: center; font-size: 0.9em; }
/* schede che staccano dallo sfondo (brief news_grafica_primo_post): fondo, testo, ombra e angoli SOLO dalle variabili
   --news-card-* (impostazioni del modulo news, scritte da Theme::css); dentro la scheda tutto prende il suo testo */
.news-upcoming, .news-card { background: var(--news-card-bg); color: var(--news-card-text); box-shadow: var(--news-card-shadow); border-radius: var(--news-card-radius); }
.news-card a, .news-upcoming a { color: var(--news-card-text); }
.news-card .link-button, .news-upcoming .link-button { color: var(--news-card-text); border-color: var(--news-card-text); }
.news-card .link-button:hover, .news-card .link-button:focus-visible,
.news-upcoming .link-button:hover, .news-upcoming .link-button:focus-visible { background: var(--news-card-text); color: var(--news-card-bg); }
.news-upcoming { max-width: 34em; margin: 0 auto 2rem; padding: 0.8rem 1rem; }
.news-upcoming h2 { font-size: 1.1em; margin: 0 0 0.6rem; }
.news-upcoming ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.news-upcoming li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.8rem; }
.news-upcoming time { font-weight: 700; font-variant-numeric: tabular-nums; }
.news-list { list-style: none; max-width: 34em; margin: 0 auto; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.news-card { padding: 0.9rem; overflow-wrap: anywhere; }
.news-featured { border-left: 0.4rem solid var(--news-card-text); }
.news-cover img { display: block; width: 100%; height: auto; margin: 0 0 0.6rem; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: 0 0 0.4rem; font-size: 0.9em; }
.news-post .news-meta { justify-content: center; }
.tag-featured { font-weight: 700; }
.news-title { font-size: 1.25em; margin: 0 0 0.4rem; }
.news-title a { text-decoration: none; }
.news-title a:hover, .news-title a:focus-visible { text-decoration: underline; }
.news-summary { margin: 0 0 0.4rem; }
.news-read { font-weight: 700; }
.news-more { text-align: center; margin: 2rem 0 0; }
.news-event { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: -0.4rem 0 1.2rem; }
.news-event dt { font-weight: 700; }
.news-event dd { margin: 0; overflow-wrap: anywhere; }
.news-linked { margin: 0; padding-left: 1.2em; }
.news-linked li { padding: 0.15em 0; }
.news-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 2rem 0 0; }
