/* =======================
   IMPORT FONT
======================= */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Playfair+Display:wght@700&display=swap');

/* =======================
   RESET E BASE
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f9f9f9;
  color: #243447;
  line-height: 1.6;
  transition: background-color 0.3s ease;
}

h1, h2, h3 {
  text-align: center;
  color: #1e2a38;
  font-family: 'Playfair Display', serif;
}

/* =======================
   HEADER E MENU
======================= */
header {
  background: linear-gradient(135deg, #243447 0%, #3a5068 100%);
  color: white;
  padding: 1rem 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header h1 {
  font-size: 2rem;
}

/* NAV MENU */
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  position: relative;
}

nav ul li a::after {
  content: '';
  display: block;
  height: 2px;
  background: #9cc3ff;
  width: 0%;
  transition: 0.3s;
  position: absolute;
  bottom: -5px;
  left: 0;
}

nav ul li a:hover::after {
  width: 100%;
}

/* HAMBURGER MENU */
.menu-toggle {
  display: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.menu-toggle.active {
  transform: rotate(90deg);
}

/* =======================
   HERO SECTION
======================= */
.hero {
  background: url('../immagini/padre-raschi.jpg') center/cover no-repeat;
  color: white;
  padding: 5rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(36, 52, 71, 0.4);
}

.hero-text {
  position: relative;
  z-index: 1;
  animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
  0% {opacity: 0; transform: translateY(30px);}
  100% {opacity: 1; transform: translateY(0);}
}

/* =======================
   SEZIONE CONTENUTI
======================= */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

p.description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  background: #e6f0fa;
  padding: 1.5rem;
  border-left: 5px solid #3a5068;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

/* Testo generico delle pagine */
.container p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #243447;
}

.container h2 {
  text-align: center;
  color: #1e2a38;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.container a {
  color: #3a5068;
  text-decoration: none;
  transition: color 0.3s ease;
}

.container a:hover {
  text-decoration: underline;
}

/* Citazioni o blockquote */
.container blockquote {
  border-left: 5px solid #3a5068;
  background-color: #e6f0fa;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
  font-style: italic;
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.card a {
  display: inline-block;
  margin-top: 1rem;
  color: #243447;
  font-weight: bold;
  text-decoration: none;
}

.card a:hover {
  color: #3a5068;
  text-decoration: underline;
}

/* =======================
   GALLERY IMMAGINI
======================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery img {
  width: 100%;
  height: 380px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* =======================
   FOOTER
======================= */
footer {
  text-align: center;
  background: linear-gradient(135deg, #243447 0%, #3a5068 100%);
  color: white;
  padding: 2rem 0;
  margin-top: 2rem;
}

footer a {
  color: #9cc3ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #243447;
  }

  nav.active ul {
    display: flex;
  }

  nav ul li {
    border-top: 1px solid #3a5068;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }
/* =======================
   OMELIE – VIDEO CARDS
======================= */
.cards .cards {
  display: contents; /* Risolve il problema della card annidata */
}

.cards .card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.cards .card p {
  font-size: 1rem;
  color: #4a5a6a;
  margin-bottom: 1rem;
}

/* Link Guarda Video */
.cards .card a {
  background-color: #3a5068;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: inline-block;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.cards .card a:hover {
  background-color: #243447;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Spazio sotto la sezione */
section.container {
  margin-bottom: 3rem;
}
/* STILE SPECIFICO PER LA PAGINA LIBRO */
.gallery img {
  height: 600px;
  object-fit: cover;
}

@media (max-width: 480px) {
  .gallery img {
    height: auto; /* altezza proporzionale su mobile */
  }
}

/* Evidenziazione testo libro */
.highlight {
  display: block;
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #e6f0fa;
  border-left: 5px solid #3a5068;
  border-radius: 4px;
}

}