/* === BASE === */
body {
  font-family: 'Dancing Script', cursive; /* alternative Titoli in Great Vibes e testi in Dancing Script o qualsiasi altro */
  background: #fff4f2; /* rosa antico pesca chiarissimo */
  color: #333;
  text-align: center;
  padding: 30px;
}

h1, h2, h3 {
  color: #b76e79; /* rosa antico */
}

p {
  font-size: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

/* === NAVIGAZIONE === */
nav {
  margin: 30px 0;
}

nav a {
  display: inline-block;
  margin: 10px 15px;
  padding: 10px 15px;
  background: #b76e79; /* stesso rosa antico dei titoli */
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 22px; /* 1.25rem o 20px, default 1rem = 16px */
}

/* === SEZIONI === */
section {
  margin-top: 60px;
  padding: 20px;
  border-top: 1px solid #ccc;
}

/* === CAROUSEL PRINCIPALE === */
.carousel-container {
  position: relative;
  max-width: 600px;
  margin: 20px auto;
}

.main-image-wrapper {
  height: 350px; /* spazio riservato fisso */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* nasconde parti fuori dallo spazio */
  margin-bottom: 10px;
  border-radius: 12px;
}


.main-image {
  max-height: 100%; /* rispetta il contenitore */
  max-width: 100%;
  /*height: auto;*/
  width: auto;
  object-fit: cover;
  border-radius: 12px;
  transition: opacity 0.5s ease-in-out;
  display: block;
}

/* === MINIATURE === */
.thumbnail-row {
  margin-top: 15px;
  display: flex;
  flex-wrap: nowrap; /* non andare a capo */
  justify-content: center;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.thumbnail-row::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Bordi opachi sfumati (overlay) sulle miniature solo se c’è overflow e classe has-scroll attiva */
.thumbnail-wrapper {
  position: relative; /* necessario per posizionare pseudo-elementi */
}

.thumbnail-wrapper::before,
.thumbnail-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px; /* ridotto rispetto al precedente 20px (2/3 circa) */
  z-index: 2;
  pointer-events: none;
  display: none; /* di default nascosti */
}

.thumbnail-wrapper.has-scroll .thumbnail-row {
  justify-content: flex-start;
}

.thumbnail-wrapper.has-scroll::before,
.thumbnail-wrapper.has-scroll::after {
  display: block;
}

.thumbnail-wrapper.has-scroll .thumbnail-row::before,
.thumbnail-wrapper.has-scroll .thumbnail-row::after {
  content: "";
  width: 12px;
  flex-shrink: 0;
  height: 1px;
}

.thumbnail-wrapper.has-scroll::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,244,242,1), rgba(255,244,242,0));
}

.thumbnail-wrapper.has-scroll::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,244,242,1), rgba(255,244,242,0));
}

.thumbnail {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  border: 2px solid #b76e79;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  body {
    padding: 20px 10px;
  }

  nav a {
    display: block;
    margin: 10px auto;
    font-size: 18px;
    width: 80%;
  }

  h1, h2 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1rem;
  }
}
.image-fade-frame {
  position: relative;
  display: inline-block;
  border-radius: 12px;
}

/* Sfondo sfumato cucito sulla dimensione effettiva dell'immagine */
.image-fade-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 12px;
  background:
    linear-gradient(to top,    rgba(255, 244, 242, 1), transparent 15%),
    linear-gradient(to bottom, rgba(255, 244, 242, 1), transparent 15%),
    linear-gradient(to left,   rgba(255, 244, 242, 1), transparent 7.5%),
    linear-gradient(to right,  rgba(255, 244, 242, 1), transparent 7.5%);
}

.floating-audio-btn {
  display: none; 
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  font-size: 24px;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background-color 0.3s;
}

.floating-audio-btn:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

#backgroundPlayer {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Sezione RSVP */
#rsvp {
  margin-top: 60px;
  padding: 20px;
  border-top: 1px solid #ccc;
  text-align: center;
}

#rsvp h2 {
  color: #b76e79;
  font-size: 2rem;
  margin-bottom: 10px;
}

#rsvp p {
  font-size: 1rem;
  margin-bottom: 20px;
}

.rsvp-container iframe {
  max-width: 600px;
  width: 90%;
  height: 400px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* bottone per copiare IBAN*/
.iban-btn {
  background-color: #b76e79; /* rosa antico */
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-family: 'Dancing Script', cursive;
  /*font-weight: bold;*/
  transition: background-color 0.3s ease;
}

.iban-btn:hover {
  background-color: #a05d68; /* tono leggermente più scuro */
}
/* HUD per avviso IBAN*/
.iban-hud {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(183, 110, 121, 0.95);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 16px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 9999;
}

.iban-hud.show {
  opacity: 1;
  transform: translateY(0);
}

/* Alloggi - logistica - hotel cards */
.hotel-card {
  max-width: 500px;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff4f2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hotel-card h3 {
  color: #b76e79;
  margin-bottom: 8px;
}

.hotel-card p {
  margin: 6px 0;
}

.hotel-card a {
  color: #b76e79;
  text-decoration: none;
  font-weight: bold;
}

.hotel-card a:hover {
  text-decoration: underline;
}

/* CREDITS/ringraziamenti */
#credits {
  margin-top: 40px;
}

#credits h2 {
  text-align: center;
  margin-bottom: 20px;
}

.credit-item {
  margin: 20px 0;
  padding: 10px 0;
}

.credit-item h3 {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5em;
  margin-bottom: 5px;
  color: #b76e79;
}

.credit-item p {
  margin: 0;
}

.credit-item a {
  color: #b76e79;
  text-decoration: none;
  font-weight: bold;
}

.credit-item a:hover {
  text-decoration: underline;
}


.credit-item {
  max-width: 500px;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff4f2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* Griglia YouTube */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.video-grid iframe {
  border: none;
  border-radius: 8px;
}