/* ============================================================
   TESTOEACCORDI 2026 — HOME CSS (restyling moderno v3)
   Palette: navy #1a3d5c, amber #f5a623, slate #4a5568
   Font: Playfair Display (display) + Inter (corpo)
   ============================================================ */

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

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

/* ---- TOKEN ---- */
:root {
  --primary:  #1a3d5c;   /* blu-verde scuro, vicino al navy */
  --primary2: #112d44;   /* hover più scuro */
  --amber:    #f5a623;
  --amber2:   #e09310;
  --sage:     #2d7d5e;
  --bg:       #fafaf7;
  --surface:  #ffffff;
  --text:     #222222;
  --muted:    #4a5568;
  --border:   #e2e2dc;
  --radius:   10px;
  --shadow:   0 2px 12px rgba(0,0,0,.08);
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ============================================================
   HEADER sticky — fascia bianca, logo unico elemento del brand
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #ffffff;
  padding: 0 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.10);
  display: flex;
  align-items: center;
  justify-content: space-between; /* nav-mirror | logo | nav reale */
  gap: 12px;
  height: 150px;
}

/* Il logo è centrato tramite un "nav fantasma" identico e invisibile
   posto a sinistra (.nav-mirror): siccome ha la stessa larghezza del
   nav vero a destra, il flex box divide lo spazio rimanente in modo
   simmetrico e il logo resta sempre centrato SENZA mai poter essere
   sovrapposto dal nav — non essendo più position:absolute, logo e
   nav sono nello stesso flusso e non possono invadersi a vicenda. */
.site-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-logo {
  height: 150px;
  width: auto;
  display: block;
}

/* ---- NAV desktop ---- */
nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  color: #1a1a2e;
}

nav a {
  color: var(--primary);
  text-decoration: none;
  padding: 8px 13px;
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  font-size: 16px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
nav a:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- nav fantasma (spacer invisibile, riserva lo spazio del nav reale) ---- */
.nav-mirror {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
.nav-mirror a {
  padding: 8px 13px;
  font-size: 16px;
  font-weight: 500;
}

/* ---- hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: relative;
  z-index: 2;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- mobile menu drawer ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 100px;
  left: 0; right: 0;
  background: var(--primary);
  z-index: 850;
  padding: 16px 20px 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 16px;
  font-weight: 500;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--amber); }

/* ============================================================
   HERO — barra di ricerca su pentagramma
   ============================================================ */
.hero {
  background: var(--primary);
  padding: 52px 20px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 17px,
    rgba(255,255,255,.06) 17px,
    rgba(255,255,255,.06) 18px
  );
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
.hero h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 5vw, 46px);
  color: #ffffff;
  margin-bottom: 28px;
  line-height: 1.15;
}

/* ---- search form (Google CSE) ---- */
.gcse-search {
  width: 90%;
  margin: 20px auto;
  display: block;
}
.search-wrapper {
  width: 90%;
  max-width: 600px;
  margin: 20px auto 40px auto;
  display: block;
  overflow: hidden;        /* protegge il layout da eventuali debordamenti dello script */
}
.search-wrapper .gcse-search {
  width: 100% !important;
  margin: 0 !important;
}

/* ---- alfabeto dentro hero ---- */
.alphabet {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 760px;
  margin: 0 auto;
}
.alphabet a {
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.9);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s, color .15s;
  letter-spacing: .02em;
  min-width: 38px;
  text-align: center;
}
.alphabet a:hover {
  background: var(--amber);
  color: #222;
}

/* ============================================================
   DIVISORE featured / banner
   ============================================================ */
.section-divider {
  border: none;
  height: 1px;
  background-color: var(--border);
  max-width: 900px;
  margin: 28px auto;
}

/* ============================================================
   CANZONE IN EVIDENZA
   ============================================================ */
.featured-song {
  max-width: 900px;
  margin: 32px auto 0;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 0;
  overflow: hidden;
}
.featured-song a.featured-img-link {
  flex: 0 0 260px;
}
.featured-song img {
  width: 260px;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-content {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-label {
  display: inline-block;
  background: #fff8e1;
  color: #7a5200;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}
.featured-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 4px;
}
.artist-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.featured-content p:not(.artist-name) {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.featured-button {
  display: inline-block;
  padding: 11px 22px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  width: fit-content;
  transition: background .15s;
}
.featured-button:hover { background: var(--primary2); }

/* ============================================================
   MAIN wrapper
   ============================================================ */
main {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ============================================================
   SEZIONE generica — titolo
   ============================================================ */
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  color: #1a1a2e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   ADSENSE — spazio riservato + contenimento anti-overlay
   ------------------------------------------------------------
   1) min-height responsive: lo spazio è riservato PRIMA che
      l'annuncio carichi, quindi nessun elemento della pagina si
      sposta quando arriva la creatività (Cumulative Layout Shift = 0).
   2) position/isolation/overflow/contain: creano un nuovo
      containing block e un nuovo stacking context per lo slot.
      Qualsiasi elemento con position:fixed/absolute iniettato al suo
      interno (es. da formati di Annunci Automatici Google) resta
      confinato dentro il box e non può più sovrapporsi a header,
      titolo hero o altre sezioni della pagina.
   ============================================================ */
.banner {
  width: 100%;
  max-width: 728px;
  margin: 32px auto;
  padding: 0 16px;
  text-align: center;

  min-height: 100px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  contain: layout paint;

  background: #fdfdfd;
  border-radius: var(--radius);
}
.banner ins.adsbygoogle {
  display: block;
  width: 100% !important;
  height: auto !important;
}
@media (min-width: 600px) {
  .banner { min-height: 250px; }
}
@media (min-width: 992px) {
  .banner { min-height: 280px; }
}

/* ============================================================
   ULTIME CANZONI — card più enfatiche
   ============================================================ */
.latest-songs {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.artist-link {
  display: block;
  background: var(--bg);
  padding: 13px 16px;
  text-align: left;
  text-decoration: none;
  color: #1a1a2e;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  line-height: 1.4;
}
.artist-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ============================================================
   PROMO BOX (Canzonieri / Album / Sanremo) — stile uniforme
   ============================================================ */
.promo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.promo-box {
  background: var(--surface);
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.promo-icon {
  font-size: 36px;
  flex-shrink: 0;
  margin-top: 2px;
}
.promo-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
}
.promo-content p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.promo-button {
  display: inline-block;
  padding: 9px 18px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s;
}
.promo-button:hover { background: var(--primary2); }

/* ============================================================
   ARTISTI PIÙ SUONATI — stesso stile promo
   ============================================================ */
.top-artists {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  padding: 32px 20px 24px;
  text-align: center;
  margin-top: 16px;
}
.site-footer p { margin-bottom: 10px; font-size: 14px; }
.site-footer a { color: var(--amber); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal-note {
  max-width: 860px;
  margin: 16px auto 0;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,.45);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
#cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 10000;
}
#cookie-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: #fff;
  color: #333;
  padding: 28px 24px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  z-index: 10001;
}
#cookie-banner p { margin-bottom: 20px; font-size: 15px; line-height: 1.6; }
#cookie-banner a { color: var(--primary); text-decoration: underline; }
#cookie-banner button {
  padding: 11px 28px;
  cursor: pointer;
  background: var(--amber);
  color: #222;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
}

/* ============================================================
   RESPONSIVE — HEADER
   ------------------------------------------------------------
   Breakpoint alzato a 1200px: con il logo alto 150px e 6 voci
   di menu, il nav desktop occupa già molto spazio ben prima di
   768px e finisce per sovrapporsi al logo centrato. Passando
   all'hamburger a 1200px si evita del tutto la sovrapposizione.
   ============================================================ */
@media (max-width: 1200px) {
  header { height: 90px; padding: 0 16px; justify-content: center; position: relative; }
  nav:not(.nav-mirror) { display: none; }
  .nav-mirror { display: none; }
  .hamburger {
    display: flex;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
  }
  .site-logo { height: 80px; }
  .mobile-nav { top: 90px; }
}

/* ============================================================
   RESPONSIVE — RESTO DEL LAYOUT (invariato a 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* hero */
  .hero { padding: 36px 16px 32px; }
  .hero h2 { font-size: 22px; }

  /* featured */
  .featured-song {
    flex-direction: column;
    margin: 24px 16px 0;
  }
  .featured-song a.featured-img-link { flex: none; }
  .featured-song img { width: 100%; height: 200px; }
  .featured-content { padding: 20px; }

  /* divisore */
  .section-divider { margin: 20px 16px; }

  /* main */
  main { margin: 20px auto; gap: 20px; }

  /* promo affiancati → colonna */
  .promo-pair { grid-template-columns: 1fr; }

  /* griglia artisti */
  .artist-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .site-logo { height: 70px; }
  .artist-grid { grid-template-columns: 1fr; }
  .alphabet a { padding: 8px 12px; font-size: 13px; }
}
