/* styles.css */

/* ============================================= */
/* PARÁMETROS GLOBALES Y RESET                   */
/* ============================================= */

/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Estilos base para body */
body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #333;
  padding-top: 100px;
  padding-bottom: 40px;
  /*font-size: clamp(8px, 1.5vw + 1rem, 20px);*/
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
    padding-bottom: 0px;
  }
}

/* ============================================= */
/* ENCABEZADOS GLOBALES h1-h5                    */
/* ============================================= */

h1, h2, h3, h4, h5 {
  font-weight: bold;
  color: #333;
/*  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;*/
  margin-bottom: 0.7em;
  word-wrap: break-word;
}

h1 {
  /*font-size: min(6vw, 2.5rem);*/
  font-size: min(6vw, 2.5rem);
}
h2 {
  font-size: min(5vw, 2.2rem);
}
h3 {
  font-size: min(4.5vw, 2rem);
}
h4 {
  font-size: min(4vw, 1.7rem);
}
h5 {
  font-size: min(3.5vw, 1.5rem);
}

.galeria h1, .galeria h2, .galeria h3 {
  text-align: center;
}

.texto-justificado h1, .texto-justificado h2, .texto-justificado h3 {
  text-align: left;
}

/* ============================================= */
/* PÁRRAFOS GLOBALES                             */
/* ============================================= */

p {
  font-size: clamp(8px, 1.5vw + 0.5rem, 18px);
  line-height: 1.6;
}

/* ============================================= */
/* CLASE .texto-justificado                      */
/* ============================================= */

.texto-justificado {
  text-align: justify;
  line-height: 1.6;
  margin: 0 0px;
  padding: 0;
  /*font-size: clamp(8px, 1.5vw + 0.5rem, 18px);*/
  /*font-size: min(2.0vw,0.8rem);*/
}

.legal-responsive {
  width: 100%;
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 16px; /* menos padding en móviles */
  box-sizing: border-box;
  overflow-x: auto;
}

.legal-responsive ul,
.legal-responsive li {
  font-size: 1rem;         /* Igual que p */
  line-height: 1.6;
  margin-bottom: 0.5em;
  padding-left: 0.5em;
  list-style-position: inside;
}

@media (max-width: 768px) {
  .legal-responsive {
    padding: 0 12px;
    margin: 20px auto;
  }

  /*.legal-responsive h1,
  .legal-responsive h2,
  .legal-responsive h3 {
    font-size: 1.2rem;
  }*/

  .legal-responsive p {
    font-size: 12px;
  }

  .legal-responsive ul,
  .legal-responsive li {
    font-size: 10px;         /* Igual que p */
    line-height: 1.6;
    margin-bottom: 0.5em;
    padding-left: 0.5em;
    list-style-position: inside;
  }

}




/* ============================================= */
/* PORTADA                                       */
/* ============================================= */

.portada {
  text-align: center;
  padding: 0 20px 20px 20px;
  filter: brightness(1.0);
}

.portada img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  /*
  cursor: pointer;
  */
}

.portada img:hover {
  transform: scale(1.008);
  filter: brightness(1.05);
}

/* ============================================= */
/* GALERÍA                                       */
/* ============================================= */

.galeria {
  padding-bottom: 50px;
}

.grid-imagenes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  width: 100%;
  margin: 0 auto;
  gap: 20px;
  padding: 0 20px;
}

.grid-imagenes a img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.grid-imagenes a img:hover {
  transform: scale(1.02);
  filter: brightness(1.2);
}

@media (min-width: 1024px) {
  .grid-imagenes {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-imagenes {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .grid-imagenes {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================= */
/* FORMULARIOS                      */
/* ============================================= */
.formulario {
  padding: 20px;
}

.formulario h1,
.formulario h2,
.formulario h3,
.formulario h4,
.formulario h5{
  text-align: center;
  white-space: normal;
  /*
  margin-bottom: 5px;
  font-size: min(6vw, 2.5rem);*/
  color: #004aad;
}



.formulario form {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
  background: #f5f8ff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  /*
  font-family: Arial, sans-serif;*/
}

.formulario form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #004aad;
  font-size: 0.9rem;
}

.formulario form input[type="text"],
.formulario form input[type="email"],
.formulario form input[type="tel"],
.formulario form input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 15px;
  height: 38px; /* Uniforma altura de inputs y selects */
  font-size: 14px;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1.5px solid #004aad;
  border-radius: 4px;
  /*font-size: 1em;*/
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.formulario form select {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 15px;
  height: 38px; /* Uniforma altura de inputs y selects */
  font-size: 14px;
  line-height: 1.5;
  border: 1.5px solid #004aad;
  border-radius: 4px;
  /*font-size: 1em;*/
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.formulario form textarea {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 15px;
  height: 150px; /* Uniforma altura de inputs y selects */
  font-size: 14px;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1.5px solid #004aad;
  border-radius: 4px;
  /*font-size: 1em;*/
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.formulario form input[type="text"]:focus,
.formulario form input[type="email"]:focus,
.formulario form input[type="tel"]:focus,
.formulario form input[type="password"]:focus,
.formulario form select:focus,
.formulario form textarea:focus {
  border-color: #0066cc;
  outline: none;
}

.formulario form input[disabled] {
  background-color: #e9ecef;
  color: #495057;
  cursor: not-allowed;
}

.formulario form button {
  background-color: #004aad;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.formulario form button:hover {
  background-color: #0066cc;
}

.formulario form label input[type="checkbox"] {
  margin-right: 6px;
  vertical-align: middle;
}

.formulario form p {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: #333;
  text-align:justify;
}

.formulario .check-terminos {
  font-size: 0.7rem;
}


/* ============================================= */
/* ESTILO PARA BÚSQUEDA DE CRUCEROS              */
/* ============================================= */

.busqueda {
  padding: 20px;
}

.busqueda h1,
.busqueda h2,
.busqueda h3 {
  text-align: center;
  color: #004aad;
  white-space: normal;
  margin-bottom: 20px;
}

.busqueda form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: #f5f8ff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.busqueda form label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
  color: #004aad;
  font-size: 0.9rem;
}

.busqueda form select,
.busqueda form button {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1.5px solid #004aad;
  border-radius: 4px;
  font-size: 1em;
}

.busqueda form button {
  background-color: #004aad;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.busqueda form button:hover {
  background-color: #0066cc;
}

.busqueda #resultados {
  margin-top: 30px;
  padding: 0 20px;
}

.busqueda #resultados table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.85rem;
  background-color: #fff;
}

.busqueda #resultados th,
.busqueda #resultados td {
  padding: 10px 15px;
  border: 1px solid #ccc;
  text-align: left;
}

.busqueda #resultados th {
  background-color: #f0f0f0;
}

/* Mostrar todo por defecto */
.busqueda .col-paises,
.busqueda .col-destinos {
  display: table-cell;
}

.enlace-viaje {
  text-align: center;
  vertical-align: middle;
}

.enlace-viaje a {
  display: inline-block;
  padding: 6px 12px;
  background-color: #004aad;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.enlace-viaje a:hover {
  background-color: #0066cc;
}

.enlace-viaje a:visited {
  background-color: hsl(300, 43%, 50%); /* también púrpura con 70% opacidad */
}

.enlace-viaje a:visited:hover {
  background-color: hsl(300, 43%, 58%); /* también púrpura con 70% opacidad */
}

.enlace-viaje i {
  font-size: 0.7rem;
}


/* Pantallas medianas: ocultar destinos */
@media (max-width: 768px) {
  .busqueda .col-destinos {
    display: none;
  }
}

/* Pantallas pequeñas: ocultar destinos y países */
@media (max-width: 480px) {
  .busqueda .col-destinos,
  .busqueda .col-paises {
    display: none;
  }
}

/* Oculta el contenido hasta que se cargue completamente */
body:not(.pageloaded) main {
  visibility: hidden;
}

#loader {
  position: fixed;
  inset: 0;
  background-color: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.loader-logo {
  width: 120px;
  animation: latido-brillante 0.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes latido-brillante {
  0% {
    transform: scale(1);
    filter: brightness(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.15); /* Aumento más notorio */
    filter: brightness(1.6);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
    opacity: 0.9;
  }
}

body.pageloaded #loader {
  opacity: 0;
  pointer-events: none;
}

.mensaje-exito {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #f0f8ff;
  border: 1px solid #004aad;
  border-radius: 8px;
  text-align: center;
  font-family: Arial, sans-serif;
}

.mensaje-exito h2 {
  color: #004aad;
}

.mensaje-exito a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #004aad;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.mensaje-error {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff5f5;
  border: 1px solid #cc0000;
  border-radius: 8px;
  text-align: center;
  font-family: Arial, sans-serif;
  color: #cc0000;
}

.mensaje-error h2 {
  color: #cc0000;
}

.mensaje-error ul {
  list-style-type: none;
  padding: 0;
  margin: 15px 0;
}

.mensaje-error li {
  margin: 5px 0;
}

.mensaje-error a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #cc0000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

#fallback-message {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff5f5;
  border: 1px solid #cc0000;
  border-radius: 8px;
  text-align: center;
  font-family: Arial, sans-serif;
  color: #cc0000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#fallback-message p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

#fallback-message a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #004aad;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

#fallback-message a:hover {
  background-color: #003480;
}

/* Oculta elementos de fallback como mensajes de error */
.oculto {
  display: none;
}

.hero-imagen {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-imagen img {
  width: 100%;
  height: auto;
  display: block;
}

.boton-suerte {
  position: absolute;
  top: 55%;       /* Posición vertical ajustada */
  left: 5%;      /* Posición horizontal alineada con el texto */
  right: 68%;
  transform: translate(0%, 0%);
  padding: 3% 5%;
  background-color: #8000ff;
  /*background-color: #ad0e0e;*/
  color: #fff;
  font-size: 2.1vw;
  text-decoration: none;
  border-radius: 2vw;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.boton-suerte:hover {
  background-color: #5f00c7;
  /*background-color: #ed1313;*/
}

/* Responsivo: solo ajusta tamaño, no posición */
@media (max-width: 768px) {
  .boton-suerte {
    font-size: 2.1vw;
    padding: 3% 5%;
  }
}

@media (max-width: 480px) {
  .boton-suerte {
    font-size: 2.1vw;
    padding: 3% 5%;
  }
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; transform: scale(1); }
  25% { opacity: 0.5; }
  50% { opacity: 1; transform: scale(1.05); }
  75% { opacity: 0.5; }
}

.boton-suerte.parpadea {
  animation: parpadeo 0.6s ease-in-out 2;
  box-shadow: 0 0 20px rgba(0, 74, 173, 0.8);
}

.campo-password {
    position: relative;
    display: flex;
    align-items: center;
}

.campo-password input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 17%;
    transform: translateY(0%);
    cursor: pointer;
    color: #aeaeae;
    font-size: 15px;
}

.toggle-password i {
    pointer-events: none;
}

.mensaje-info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-weight: bold;
}

.campo-telefono {
    display: flex;
    gap: 10px; /* puedes ajustar este valor según estética */
    align-items: center;
    flex-wrap: wrap;
}

.campo-telefono select,
.campo-telefono input {
    flex: 1 1 auto;
    min-width: 0;
}

/* Vista móvil: campos en columna */
@media (max-width: 768px) {
    .campo-telefono {
        flex-direction: column;
        align-items: stretch;
    }

    .campo-telefono select,
    .campo-telefono input {
        width: 100%;
    }
}

/* Vista escritorio: ancho del formulario y límites a hijos */
@media (min-width: 769px) {

    .campo-telefono div {
        max-width: 40%;
    }

    .campo-telefono select {
        max-width: 100%;
    }

    .campo-telefono input {
        max-width: 57.7%;
    }

}

/* Color gris para los campos readonly - en el caso de usuario logueado */
input[readonly], input[readonly]:focus {
    background-color: #e9ecef; /* gris claro */
    color: #495057; /* texto más tenue */
    border: 1px solid #ced4da;
    cursor: not-allowed;
}

.select-deshabilitado {
  cursor: not-allowed;
  display: inline-block; /* o según tu layout */
}

select.solo-lectura {
  appearance: none;
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #004aad;
  pointer-events: none;
  user-select: none;
}