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

/* BASE */
body {
  font-family: 'Playfair Display', serif;
  background-color: #fdfcfa;
  color: #4b4b4b;
  line-height: 1.7;
}

/* HERO */
.hero {
  height: 100vh;
  background: url('matrimonio ale.avif') center center no-repeat;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 248, 244, 0.5);
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

/* Ottimizzazione mobile per hero */
@media (max-width: 768px) {
  .hero {
    background-position: center center;
    background-size: cover;
    height: 100vh;
  }
  
  .overlay {
    background: rgba(255, 248, 244, 0.6);
  }
}

.hero-logo {
  max-width: 300px;
  width: 80%;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: #7a5c58;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-top: 10px;
}

.hero-date {
  margin-top: 20px;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* SEZIONI */
.section {
  max-width: 900px;
  margin: 80px auto;
  padding: 0 20px;
  text-align: center;
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #7a5c58;
  margin-bottom: 25px;
  font-style: italic;
}

/* FOTO CAROUSEL */
.photo-section {
  display: flex;
  justify-content: center;
}

.photo-frame {
  position: relative;
  width: 500px;
  height: 600px;
  border: 3px solid #e5d8d3;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(122, 92, 88, 0.15);
  background: #faf6f4;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .photo-frame {
    width: 90%;
    max-width: 400px;
    height: 480px;
  }
}

/* DETTAGLI EVENTO */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.detail-card {
  background: #faf6f4;
  padding: 30px;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-5px);
}

.detail-card .icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 15px;
}

.detail-card h3 {
  font-family: 'Playfair Display', serif;
  color: #7a5c58;
  margin-bottom: 10px;
  font-size: 1.4rem;
}

/* IBAN */
.iban-box {
  background: #f6efec;
  padding: 30px;
  border-radius: 18px;
  margin-top: 25px;
}

.iban {
  font-family: monospace;
  font-size: 1.2rem;
  margin: 10px 0;
}

/* RSVP */
.rsvp {
  background: #faf6f4;
  padding: 60px 20px;
  border-radius: 30px;
}

.btn {
  display: inline-block;
  margin-top: 25px;
  padding: 15px 40px;
  background: #7a5c58;
  color: white;
  text-decoration: none;
  border-radius: 40px;
  font-size: 1rem;
  transition: 0.3s ease;
}

.btn:hover {
  background: #5f4744;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 60px 20px 40px;
  color: #7a5c58;
}

.footer-logo {
  display: block;
  margin: 30px auto;
  max-width: 80px;
  height: auto;
}

.footer-separator {
  width: 100%;
  margin-top: 30px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
}

.footer-separator img {
  height: 120px;
  width: auto;
  margin-left: -40px;
  display: block;
}

.footer-separator img:first-child {
  margin-left: -18px;
}

.signature {
  margin-top: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
}

/* DIVIDER */
.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, #e5d8d3, transparent);
  margin: 25px auto;
}

/* RSVP MODAL */
.rsvp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(122, 92, 88, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
  overflow-y: auto;
  padding: 20px;
}

.rsvp-modal-overlay.active {
  opacity: 1;
}

.rsvp-modal {
  background: white;
  border-radius: 25px;
  box-shadow: 0 20px 60px rgba(122, 92, 88, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 50px 40px;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.rsvp-modal-overlay.active .rsvp-modal {
  transform: translateY(0);
}

.rsvp-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #b0a29d;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.rsvp-modal-close:hover {
  background: #faf6f4;
  color: #7a5c58;
}

.rsvp-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #7a5c58;
  text-align: center;
  margin-bottom: 15px;
}

/* FORM STYLES */
.rsvp-form {
  margin-top: 30px;
}

.form-section {
  margin-bottom: 35px;
}

.form-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #7a5c58;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5d8d3;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #7a5c58;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5d8d3;
  border-radius: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #fdfcfa;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #7a5c58;
  box-shadow: 0 0 0 3px rgba(122, 92, 88, 0.1);
  background: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* RADIO BUTTONS */
.radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 20px;
  border: 2px solid #e5d8d3;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: #fdfcfa;
  flex: 1;
  min-width: 150px;
}

.radio-label:hover {
  border-color: #b0a29d;
  background: white;
}

.radio-label input[type="radio"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #7a5c58;
  cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
  font-weight: 500;
  color: #7a5c58;
}

.radio-label:has(input[type="radio"]:checked) {
  border-color: #7a5c58;
  background: #faf6f4;
}

.radio-label span {
  flex: 1;
  color: #4b4b4b;
}

/* CONDITIONAL FIELDS */
.conditional-fields {
  margin-top: 20px;
  padding: 20px;
  background: #faf6f4;
  border-radius: 12px;
  border-left: 4px solid #7a5c58;
}

/* SUBMIT BUTTON */
.rsvp-submit-btn {
  width: 100%;
  padding: 16px;
  background: #7a5c58;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  margin-top: 10px;
}

.rsvp-submit-btn:hover {
  background: #5f4744;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(122, 92, 88, 0.3);
}

.rsvp-submit-btn:active {
  transform: translateY(0);
}

.form-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  display: none;
  font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .photo-frame {
    width: 240px;
    height: 320px;
  }

  .password-card {
    padding: 40px 30px;
  }

  .password-title {
    font-size: 2.5rem;
  }

  .rsvp-modal {
    padding: 40px 25px;
    max-height: 95vh;
  }

  .rsvp-modal-title {
    font-size: 1.6rem;
  }

  .form-section-title {
    font-size: 1.1rem;
  }

  .radio-group {
    flex-direction: column;
  }

  .radio-label {
    min-width: 100%;
  }
}
