/* ==================== VARIABLES ==================== */
:root {
  --color-primary: #8b9674;
  --color-primary-dark: #6d7a5a;
  --color-secondary: #d4af78;
  --color-accent: #c9a676;
  --color-text: #ffffff;
  --color-text-dark: #333333;
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-card: rgba(255, 255, 255, 0.95);
  --color-card-dark: rgba(40, 40, 40, 0.95);
  
  --font-display: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== RESET ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== PANTALLAS ==================== */
.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh; /* Mobile viewport */
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.screen.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== PANTALLA DE BIENVENIDA ==================== */
.overlay-dark {
  background: rgba(0, 0, 0, 0.65) !important;
}

.welcome-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  width: 90%;
  max-width: 600px;
}

.welcome-text {
  margin-bottom: 60px;
}

.welcome-subtitle {
  font-family: var(--font-body);
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 20px;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 32px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.welcome-names {
  font-family: var(--font-display);
  font-size: clamp(64px, 16vw, 96px);
  font-weight: 900;
  letter-spacing: 3px;
  margin: 24px 0;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.1;
}

.welcome-date {
  font-family: var(--font-body);
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 400;
  letter-spacing: 5px;
  margin-top: 24px;
  opacity: 0.95;
}

.welcome-btn {
  padding: 22px 60px;
  border-radius: 50px;
  border: 2px solid white;
  background: transparent;
  color: white;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.welcome-btn:hover {
  background: white;
  color: var(--color-primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.3);
}

.welcome-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* ==================== BACKGROUND ==================== */
.background {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

.overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(1px);
}

/* ==================== HOME SCREEN ==================== */
.center-text {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
  width: 90%;
  max-width: 600px;
  will-change: auto;
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 11vw, 72px);
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.subtitle-top {
  font-family: var(--font-body);
  font-size: clamp(13px, 3.2vw, 20px);
  font-weight: 300;
  letter-spacing: 0.5px;
  opacity: 0.95;
  line-height: 1.4;
}

.buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 2;
  width: 90%;
  max-width: 380px;
  will-change: auto;
}

.menu-btn {
  padding: 16px 28px;
  border-radius: 50px;
  border: none;
  background: var(--color-card);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-icon {
  font-size: 16px;
}

.menu-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
  background: var(--color-primary);
  color: var(--color-text);
}

.menu-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.bottom-text {
  position: absolute;
  bottom: 40px;
  width: 100%;
  text-align: center;
  z-index: 3;
  padding: 0 20px;
}

.subtitle {
  font-family: var(--font-body);
  font-size: clamp(15px, 3.2vw, 24px);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.9;
}

.couple-names {
  font-family: var(--font-display);
  font-size: clamp(38px, 11vw, 80px);
  font-weight: 900;
  margin: 12px 0;
  letter-spacing: 1px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: visible;
}

.date {
  font-family: var(--font-body);
  font-size: clamp(14px, 3.5vw, 22px);
  font-weight: 400;
  letter-spacing: 3px;
  margin-top: 8px;
  opacity: 0.95;
}

/* ==================== PÁGINAS SECUNDARIAS ==================== */
.page {
  position: relative;
  z-index: 2;
  padding: 60px 24px 140px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Página de info más compacta */
#info .page {
  padding: 40px 24px 120px;
}

#info .content-box {
  padding: 28px 20px;
}

.page .content-box {
  text-align: center;
}

.content-box {
  background: var(--color-card);
  border-radius: 24px;
  padding: 40px 28px;
  box-shadow: var(--shadow-lg);
  color: var(--color-text-dark);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--color-primary-dark);
}

.info-title {
  font-size: clamp(20px, 4.5vw, 32px);
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-wrap: break-word;
}

/* ==================== NUESTRA HISTORIA - CARRUSEL ==================== */
.historia-page .content-box {
  padding: 32px 20px 40px;
}

.carousel-container {
  position: relative;
  width: 100%;
  min-height: 450px;
  margin: 20px 0;
}

.carousel-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  display: block;
  opacity: 1;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.carousel-image {
  width: 100%;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-text {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-dark);
  text-align: center;
  padding: 0 16px;
  font-style: italic;
  min-height: 80px;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
}

.carousel-btn {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid var(--color-primary);
  background: white;
  color: var(--color-primary-dark);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  min-width: 90px;
}

.carousel-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--color-primary);
  transform: scale(1.3);
}

.dot:hover {
  background: var(--color-primary-dark);
  transform: scale(1.2);
}

/* ==================== INFO CARDS ==================== */
.info-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  padding: 20px 20px;
  margin: 16px 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}

.info-detail {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 6px 0;
}

.info-time,
.info-location {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

.divider {
  width: 60%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary), transparent);
  margin: 20px auto;
}

/* ==================== FORMULARIO RSVP ==================== */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}

.choice-btn {
  padding: 24px;
  border-radius: 20px;
  border: 2px solid #e0e0e0;
  background: white;
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.choice-icon {
  font-size: 24px;
  transition: var(--transition);
}

.choice-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.choice-btn.selected {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.choice-btn.selected .choice-icon {
  transform: scale(1.2);
}

/* FORMULARIO */
#rsvpForm {
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin: 24px 0;
  width: 100%;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  text-align: left;
  width: 100%;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px solid #e0e0e0;
  font-family: var(--font-body);
  font-size: 16px;
  transition: var(--transition);
  background: white;
}

/* ==================== FIX UNIVERSAL PARA CAMPO FECHA ==================== */
/* Contenedor del formulario pendiente */
#pendingForm {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Form group específico para pendingForm */
#pendingForm .form-group {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 24px 0;
  box-sizing: border-box;
}

/* Campo de fecha ultra específico */
#pendingForm input[type="date"] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px 10px !important;
  margin: 0 !important;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-size: 15px !important;
  display: block !important;
  -webkit-appearance: none;
  appearance: none;
  background: white;
}

/* Para móviles muy pequeños */
@media (max-width: 360px) {
  #pendingForm input[type="date"] {
    padding: 12px 8px !important;
    font-size: 14px !important;
  }
}

/* Para móviles iPhone SE y similares */
@media (max-width: 375px) {
  #pendingForm input[type="date"] {
    padding: 13px 9px !important;
  }
}

/* Asegurar que el submit-btn también tenga el mismo ancho */
#pendingForm .submit-btn {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.form-group input[type="date"],
.form-group select {
  width: 100%;
  max-width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px solid #e0e0e0;
  font-family: var(--font-body);
  font-size: 16px;
  transition: var(--transition);
  background: white;
  cursor: pointer;
  box-sizing: border-box;
  display: block;
  margin: 0;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.form-group input[type="date"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(139, 150, 116, 0.1);
}

/* Campos dinámicos de personas */
.persona-group {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid #e0e0e0;
}

.persona-group h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
}

.persona-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.persona-group input[type="text"] {
  font-size: 15px;
  padding: 14px 18px;
}

.menu-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.menu-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.menu-checkbox input[type="checkbox"] {
  display: none; /* Ocultar checkbox nativo */
}

.menu-checkbox.selected {
  border-color: var(--color-primary);
  background: rgba(139, 150, 116, 0.15);
  font-weight: 600;
}

.menu-checkbox label {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}

.alergias-input {
  margin-top: 12px;
}

/* Botones Sí/No más pequeños y consistentes */
.choice-btn-small {
  flex: 1;
  max-width: 80px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  background: white;
  color: var(--color-text-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.persona-group .choice-group-inline {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.persona-group .choice-group-inline .choice-btn-small {
  max-width: 70px;
  padding: 8px 14px;
  font-size: 13px;
}

.choice-group-inline {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.choice-btn-small {
  flex: 0 0 auto;
  min-width: 80px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  background: white;
  color: var(--color-text-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.choice-btn-small:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.choice-btn-small.selected {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.submit-btn {
  width: 100%;
  max-width: 400px;
  padding: 18px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.submit-btn:active {
  transform: translateY(-1px);
}

/* ==================== HOTEL ==================== */
.hotel-desc {
  text-align: center;
  font-size: 16px;
  color: #666;
  margin-bottom: 32px;
  line-height: 1.6;
}

.page .content-box {
  text-align: center;
}

.hotel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 48px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  color: white;
  border-radius: 20px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 20px auto;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.hotel-icon {
  font-size: 28px;
}

.hotel-link:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

.hotel-note {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-top: 24px;
  font-style: italic;
}

/* ==================== UPLOAD FOTOS ==================== */
.upload-page .content-box {
  padding: 40px 20px;
}

.upload-desc {
  text-align: center;
  font-size: 15px;
  color: #666;
  margin-bottom: 28px;
  line-height: 1.5;
}

.upload-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.upload-btn {
  padding: 20px 40px;
  border-radius: 18px;
  border: 2px dashed var(--color-primary);
  background: white;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-btn:hover {
  background: var(--color-primary);
  color: white;
  border-style: solid;
  transform: translateY(-2px);
}

#photoInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 28px;
  min-height: 200px;
}

.photo-grid:empty {
  background: #f9f9f9;
  border: 2px dashed #ddd;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  grid-template-columns: 1fr;
}

.photo-grid:empty::before {
  content: "Las fotos que selecciones aparecerán aquí";
  color: #999;
  font-size: 14px;
  text-align: center;
}

.photo-preview {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: photoAppear 0.3s ease-out;
}

@keyframes photoAppear {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview .remove-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: #ff4444;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.photo-preview .remove-photo:hover {
  background: #ff4444;
  color: white;
  transform: scale(1.1);
}

/* ==================== BOTÓN VOLVER ==================== */
button.back {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 32px;
  border-radius: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  z-index: 9999;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  pointer-events: auto !important;
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 140px;
}

button.back:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: white;
}

button.back:active {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* ==================== LOADER GLOBAL ==================== */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loader-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loader-content {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loaderText {
  color: white;
  font-size: 16px;
  font-weight: 600;
}

/* ==================== TOAST NOTIFICACIONES ==================== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 16px 24px;
  background: rgba(40, 40, 40, 0.95);
  color: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
  font-size: 15px;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.toast.error {
  background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

/* ==================== ANIMACIONES DE ENTRADA ==================== */
/* Desactivadas para evitar desplazamiento al volver */
.fade-in,
.fade-in-delay,
.fade-in-delay-2 {
  opacity: 1;
  animation: none;
}

/* ==================== RESPONSIVE ==================== */

/* Tablets y pantallas medianas */
@media (min-width: 481px) and (max-width: 768px) {
  .couple-names {
    font-size: clamp(45px, 12vw, 70px);
  }
  
  .main-title {
    font-size: clamp(48px, 11vw, 65px);
  }
  
  .menu-btn {
    padding: 16px 30px;
    font-size: 15px;
  }
}

/* iPads y tablets grandes */
@media (min-width: 769px) and (max-width: 1024px) {
  .couple-names {
    font-size: clamp(60px, 10vw, 80px);
  }
  
  .buttons {
    max-width: 450px;
  }
  
  .page {
    max-width: 700px;
  }
}

/* Móviles pequeños y medianos */
@media (max-width: 480px) {
  .content-box {
    padding: 32px 20px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .info-card {
    padding: 18px 14px;
  }
  
  .choice-btn {
    padding: 18px 14px;
    font-size: 14px;
  }
  
  .photo-grid {
    grid-template-columns: 1fr;
  }
  
  .photo-preview {
    height: 220px;
  }
  
  /* Home - ajustes críticos */
  .center-text {
    top: 1%;
  }
  
  .main-title {
    font-size: clamp(36px, 10vw, 60px);
    margin-bottom: 8px;
  }
  
  .subtitle-top {
    font-size: clamp(12px, 3vw, 16px);
  }
  
  .buttons {
    gap: 12px;
  }
  
  .menu-btn {
    padding: 14px 24px;
    font-size: 13px;
  }
  
  .bottom-text {
    bottom: 30px;
  }
  
  .subtitle {
    font-size: clamp(13px, 3vw, 18px);
    letter-spacing: 1.5px;
  }
  
  .couple-names {
    font-size: clamp(32px, 10vw, 60px);
    letter-spacing: 0.5px;
  }
  
  .date {
    font-size: clamp(12px, 3vw, 18px);
    letter-spacing: 2px;
  }
  
  /* Carrusel responsive */
  .carousel-btn {
    padding: 10px 12px;
    font-size: 12px;
    min-width: 80px;
  }
  
  .carousel-dots {
    gap: 6px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
  
  /* Formulario más compacto */
  .persona-group {
    padding: 16px;
  }
  
  .form-group input[type="text"],
  .form-group input[type="date"],
  .form-group select {
    padding: 14px 16px;
  }
  
  button.back {
    bottom: 20px;
    padding: 14px 28px;
    font-size: 15px;
  }
}

/* iPhone SE y móviles muy pequeños */
@media (max-width: 375px) {
  .couple-names {
    font-size: clamp(28px, 9vw, 50px);
  }
  
  .main-title {
    font-size: clamp(32px, 9vw, 50px);
  }
  
  .menu-btn {
    padding: 12px 20px;
    font-size: 12px;
  }
  
  .carousel-btn {
    padding: 8px 10px;
    font-size: 11px;
    min-width: 70px;
  }
}

/* Pantallas muy pequeñas (< 320px) */
@media (max-width: 320px) {
  .couple-names {
    font-size: clamp(24px, 8vw, 40px);
  }
  
  .main-title {
    font-size: clamp(28px, 8vw, 45px);
  }
}

/* Orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .center-text {
    top: 2%;
  }
  
  .bottom-text {
    bottom: 20px;
  }
  
  .buttons {
    gap: 10px;
  }
  
  .menu-btn {
    padding: 10px 20px;
  }
  
  button.back {
    bottom: 15px;
    padding: 12px 24px;
  }
}

@media (max-height: 700px) {
  .center-text {
    top: 8%;
  }
  
  .bottom-text {
    bottom: 24px;
  }
  
  .couple-names {
    font-size: 48px;
  }
}

/* ==================== OPTIMIZACIONES MÓVIL ==================== */
@media (hover: none) {
  button:hover {
    transform: none;
  }
  
  button:active {
    transform: scale(0.97);
  }
}

/* Evitar zoom en inputs iOS */
@supports (-webkit-touch-callout: none) {
  input[type="text"] {
    font-size: 16px;
  }
}