/* ==========================================================================
   STYLES - INVITACIÓN DE BODA INID & MARCO (15 MÓDULOS COMPLETOS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   MODULE 1: PORTADA / HERO & VIDEO TRIGGER
   -------------------------------------------------------------------------- */
.section-hero {
  position: relative;
  text-align: center;
  padding-bottom: 2rem;
  background-color: var(--bg-main);
}

.video-container-wrapper {
  padding: 0 1.25rem;
  margin-top: 0.5rem;
}

.video-thumbnail-card {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  background-color: #000;
  border: 4px solid #000;
}

.video-thumbnail-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.video-thumbnail-card:hover img {
  transform: scale(1.03);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.3s ease;
}

.video-play-button {
  width: 64px;
  height: 64px;
  background-color: #FF0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.video-play-button svg {
  width: 28px;
  height: 28px;
  fill: #FFFFFF;
  margin-left: 3px;
}

.video-thumbnail-card:hover .video-play-button {
  transform: scale(1.15);
}

.video-text-subtitle {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-top: 1.2rem;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   MODULE 2: BIENVENIDA & FOTO PRINCIPAL
   -------------------------------------------------------------------------- */
.section-welcome {
  position: relative;
  text-align: center;
  background-color: var(--bg-main);
}

.photo-welcome-container {
  position: relative;
  width: 100%;
}

.photo-welcome-container img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-names-overlay {
  position: absolute;
  bottom: 8%;
  left: 0;
  width: 100%;
  text-align: center;
}

.couple-names-calligraphy {
  font-family: var(--font-script);
  font-size: 3.8rem;
  color: #FFFFFF;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
  line-height: 1;
}

.welcome-text-card {
  padding: 2.5rem 1.75rem;
  background-color: var(--bg-main);
  position: relative;
  z-index: 6;
}

.welcome-heading {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

.welcome-body-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-dark);
  max-width: 480px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   MODULE 3: PADRES Y PADRINOS
   -------------------------------------------------------------------------- */
.section-parents {
  position: relative;
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../assets/images/couple_parents_bg.jpg');
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.monogram-logo {
  width: 110px;
  height: auto;
  margin: 0 auto 1.5rem auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.parents-blessing-header {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.parents-group-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}

.parent-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.dove-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  font-size: 1.2rem;
}

.parents-ampersand {
  font-family: var(--font-script);
  font-size: 3rem;
  margin: 0.8rem 0;
  color: #FFFFFF;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   MODULE 4: FECHA Y CUENTA REGRESIVA
   -------------------------------------------------------------------------- */
.section-countdown {
  text-align: center;
  background-color: var(--bg-main);
  padding: 2.5rem 1.5rem;
}

.quote-header-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 1.5rem auto;
}

.wedding-date-display {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-terracotta);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.countdown-photo-banner {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.countdown-photo-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.countdown-overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #FFFFFF;
  padding: 1rem;
}

.countdown-script-title {
  font-family: var(--font-script);
  font-size: 3.5rem;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.countdown-boxes-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-gold-accent);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.3rem;
  color: #FFFFFF;
  opacity: 0.9;
}

.countdown-colon {
  font-size: 2rem;
  color: var(--color-gold-accent);
  font-weight: 700;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   MODULE 5: ITINERARIO
   -------------------------------------------------------------------------- */
.section-itinerary {
  background-color: var(--bg-main);
  padding: 3rem 1.5rem;
  text-align: center;
}

.itinerary-main-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--color-terracotta-dark);
  margin-bottom: 0.2rem;
}

.itinerary-subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.timeline-wrapper {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
}

/* Central Timeline Bar */
.timeline-center-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: var(--color-terracotta-dark);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-left,
.timeline-right {
  flex: 1;
  padding: 0 1rem;
}

.timeline-left { text-align: right; }
.timeline-right { text-align: left; }

.timeline-node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background-color: var(--color-terracotta-dark);
  transform: translateX(-50%) rotate(45deg);
  border: 2px solid var(--bg-main);
  z-index: 2;
}

.timeline-title-script {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--color-terracotta-dark);
  line-height: 1.1;
}

.timeline-time-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--color-terracotta-dark);
  font-weight: 600;
}

.timeline-icon-sketch {
  width: 48px;
  height: 48px;
  margin: 0.3rem 0;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   MODULE 6, 7, 13: CARDS CEREMONIA, RECEPCIÓN & HOSPEDAJE
   -------------------------------------------------------------------------- */
.section-cards-container {
  background-color: var(--bg-main);
  padding: 1rem 1.25rem 3rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 3rem 1.75rem;
  text-align: center;
  color: #FFFFFF;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.info-card.ceremonia {
  background-color: var(--bg-card-dark);
}

.info-card.recepcion {
  background-color: var(--bg-card-rust);
}

.info-card.hospedaje {
  background-color: var(--color-terracotta-light);
}

/* Corner Lace SVG Decors */
.lace-corner {
  position: absolute;
  width: 110px;
  height: 110px;
  pointer-events: none;
  opacity: 0.85;
}

.lace-top-left { top: 0; left: 0; }
.lace-bottom-right { bottom: 0; right: 0; transform: rotate(180deg); }

.card-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.2rem auto;
  display: block;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.card-body-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   MODULE 10 & 12: OTROS DETALLES (VESTIMENTA & MESA DE REGALOS)
   -------------------------------------------------------------------------- */
.section-other-details {
  position: relative;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../assets/images/couple_details_bg.jpg');
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
  padding: 3.5rem 1.5rem;
}

.tab-header-banner {
  background-color: var(--bg-main);
  color: var(--color-terracotta-dark);
  font-family: var(--font-script);
  font-size: 2.6rem;
  padding: 0.4rem 2rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  text-align: center;
}

@media (min-width: 480px) {
  .details-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
}

.detail-block-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.boots-hat-sketch {
  width: 100px;
  height: auto;
  margin: 1rem auto;
  display: block;
}

.dress-code-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.dress-code-mandatory {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: #FFD180;
  text-transform: uppercase;
  margin-top: 1rem;
}

.gift-clabe-box {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin: 1rem 0;
}

.clabe-number-display {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  margin: 0.5rem 0;
  user-select: all;
}

.btn-copy-clabe {
  background-color: var(--color-terracotta);
  color: #FFFFFF;
  border: none;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.3s;
}

.btn-copy-clabe:hover {
  background-color: var(--color-terracotta-light);
}

/* --------------------------------------------------------------------------
   MODULE 9 & 11: RSVP & CONTROL DE INVITADOS
   -------------------------------------------------------------------------- */
.section-rsvp {
  background-color: var(--bg-main);
  padding: 3rem 1.5rem;
  text-align: center;
}

.rsvp-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-terracotta);
  margin-bottom: 1rem;
}

.rsvp-body-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 2rem auto;
}

.guest-limit-card {
  background-color: var(--color-terracotta-dark);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 2.2rem 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.guest-limit-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.guest-limit-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.95;
}

/* --------------------------------------------------------------------------
   MODULE 14 & 15: GALERÍA, QR & FOOTER
   -------------------------------------------------------------------------- */
.section-gallery {
  background-color: var(--bg-main);
  padding: 3rem 1.5rem;
  text-align: center;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-terracotta-dark);
  margin-bottom: 0.5rem;
}

.gallery-subtitle {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.polaroid-illustration-card {
  background: #FFFFFF;
  padding: 1.2rem 1.2rem 2.5rem 1.2rem;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  display: inline-block;
  transform: rotate(-2deg);
  margin: 1.5rem 0;
  max-width: 280px;
}

.polaroid-illustration-card img {
  width: 100%;
  height: auto;
  border: 1px solid #EEEEEE;
}

.section-qr-footer {
  background-color: var(--bg-main);
  padding: 2.5rem 1.5rem 4rem 1.5rem;
  text-align: center;
}

.qr-pill-badge {
  background-color: var(--color-terracotta-dark);
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  padding: 0.6rem 2.5rem;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 1.5rem;
}

.click-here-script {
  font-family: var(--font-script);
  font-size: 3.8rem;
  color: var(--color-terracotta);
  line-height: 1;
  margin: 1rem 0;
}

/* --------------------------------------------------------------------------
   MODAL POPUP SYSTEM (VIDEO, RSVP, CÓDIGO QR)
   CRITICAL INTERACTION FIX:
   - When NOT active: pointer-events NONE so it NEVER blocks clicks on page.
   - When ACTIVE: pointer-events AUTO so user can interact with modal.
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* CRITICAL FIX: prevents hidden backdrop from blocking clicks */
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Enable interaction when modal is active */
}

.modal-content-card {
  background-color: var(--bg-main);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  position: relative;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
  pointer-events: auto;
}

.modal-backdrop.active .modal-content-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-dark);
  cursor: pointer;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background-color: rgba(0,0,0,0.08);
}

/* Video Modal Iframe Ratio */
.video-responsive-iframe {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.video-responsive-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Form Controls for RSVP Modal */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1.5px solid #D5C8B8;
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
  color: var(--text-dark);
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-terracotta);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}
