/* =======================================================
   TITOLI
   =======================================================*/
h1 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Titoli sempre bianchi */
h1, h2, h3, h4, h5, h6, p {
  color: #fff;
}

/* Evidenziazione oro con sfondo nero */
.oro {
  display: inline-block;               /* rettangolo compatto */
  background: rgba(0, 0, 0, 0.7);      /* nero con 80% di opacità */
  color: #dfb700;                      /* testo oro */
  padding: 0.6rem 0.9rem;              /* spazio interno */
  border-top-right-radius: 12px;       /* arrotondato in alto a destra */
  border-bottom-left-radius: 12px;     /* arrotondato in basso a sinistra */
  border-top-left-radius: 0;           /* angolo vivo */
  border-bottom-right-radius: 0;       /* angolo vivo */
  font-size: 0.9rem;                   /* leggermente più piccolo */
  margin: 0.5rem 0;                    /* margine sopra/sotto */
}


/* =======================================================
   SPAZIATURA SPECIFICA
   =======================================================*/

/* Riduce lo spazio subito dopo il blocco audio */
.audio-fixed + p,
.audio-fixed + div p:first-of-type,
main > div + p:first-of-type {
  margin-top: 1rem;
}


/* =======================================================
   PULSANTI
   =======================================================*/

/* Pulsanti bordeaux */
.btn-bordeaux {
  display: inline-block;
  background-color: #800020;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin: 0.05rem 0;
  border: none;
  outline: none;
}
.btn-bordeaux:hover { background-color: #a52a2a; }
.btn-bordeaux:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.5);
}

/* Pulsante secondario (grigio, testo più piccolo) */
.btn-secondary {
  display: inline-block;
  background-color: #555;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.8rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 0.05rem 0;
  border: none;
  outline: none;
}
.btn-secondary:hover { background-color: #777; }


/* =======================================================
   CONTENUTO PRINCIPALE
   =======================================================*/
main {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  max-width: 750px;
  margin: auto;
  text-align: center;
  /* border: 6px solid blue;  debug */
}

strong { font-weight: bold; }
em { font-style: italic; }
p { margin-bottom: 1.2rem; }

ul { list-style: none; padding: 0; }
ul li { margin: 0.5rem 0; }


/* =======================================================
   LAYOUT GLOBALE
   =======================================================*/
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

/* Sfondi */
body.bg-fratres     { background-image: url("../img/fratres.webp"); }
body.bg-coltello    { background-image: url("../img/cadavere3.png"); }
body.bg-piazza      { background-image: url("../img/piazza.png"); }
body.bg-aggressione { background-image: url("../img/aggressione.png"); }
body.bg-silente { background-image: url("../img/background-silente.jpg"); }
body.bg-filiberto { background-image: url("../img/filiberto.webp"); }
body.bg-madama { background-image: url("../img/madama.webp"); }

/* =======================================================
   COLORI TEMA
   =======================================================*/
[data-theme="light"], :root {
  --primary: #800020;
  --primary-hover: #4d0010;
  --contrast: #dfb700;
  --contrast-hover: #e6c821;
}
[data-theme="dark"] {
  --primary: #800020;
  --primary-hover: #4d0010;
  --contrast: #dfb700;
  --contrast-hover: #e6c821;
}


/* =======================================================
   FOOTER
   =======================================================*/
footer {
  text-align: center;
  font-size: 0.8rem;
  color: #f0f0f0;
  opacity: 0.7;
  margin: 2rem 0 5rem 0; /* spazio extra sopra l’audio */
  padding: 0;
}


/* =======================================================
   AUDIO FISSO
   =======================================================*/
.audio-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  padding: 0.5rem;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.5);
  z-index: 2000;
  text-align: center;
  /* border: 2px solid red;  debug */
}

.audio-fixed audio {
  width: 95%;
  max-width: 600px;
  min-height: 50px;
  display: block;
  margin: 0 auto;
}


/* =======================================================
   BARRA SUPERIORE
   =======================================================*/
:root { --topbar-h: 32px; }

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .4rem;
  background: rgba(0, 0, 0, 0.7);
  color: #dfb700;
  font-size: .75rem;
  line-height: 1;
  backdrop-filter: blur(2px);
  overflow: hidden;
}

.top-bar .left,
.top-bar .right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.tb-item { display: flex; align-items: center; gap: .2rem; white-space: nowrap; }
.tb-label { opacity: .8; font-size: .7rem; }
.tb-val { font-weight: 600; font-size: .75rem; }

.tb-link {
  color: #dfb700;
  text-decoration: none;
  font-size: .75rem;
  padding: .1rem .3rem;
  border-radius: 4px;
}
.tb-link:hover { background-color: rgba(223,183,0,.15); }

/* Sposta contenuto sotto la barra */
body { padding-top: var(--topbar-h); }

@media (max-width: 480px) {
  :root { --topbar-h: 34px; }
  .top-bar { font-size: .7rem; }
}