/* styles.css */
@font-face {
    font-family: 'Astralaga';
    src: url('fonts/Astralaga-Medium.woff') format('truetype');
    font-weight: 900;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Autography';
    src: url('fonts/AUTOGRAPHY.woff') format('truetype');
    font-weight:900;
    font-style: normal;
  }
  
  @font-face {
    font-family: 'Avenir';
    src: url('fonts/Avenir-LT-Std-55-Roman.woff') format('truetype');
    font-weight: 900;
    font-style: normal;
  }

   @font-face {
    font-family: 'Breathing';
    src: url('fonts/BreathingPersonalUse-MVOGJ.woff') format('truetype');
    font-weight: 900;
    font-style: normal;
  }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    background: #000000;
    color: white;
}

/* PANTALLA DE CARGA - POSICIONAMIENTO ABSOLUTO PARA NO AFECTAR EL LAYOUT */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  /* Asegurar que la pantalla de carga no afecte el layout */
  pointer-events: none; /* Desactivar interacción cuando esté oculta */
}

/* Cuando la pantalla de carga está activa, reactivar pointer-events */
#loading-screen:not(.hidden) {
  pointer-events: auto;
}

/* Animación de la libélula */
#container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 0;
  padding-bottom: 62.5%;
}

#animation-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#libelula {
  position: absolute;
  transform-origin: center;
  width: 37.5%;
  height: 60%;
  z-index: 10;
}

#trail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#logo-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
   width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

#logo {
  max-width: 100%;
  max-height: 100%;
  margin-top: 0%;
}

/* Desvanecer la pantalla de carga */
.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

@media (max-width: 768px) {
  #container {
      padding-bottom: 100%;
  }

  #logo-container {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  #container {
      padding-bottom: 100%;
  }

  #logo-container {
    width: 250px;
    height: 250px;
  }

 
}

/* ---------------------- */
/* CONTENIDO PRINCIPAL - ASEGURAR POSICIONAMIENTO CORRECTO */
/* ---------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

/* El contenido principal debe estar siempre visible en el DOM pero inicialmente oculto */
.main-content {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.main-content.show {
  opacity: 1;
  visibility: visible;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url('imagenes/inv\ digital\ EMMI\ VALENTIN\ B-02.webp');
  background-size: contain;
  background-position: center center;
  background-attachment: scroll;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  /* Asegurar que la navbar mantenga su posición original */
  height: auto;
  min-height: 80px;
}


.logo {
  font-family: 'Breathing', cursive;
  font-size: 32px;
  font-weight: bold;
  color: #9ca696;
  margin: 0 20px;
  white-space: nowrap;
}

@media (max-width: 1090px) {
.navbar {
  height: auto;
  min-height: 15px;
}

  .logo {
    font-size: 20px;
  }
}

/* ---------------------- */
/* SECCIÓN DE CONFIRMACIÓN - MANTENER POSICIONAMIENTO ORIGINAL */
/* ---------------------- */
.confirmacion-section {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url('imagenes/Recurso\ 2.webp');
  background-size: 100%;
  background-position: right;
  background-attachment: scroll;
  overflow: auto;
  min-height: 700px;
  /* Asegurar que el padding-top compense la navbar fija */
  padding-top: 80px;
}

.confirmation-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 0px;
}

/* Contenedor principal */
.container {
  position: relative;
  width: 400px;
  max-width: 90%;
}

/* Cuadro principal más alargado */
.codigo-box {
  position: relative;
  width: 420px;
  height: 600px;
  background: white;
  left: -160px;
  padding: 2em;
  border-radius: 15px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 2;
}

.codigo-box.hidden {
  opacity: 0;
  transform: translateY(20px);
}

.codigo-box.visible {
  opacity: 1;
  transform: translateY(0);
}

.codigo-box h2 {
  font-family: "Astralaga", sans-serif;
  font-size: 1.5em;
  color: #333;
  margin-bottom: 2em;
  margin-top: 6em;
}

/* Input de código */
.input-codigo {
  width: 100%;
  padding: 0.8em;
  border: none;
  border-bottom: 2px solid black;
  font-size: 1em;
  outline: none;
  background: transparent;
  text-align: center;
  color: #333;
  margin-top: 1em;
}

/* Botón de verificación */
.btn-verificar {
  margin-top: 30px;
  width: 100%;
  padding: 1em;
  border: 2px solid #31332A;
  border-radius: 10px;
  background:#31332A;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-verificar:hover {
  background: white;
  color: #31332A;
}

/* Cuadro secundario (fondo negro con imagen) */
.cuadro-secundario {
  position: absolute;
  max-width:800px;
  height: 500px;
  background-image: url('imagenes/inv\ digital\ EMMI\ VALENTIN\ B-02.webp');
  background-size: 20%;
  background-position: center center;
  background-attachment: scroll;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items:end;
  justify-content:start;
  padding: 2em;
  z-index: 1;
}

.cuadro-secundario h2 {
  font-family: "Astralaga", sans-serif;
  font-size: 2em;
  padding: 0;
  text-align: center;
  max-width: 100%;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4em;
  margin-bottom: 1em;
  max-width: 40%;
  text-align: center;
}

/* Frase inspiradora */
.frase {
  font-family: "Avenir";
  font-size: .9em;
  color: #9ca696;
  margin-left: auto;
  text-align: center;
  max-width: 39%;
}

/* Nombre de la familia y mensaje */
.nombre-familia, .mensaje-personalizado {
  font-weight: bold;
  font-size: 1.2em;
  margin-top: 1em;
}

@media (max-height: 800px) {
  .confirmacion-section {
    height: auto;
    min-height: 700px;
    padding: 150px 0;
  }
}

/* Diseño responsivo para pantallas pequeñas */
@media (max-width: 768px) {
  .confirmacion-section {
    height: 100vh;
    padding: 20px 0;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  
  .mensaje-fecha-confirmacion {
    font-size: 1em;
    bottom: 10%;
    position: absolute;
  }
  
  .cuadro-secundario {
    position: static;
    width: 40%;
    height: 400px;
    z-index: 1;
    border-radius: 0;
    padding: 1em;
    opacity: 0.8;
    order: 1;
    border-radius:3px;
  }

  .container {
    position: static;
    width: 60%;
    max-width: 100%;
    z-index: 2;
    order: 2;
  }

  .codigo-box {
    position: static;
    width:50%;
    height: 450px;
    left: 0;
    margin-bottom: 0px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    border-radius:15px;
    background: rgba(252, 252, 252, 0.9);
  }

 .codigo-box h2 {
    font-size: 1em;
    color: #333;
    margin-bottom: 0em;
    margin-top: 7em;
  }


  .cuadro-secundario h2 {
    font-family: "Astralaga", sans-serif;
    font-size: 1.3em;
    max-width: 100%;
    margin-top: 5em;
    margin-bottom: 5em;
  }
  
  .frase {
    font-family: "Avenir";
    font-size: .9em;
    color: #ccc;
    margin-left: auto;
    text-align: center;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .confirmacion-section {
    height: 100vh;
    padding: 10px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .codigo-box {
    padding: 1em;
  }
  
   .codigo-box h2 {
  margin-bottom: 2em;
  margin-top: 7em;
}

  .cuadro-secundario {
    padding: 1em;
  }

  .cuadro-secundario h2,
  .cuadro-secundario .frase {
    font-size: .9rem;
    margin-top: 7em;
  margin-bottom:-5em;
  }
  
  .mensaje-fecha-confirmacion {
    font-size: 0.9em;
    bottom: 8%;
    max-width: 90%;
  }
}

@media (max-height: 800px) {
  .confirmacion-section {
    height: 100vh;
    min-height: 500px;
    padding: 10px 0
  }
  
  .cuadro-secundario {
    min-height: 300px;
    margin-bottom: 10px;
  }
  
  .codigo-box {
    min-height: 400px;
  }
  
  .mensaje-fecha-confirmacion {
    margin-top: 350px;
  }
}

/* ---------------------- */
/* RSVP Decision Screen */
/* ---------------------- */
.rsvp-decision-box {
    display: none;
    position: relative;
    width: 420px;
    height: 650px;
    background: white;
    left: -160px;
    padding: 2em;
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 2;
}

.rsvp-decision-box.visible {
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.guest-name {
    font-family: "Breathing", cursive;
    font-size: 2.2em;
    color: #9ca696;
    margin-bottom: 2em;
    text-align: center;
}

.guest-name-p{
    font-size: 1.5em;
}

.rsvp-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 2em;
}

.btn-rsvp {
    padding: 1.2em 2em;
    border: 3px solid #31332A;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-rsvp.yes {
    background: #556a5d;
    color: white;
    border-color: #556a5d;
}

.btn-rsvp.yes:hover {
    background: #556a5d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 79, 0.13);
}

.btn-rsvp.no {
    background: #c97b75;
    color: white;
    border-color: #c97b75;
}

.btn-rsvp.no:hover {
    background: #c97b75;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.13);
}

.btn-back {
    margin-top: 20px;
    padding: 0.8em;
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Success/Error Messages */
.rsvp-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

.rsvp-message.success {
    background: #d4edda;
    color: #556a5d;
    border: 1px solid #c3e6cb;
}

.rsvp-message.error {
    background: #f8d7da;
    color: #813b42;
    border: 1px solid #f5c6cb;
}

/* ================================
   DISEÑO RESPONSIVO PARA RSVP DECISION
   ================================ */

/* Pantallas medianas (tablets) */
@media (max-width: 768px) {
    .rsvp-decision-box {
        position: static;
        width: 50%;
        height: 550px;
        left: 0;
        margin-bottom: 20px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
        border-radius: 15px;
        background: rgba(252, 252, 252, 0.9);
        order: 2;
        z-index: 2;
    }

    .rsvp-decision-box h2 {
        font-size: 1em;
        color: #333;
        margin-bottom: 1em;
        margin-top: 2em;
    }

    .guest-name {
        font-size: 1.8em;
        margin-bottom: 1.5em;
    }

    .rsvp-buttons {
        gap: 15px;
        margin-top: 1.5em;
    }

    .btn-rsvp {
        padding: 1em 1.5em;
        font-size: 1em;
        border-radius: 10px;
    }

    .btn-back {
        padding: 0.7em;
        font-size: 0.8em;
        margin-top: 15px;
    }

    .rsvp-message {
        margin-top: 15px;
        padding: 12px;
        font-size: 0.9em;
    }
}

/* Pantallas pequeñas (móviles grandes) */
@media (max-width: 670px) {
     .rsvp-decision-box {
        position: static;
        width: 50%;
        height: 550px;
    }
    
    .rsvp-decision-box h2 {
        font-size: 0.9em;
        margin-top: 3em;
    }

    .guest-name {
        font-size: 1.5em;
        margin-bottom: 1.2em;
    }

    .btn-rsvp {
        padding: 0.9em 1.2em;
        font-size: 0.9em;
    }
}

/* Pantallas muy pequeñas (móviles) */
@media (max-width: 480px) {
    .rsvp-decision-box {
        width: 55%;
        padding: 1em;
        height: 500px;
    }

    .guest-name {
        font-size: 1.2em;
        margin-bottom: 1em;
    }
    
    .guest-name-p{
        font-size: .9em;
    }

    .rsvp-buttons {
        gap: 12px;
        margin-top: 1.2em;
    }

    .btn-rsvp {
        padding: 0.8em 1em;
        font-size: 0.8em;
        border-radius: 8px;
    }

    .btn-back {
        padding: 0.6em;
        font-size: 0.7em;
        margin-top: 12px;
    }

    .rsvp-message {
        margin-top: 12px;
        padding: 10px;
        font-size: 0.8em;
    }
}

/* Para pantallas con altura limitada */
@media (max-height: 800px) {
    .rsvp-decision-box {
        min-height: 400px;
    }

    .guest-name {
        margin-bottom: 1em;
    }

    .rsvp-buttons {
        margin-top: 1em;
        gap: 15px;
    }
}

/* ================================
   Estilos para el Modal de Confirmación
   ================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    position: relative;
    width: 900px;
    max-width: 95%;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
    display: flex;
    justify-content: center;
    height: 600px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-box.secondary {
    position: absolute;
    width: 800px;
    height: 600px;
    background: #556a5d;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: end;
    justify-content: start;
    padding: 2em;
}

.modal-title {
    font-family: "Astralaga", sans-serif;
    font-size: 2em;
    padding: 0;
    text-align: center;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4em;
    margin-bottom: 1em;
    max-width: 40%;
    text-align: center;
    color: white;
}

.modal-box.secondary h3 {
    font-family: "Avenir", sans-serif;
    font-size: 2em;
    color: white;
    padding: 2rem;
    text-align: center;
    max-width: 40%;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0em;
    margin-bottom: 0em;
}

.modal-message {
    font-family: "Avenir";
    font-size: .9em;
    color: #ccc;
    margin-top: 1em;
    margin-left: auto;
    text-align: center;
    max-width: 39%;
}

.modal-box.primary {
    position: relative;
    width: 420px;
    background: white;
    padding: 2em;
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10;
    left: -160px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-box.primary h2 {
    font-family: "Astralaga", sans-serif;
    font-size: 3em;
    color: #333;
    margin-bottom: 0em;
    margin-top: 2em;
}

.modal-box.primary h3 {
    font-family: "Avenir", sans-serif;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 2em;
}

.modal-box.primary input {
    width: 100%;
    padding: 0.8em;
    border: none;
    border-bottom: 2px solid black;
    font-size: 1em;
    outline: none;
    background: transparent;
    text-align: center;
    color: #333;
    margin: 1em 0;
}

.modal-box.primary input[type="number"] {
    width: 80px;
    margin: 0.5em auto;
    display: block;
}

.modal-box.primary p {
    margin: 1em 0;
    color: #333;
}

.modal-box.primary button {
    margin-top: 20px;
    width: 100%;
    padding: 1em;
    border: 2px solid #31332A;
    border-radius: 10px;
    background: #31332A;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.modal-box.primary button:hover {
    background: white;
    color: #31332A;
}

.modal-box.primary button#cerrarModal {
    background: transparent;
    color: #31332A;
    border: 1px solid #31332A;
    margin-top: 10px;
}

.modal-box.primary button#cerrarModal:hover {
    background: #f5f5f5;
}

.mensaje-confirmacion {
    margin-top: 15px;
    font-weight: bold;
    min-height: 40px;
}

/* Diseño responsivo para pantallas pequeñas */
@media (max-width: 768px) {
  .modal-container {
    height: 80vh;
    padding: 20px 0;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .modal-box.secondary {
    position: static;
    width: 40%;
    height: 400px;
    z-index: 1;
    border-radius: 10px;
    padding: 0em;
    opacity: 1;
    order: 1;
  }

  .modal-title {
    font-size: 1.5em;
    max-width: 100%;
    margin-top: 2em;
    margin-bottom: 2em;
  }
  
  .modal-box.secondary h3 {
    font-size: 1.2em;
    padding: .5em;
    text-align: center;
    max-width: 100%;
    margin-top: 0em;
    margin-bottom: 2em;
  }

  .modal-message {
    font-size: .9em;
    color: #ccc;
    margin-left: auto;
    text-align: center;
    max-width: 100%;
  }

  .modal-box.primary {
    position: static;
    width: 50%;
    height: 450px;
    left: 0;
    margin-bottom: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    order: 2;
    z-index: 2;
  }

  .modal-box.primary h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 1em;
    margin-top: 1em;
    padding: .5em;
  }
}

@media (max-width: 670px) {
  .modal-box.primary h2 {
    font-size: 2.0em;
  }
  
  .modal-box.primary h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 1em;
    margin-top: 1em;
    padding: .5em;
  }
  
  .modal-title {
    font-size: 1.2em;
    max-width: 100%;
    margin-top: 2em;
    margin-bottom: 2em;
  }
}

@media (max-width: 480px) {
  .modal-box.primary {
    padding: 1em;
    width: 60%;
  }

  .modal-box.secondary {
    padding: 1em;
    width: 40%;
  }

  .modal-title {
    font-size: .9em;
    margin-top: 4rem;
  }

  .modal-box.secondary h3 {
    font-size: .9em;
  }

  .modal-message {
    font-size: .8em;
  }

  .modal-box.primary button {
    padding: 0.8em;
    font-size: 0.9em;
  }
}

/* ---------------------- */
/* footer */
/* ---------------------- */
.footer {
  background: #31332A;
  color: #ffffff;
  padding: 10px 0px;
  text-align: center;
  font-family: 'Avenir', sans-serif;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.footer-logo-image{
  width: 200px;
  height: auto;
}

/* Enlaces de redes sociales */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icon {
  width: 30px;
  height: 30px;
  filter: brightness(0) invert(1); /* Iconos en blanco */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Derechos reservados */
.footer-copyright {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 10px;
}

/* 📌 Responsividad */
@media (max-width: 768px) {
  .footer-signature {
    font-size: 1.5rem;
  }

  .social-icon {
    width: 25px;
    height: 25px;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }

  .footer-logo-image{
    width: 200px;
    height: auto;
  }
}

@media (max-width: 480px) {
  .footer-signature {
    font-size: 1.3rem;
  }

  .footer-logo-image{
    width: 200px;
    height: auto;
  }

  .social-icon {
    width: 20px;
    height: 20px;
  }

  .footer-copyright {
    font-size: 0.7rem;
  }
}