/* Reset e variabili - Stile Rustico e Campagnolo */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colori rustici e campagnoli */
  --earth-brown: #8b6f47;
  --warm-beige: #f5f1e8;
  --sage-rust: #9a8b6d;
  --cream-rust: #faf8f3;
  --dark-brown: #5a4a35;
  --light-brown: #b8a082;
  --text-dark: #4a3e2e;
  --text-medium: #6b5d47;
  --text-light: #8a7a64;
  --accent-rust: #8b6f47;
  --bg-rustic: #f9f6f0;
}

body {
  font-family: 'Playfair Display', serif;
  line-height: 1.8;
  color: var(--text-dark);
  background: var(--bg-rustic);
  background-attachment: fixed;
  font-size: 16px;
  position: relative;
}

/* Decorazioni floreali - versione diretta a destra - applicate una sola volta al body */
body::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100vh;
  padding: 2rem;
  background-image: url('../fiori.png');
  background-size: auto 200px;
  background-repeat: repeat-y;
  background-position: top right;
  z-index: 200;
  pointer-events: none;
  opacity: 0.65;
}

/* Decorazioni floreali - versione sinistra con file dedicato - applicate una sola volta al body */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  padding: 2rem;
  background-image: url('../fiorisx.png');
  background-size: auto 200px;
  background-repeat: repeat-y;
  background-position: top left;
  z-index: 200;
  pointer-events: none;
  opacity: 0.65;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Intestazione "Wedding Squeaky" sempre visibile in alto */
.wedding-title-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: var(--warm-beige);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(90, 74, 53, 0.15);
}

.wedding-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--accent-rust);
  font-weight: 700;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
}

/* Selettore lingua - a destra di Wedding Squeaky in alto */
.language-selector {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--sage-rust);
  color: var(--text-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: var(--sage-rust);
  color: white;
  border-color: var(--sage-rust);
}

.lang-btn.active {
  background: var(--accent-rust);
  color: white;
  border-color: var(--accent-rust);
}

/* Main content - Scroll normale */
main {
  padding: 0;
  padding-top: 45px;
  position: relative;
  z-index: 10;
}

/* Sezioni - Scroll normale */
.section {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--cream-rust);
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.section:not(:first-child) {
  position: relative;
  z-index: 500;
  border-top: 3px solid var(--sage-rust);
  padding-top: 2rem;
  margin-top: 0;
}

/* Rimuovi border-top dalla sezione benvenuti */
.section.benvenuti {
  border-top: none;
}

/* Content - Mobile First */
.content {
  width: 100%;
  padding: 1.5rem 1rem;
  position: relative;
  z-index: 10;
}

/* Sezione benvenuti - testo centrato */
.section.benvenuti .content {
  text-align: center;
}

.content h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  color: var(--accent-rust);
  margin-bottom: 1.2rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

/* Sezione benvenuti - font più grande */
.section.benvenuti .content h1 {
  font-size: 3.5rem;
}

.section.benvenuti .content p {
  font-size: 1.3rem;
  font-family: 'Dancing Script', cursive;
  line-height: 1.6;
}

.content h2 {
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  color: var(--accent-rust);
  margin-bottom: 1.2rem;
  text-align: center;
  font-weight: 700;
}

/* Testo giustificato nelle altre sezioni (non benvenuti) */
.section:not(.benvenuti) .content p {
  text-align: justify;
}

.content p {
  font-size: 1rem;
  color: var(--text-medium);
  margin-bottom: 1rem;
  line-height: 1.9;
}

.content p:last-child {
  margin-bottom: 0;
}

/* Stile per i link nelle sezioni di contenuto */
.content p a {
  color: var(--accent-rust);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.content p a:hover {
  color: var(--dark-brown);
  text-decoration: none;
  opacity: 0.8;
}


/* Loghi organizzazioni */
.organizations-logos {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: center;
}

.organizations-logos.mobile-logos {
  display: flex;
}

.organizations-logos.desktop-logos {
  display: none;
}

.org-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
}

.org-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Riduci dimensione logo operazione per allinearlo con emergency */
.org-logo[alt="Operazione Colomba"] {
  width: 120px;
}

.org-logo:hover {
  opacity: 1;
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Sezione "dove festeggiamo" - ordine: testo poi immagine */
.section.dove {
  gap: 1rem;
}

/* Riduci spazio tra ultimo paragrafo e immagine nella sezione dove */
.section.dove .content {
  padding-bottom: 0.5rem;
}

.section.dove .content p:last-child {
  margin-bottom: 0.5rem;
}

.section.dove .image {
  padding-top: 0.5rem;
}

/* Immagini - Mobile First */
.image {
  width: 100%;
  padding: 1rem;
  position: relative;
  z-index: 10;
}

.image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 4px 12px rgba(90, 74, 53, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0.9;
}

.image img:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(90, 74, 53, 0.25);
}

/* Immagine nella sezione benvenuti senza riquadro */
.section.benvenuti .image img {
  border: none;
  box-shadow: none;
  border-radius: 0;
  opacity: 0.9;
}

.section.benvenuti .image img:hover {
  transform: none;
  box-shadow: none;
}

/* Footer - Stile rustico */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--warm-beige);
  color: var(--text-dark);
  border-top: 3px solid var(--sage-rust);
  position: relative;
  z-index: 300;
}

footer p {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.signature {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem !important;
  font-weight: 700;
  color: var(--accent-rust);
  margin-top: 1rem !important;
}

/* Ottimizzazione decorazioni floreali per mobile */
@media (max-width: 599px) {
  body::after {
    width: 120px;
    padding: 1rem;
    background-size: auto 120px;
    z-index: 200;
  }

  body::before {
    width: 120px;
    padding: 1rem;
    background-size: auto 120px;
    z-index: 200;
  }
}

/* Tablet e schermi medi (da 600px) */
@media (min-width: 600px) {
  body::after {
    width: 220px;
    padding: 2rem;
    background-size: auto 180px;
  }

  body::before {
    width: 220px;
    padding: 2rem;
    background-size: auto 180px;
  }

  .wedding-title {
    font-size: 2.5rem;
  }

  .section {
    padding: 3rem 2rem 2rem;
  }

  .content {
    padding: 2rem;
  }

  .content h1 {
    font-size: 3.5rem;
  }

  .section.benvenuti .content h1 {
    font-size: 4rem;
  }

  .section.benvenuti .content p {
    font-size: 1.4rem;
  }

  .org-logo[alt="Operazione Colomba"] {
    width: 110px;
  }

  .content h2 {
    font-size: 3rem;
  }

  .content p {
    font-size: 1.05rem;
  }

  .org-logo {
    width: 140px;
  }
}

/* Desktop (da 900px) - Layout alternato */
@media (min-width: 900px) {
  .section {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 4rem 2.5rem;
    min-height: auto;
    margin-bottom: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(90, 74, 53, 0.1);
  }

  /* Layout alternato desktop */
  .section:nth-child(odd) .content {
    order: 1;
  }

  .section:nth-child(odd) .image {
    order: 2;
  }

  .section:nth-child(even) .content {
    order: 2;
  }

  .section:nth-child(even) .image {
    order: 1;
  }

  /* Sezione "dove festeggiamo" su desktop - testo a sinistra, immagine a destra (sovrascrive l'ordine alternato) */
  .section.dove .content {
    order: 1 !important;
  }

  .section.dove .image {
    order: 2 !important;
  }

  /* Sezione "pensiero" - loghi a sinistra su desktop */
  .section.pensiero .organizations-logos.desktop-logos {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    flex: 1 1 40%;
    min-width: 300px;
    order: 1;
  }

  .section.pensiero .content {
    flex: 1 1 55%;
    order: 2;
  }

  .section.pensiero .organizations-logos.mobile-logos {
    display: none;
  }

  .org-row {
    gap: 2rem;
  }

  .org-logo {
    width: 160px;
  }

  .content {
    flex: 1 1 45%;
    padding: 2rem;
    min-width: 300px;
  }

  .content h1 {
    font-size: 3.5rem;
  }

  .content h2 {
    font-size: 2.5rem;
  }

  .content p {
    font-size: 1.1rem;
  }

  .image {
    flex: 1 1 45%;
    padding: 2rem;
    min-width: 300px;
  }
}

/* Desktop grande (da 1200px) */
@media (min-width: 1200px) {
  body::after {
    width: 280px;
    padding: 2.5rem;
    background-size: auto 220px;
  }

  body::before {
    width: 280px;
    padding: 2.5rem;
    background-size: auto 220px;
  }

  .section {
    padding: 5rem 3rem;
  }

  .content h1 {
    font-size: 4rem;
  }

  .section.benvenuti .content h1 {
    font-size: 4.5rem;
  }

  .section.benvenuti .content p {
    font-size: 1.5rem;
  }

  .content h2 {
    font-size: 3.5rem;
  }

  footer {
    padding: 4rem 2rem;
  }

  .signature {
    font-size: 2.2rem !important;
  }

  .org-logo {
    width: 180px;
  }

  .org-logo[alt="Operazione Colomba"] {
    width: 140px;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}
