main h1 {
  text-align: center;
  margin-top: 20px;
  color: #cc0000;
  font-size: 1.8rem; /* più piccolo dell’h1 standard */
}



/* CONTENUTO PROVVISORIO - centrato verticale */
.coming-soon {
  max-width: 700px;
  margin: 80px auto 40px auto;
  padding: 50px;
  border: 3px dashed #cc0000;
  border-radius: 15px;
  background-color: #fff;

  display: flex;
  flex-direction: column;
  justify-content: center; /* centrato verticalmente */
  align-items: center;     /* centrato orizzontalmente */
  
  text-align: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  min-height: 200px; /* altezza minima per il centraggio verticale */
}

.coming-soon h1 {
  color: #cc0000;
  font-size: 1.4em; /* piccolo e coerente con il testo sotto */
  font-weight: bold;
  margin-bottom: 20px;
}

.coming-soon p {
  font-size: 1.2em;
  color: #333;
}




/* STILE GENERALE */
body {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  background-color: #f5f5f5;
  color: #000000;
}

/* HERO BANNER */
.hero-banner-fixed {
  width: 100%;
  height: auto; /* altezza adattata all'immagine */
  background-color: #cc0000;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-banner-fixed img.hero-img-small {
  width: 80%;
  height: auto; /* altezza reale dell'immagine */
  object-fit: contain;
  display: block;
}

/* HEADER - SLIDER */
header {
  background-color: #cc0000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 300px;
  padding: 20px;
}

.slider {
  width: 75%;
  height: 350px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.slider img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slider img.active {
  opacity: 1;
}

/* MENU */
.navbar {
  background-color: #ffffff;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.navbar li {
  margin: 0;
}

.navbar a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: #555555;
  transition: color 0.3s ease;
  font-weight: bold;
}

.navbar a:hover {
  color: red;
}

.navbar a.active {
  color: #cc0000;
}

/* MENU RESPONSIVE */
.hamburger {
  display: none;
  font-size: 28px;
  padding: 15px;
  cursor: pointer;
  user-select: none;
  color: #000;
}

#toggle {
  display: none;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
  }

  .navbar ul {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #ffffff;
  }

  .navbar ul li {
    width: 100%;
    text-align: center;
    border-top: 1px solid #ddd;
  }

  .hamburger {
    display: block;
    font-size: 28px;
    cursor: pointer;
    color: #000;
  }

  #toggle:checked + .hamburger + ul {
    display: flex;
  }
}

/* CORPO PAGINA */
main {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background-color: #f0f0f0; /* grigio chiaro */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* SOCIAL ICONS */
.social {
  text-align: center;
  margin: 40px 0;
}

.social a img {
  width: 40px;
  height: 40px;
  margin: 0 10px;
  transition: transform 0.3s ease;
}

.social a:hover img {
  transform: scale(1.2);
}

/* FORM CONTATTI */
form {
  max-width: 600px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

form label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  font-family: "Courier New", Courier, monospace;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

form button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #cc0000;
  color: white;
  border: none;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
}

form button:hover {
  background-color: #990000;
}

/* GALLERIA */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.gallery img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.2);
  z-index: 2;
}

/* FOOTER */
body::after {
  content: "© 2025 Gianluca Paffarini. Tutti i diritti riservati.";
  display: block;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #666;
  background-color: #f1f1f1;
  margin-top: 50px;
}

/* UTILI */
.centra-immagine {
  text-align: center;
}

.giustificato {
  text-align: justify;
}

/* BOOK GRID */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.book-card {
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;
  padding: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.book-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.book-card img {
  max-height: 200px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .book-grid {
    grid-template-columns: 1fr;
  }
}

/* MULTIMEDIA GRID */
.multimedia-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.multimedia-item {
  display: block;
  border: 2px solid #000;
  text-align: center;
  padding: 20px;
  text-decoration: none;
  color: #000;
  background-color: #fff;
  transition: border 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.multimedia-item:hover {
  border-color: red;
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.multimedia-item h3 {
  font-size: 1rem;
  margin: 0;
}

.single-item-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.single-item-container .multimedia-item {
  width: 100%;
  max-width: 150px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .multimedia-grid {
    grid-template-columns: 1fr;
  }

  .single-item-container .multimedia-item {
    max-width: 100%;
  }
}

/* RASSEGNA STAMPA GRID */
.rassegna-grid-section {
  padding: 50px 20px;
  text-align: center;
  background-color: #f8f8f8;
}

.rassegna-grid-section h2 {
  margin-bottom: 40px;
  font-size: 2em;
  color: #cc0000;
}

.rassegna-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 50px;
  justify-content: center;
  margin: 0 auto;
  max-width: 800px;
}

.rassegna-item {
  background-color: #ffffff;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #ccc;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.rassegna-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.rassegna-item img {
  width: auto;
  height: 80px;
  display: block;
  margin: 0 auto 10px auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.rassegna-item h3 {
  margin: 10px 0 5px;
}

.rassegna-item p {
  font-size: 0.9rem;
  color: #333;
}

.rassegna-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.15);
  border-color: #cc0000;
  background-color: #ffffff;
}

@media (max-width: 600px) {
  .rassegna-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rassegna-item img {
    height: 100px;
  }
}

/* POESIE POPUP */
.poesia-popup {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(220,220,220,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.poesia-popup:target {
  opacity: 1;
  pointer-events: auto;
}

.poesia-content {
  background-color: #f0f0f0;
  display: inline-block;
  padding: 30px 20px;
  border-radius: 15px;
  max-width: 600px;
  width: auto;
  text-align: left;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  background-color: #cc0000;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
}

.close-popup:hover {
  background-color: #990000;
}








/* BACK BUTTON SOTTO LA GRIGLIA */
.back-button {
  text-align: center;
  margin: 40px 0 60px 0; /* distanza dal grid sopra e dal social sotto */
}
.back-button a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #cc0000;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
.back-button a:hover { background-color: #990000; }

/* GRIGLIA POESIE */
.poesie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonne desktop */
  gap: 20px;
  max-width: 1200px;
  margin: 50px auto;
  padding: 20px;
}

@media (max-width: 1024px) {
  .poesie-grid { grid-template-columns: repeat(2, 1fr); } /* tablet */
}

@media (max-width: 768px) {
  .poesie-grid { grid-template-columns: 1fr; } /* mobile */
}
