:root {
  --col-primary: #7f93ad;
  /* azzurro polvere */
  --col-primary-dark: #3d4c63;
  /* blu polvere più scuro */
  --col-bg: #f2f4f7;
  --col-bg-alt: #e9edf3;
  --col-light: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--col-bg);
  color: var(--col-primary-dark);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: var(--col-primary-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR -------------------------------------------------- */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Logo */
.logo {
  color: var(--col-primary-dark);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: 'Cormorant Garamond', serif;
  white-space: nowrap;
  z-index: 100000;
}

/* Menu desktop */
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links a:hover {
  opacity: 0.7;
}

/* Hamburger (nascosto su desktop) */
.hamburger {
  display: none;
  width: 32px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;   /* AGGIUNGILA */
  z-index: 100000;      /* AGGIUNGILA QUI → 100% corretto */
}


.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--col-primary-dark);
  transition: 0.35s ease;
  transform-origin: center;   /* 🔥 QUESTA È LA CHIAVE */
}

/* Hamburger → X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* MENU MOBILE FULLSCREEN */
.nav-links.fullscreen {
  position: fixed;
  inset: 0;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  font-size: 22px;
  background: #ffffff;
  padding: 0;
  z-index: 99999;
}

/* MOBILE -------------------------------------------------- */

@media (max-width: 950px) {

  /* Nascondi menu desktop */
  .nav-links {
    display: none;
  }

  /* Mostra hamburger */
  .hamburger {
    display: flex;
  }

  /* Header più compatto */
  header {
    padding: 0 30px;
  }

}



/* LAYOUT GENERALE ---------------------------------------- */

main {
  margin-top: 90px;
  /* spazio per l'header fisso */
}

.section {
  padding: 120px 20px;
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

h2.section-title {
  font-size: 50px;
  text-align: center;
  margin: 0 0 8px;
}

.subtitle {
  text-align: center;
  margin-bottom: 35px;
  font-size: 18px;
  color: #5b6575;
}

/* HERO -------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/header.webp') center/cover no-repeat;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(40, 55, 80, 0.55);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.hero h1 {
  color: #ffffff;
  font-size: 72px;
  margin: 0;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.hero h2 {
  color: #ffffff;
  margin-top: 16px;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* SEZIONI COLORATE FULL WIDTH --------------------------- */

.section-colored {
  background: var(--col-bg-alt);
  width: 100%;
}

.section-colored .section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* IL NOSTRO AMORE --------------------------------------- */

.amore-text {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  font-size: 16px;
}

.amore-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.amore-photos img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* CONTENITORE TIMELINE */
.timeline-wrapper {
  position: relative;
  margin: 70px auto 0;
  max-width: 900px;
}

/* LINEA VERTICALE */
.timeline-line {
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--col-primary-dark);
}

/* EVENTO */
.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 80px;
  padding-left: 100px; /* spazio per linea + pallino + icona */
}

/* PALLINO */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: var(--col-primary-dark);
  border-radius: 50%;
  transform: translate(-50%, 0);
}

/* ICONA */
.timeline-icon {
  width: 48px;
  flex-shrink: 0;
  position: relative;
  top: -4px;
}

.timeline-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--col-primary-dark);
  stroke-width: 1;
  fill: none;
}

/* CONTENUTO */
.timeline-content {
  flex: 1;
}

.timeline-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  margin-bottom: 4px;
  color: var(--col-primary-dark);
}

.timeline-title {
  font-size: 15px;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.13em;
}

.timeline-desc {
  max-width: 520px;
  font-size: 15px;
  color: #4d5666;
}



/* LOCATION ---------------------------------------------- */

.location-text {
  max-width: 700px;
  margin: 0 auto 30px;
  text-align: center;
  font-size: 16px;
}

.location-map iframe {
  width: 100%;
  height: 380px;
  border: 0;
}

/* DRESSCODE --------------------------------------------- */

.dresscode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 760px;
  margin: 40px auto;
}

.dresscode-grid img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* LISTA NOZZE ------------------------------------------- */

#lista {
  text-align: center;
}

.lista-text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 16px;
}

.lista-dati {
  margin-top: 40px;
}

.lista-dati strong {
  display: block;
  margin-top: 30px;
  font-size: 22px;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.05em;
}

.lista-dati span {
  font-size: 17px;
  display: block;
  margin-top: 4px;
}

/* RSVP -------------------------------------------------- */

.rsvp-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: stretch;
}

form input,
form select,
form textarea {
  border: none;
  background: #ffffff;
  padding: 15px;
  font-size: 15px;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}

form textarea {
  height: 130px;
  resize: none;
}

form .field {
  margin-bottom: 16px;
}

.btn-primary {
  background: var(--col-primary-dark);
  color: #ffffff;
  padding: 16px;
  border: none;
  margin-top: 10px;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.btn-primary:hover {
  opacity: 0.9;
}

.rsvp-contacts-box {
  background: var(--col-primary);
  color: #ffffff;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.rsvp-contacts-box p {
  margin: 0 0 20px;
  font-size: 15px;
}

.rsvp-contacts-box p strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.rsvp-contacts-box a {
  color: #ffffff;
  text-decoration: none;
}

.rsvp-contacts-box a:hover {
  text-decoration: underline;
}

/* FOOTER ------------------------------------------------ */

footer {
  background: var(--col-primary-dark);
  color: #ffffff;
  text-align: center;
  padding: 45px;
  margin-top: 90px;
  font-size: 14px;
}

/* RESPONSIVE -------------------------------------------- */

@media (max-width: 900px) {
  .section {
    padding: 90px 20px;
  }

  .section-colored {
    padding: 90px 0;
  }

  .timeline-wrapper {
    margin-top: 50px;
  }

  .timeline-line {
    left: 60px;
  }

  .timeline-item {
    padding-left: 150px;
  }

  .timeline-item::before {
    left: 60px;
  }

  .timeline-icon svg {
    left: 90px;
  }

  .rsvp-layout {
    grid-template-columns: 1fr;
  }

  .rsvp-contacts-box {
    margin-top: 20px;
  }
}

@media (max-width: 720px) {

  .amore-photos,
  .dresscode-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {

  .amore-photos,
  .dresscode-grid {
    grid-template-columns: 1fr;
  }

  .timeline-line {
    left: 40px;
  }

  .timeline-item {
    padding-left: 50px!important;
  }

  .timeline-item::before {
    left: 40px;
  }

  .timeline-icon svg {
    left: 75px;
  }

  .hero h1 {
    font-size: 44px;
    letter-spacing: 0.2em;
  }

  .hero h2 {
    font-size: 18px;
  }
}