@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@350&display=swap');

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Roboto;
  z-index: 1;
}


body::before {
  content: '';
  /* Obligatorio para generar el pseudo-elemento */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../assets/img/FondoCompleto.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: blur(5px);
  /* Ajusta este valor para controlar la intensidad */
  z-index: -1;
  /* Coloca el pseudo-elemento detrás de todo el contenido del body */

}

/* El video rellena toda la pantalla */
#map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* rellena sin deformar */
}

#replay {
  position: absolute;
  top: 5%;
  right: 5%;
  width: 40px;
  height: auto;
  cursor: pointer;
  z-index: 10;
}

#map-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  /* Oculta cualquier desbordamiento */
  display: flex;
  justify-content: center;
  align-items: center;
  /* El color de las bandas negras */
}

#map-content {
  /* El contenedor del video se ajusta al tamaño de la ventana */
  width: 100%;
  height: 100%;
  position: relative;
}

#map-image {
  /* Esto es lo más importante: object-fit: contain */
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Mantiene la relación de aspecto, creando bandas negras si es necesario */
}


@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  5% {
    transform: scale(1.1);
  }

  10% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.1);
  }

  20% {
    transform: scale(1);
  }

  40% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.1);
  }

  50% {
    transform: scale(1);
  }

  55% {
    transform: scale(1.1);
  }

  62.5% {
    transform: scale(1);
  }

  100% {
    transform: scale(1);
  }

}


.marker {
  position: absolute;
  width: 25%;
  height: 5%;
  transform: translate(-50%, -50%);
  display: block;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  animation: heartbeat 3s ease-in-out infinite;
  z-index: 5;
}

.marker a {
  text-decoration: none;
}

.escalon1 {
  color: #000000;
  font-size: 26px;
  font-family: 'Segoe UI', Roboto;
  font-weight: bold;
  text-align: center;
  border-width: 1px;
  border-style: solid;
  border-color: #000000;
  box-shadow: 2px 2px 5px #00000091;
  border-radius: 8px;
  background-color: rgb(204 138 0 / 91%);
  margin: 0;
  padding-top: 20px;
  padding-bottom: 20px;
  white-space: nowrap;
}

/**/
/* <nav>*/
.breadcrumb {
  position: absolute;
  top: 3%;
  left: 0%;
  z-index: 9999;
  color: black;
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: rgb(204 138 0 / 91%);
}

.breadcrumb::after {
  content: "";
  position: absolute;
  top: 50%;
  /* centrado vertical */
  right: -40px;
  /* fuera del borde derecho */
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 40px solid transparent;
  border-bottom: 40px solid transparent;
  border-left: 40px solid rgb(204 138 0 / 91%);
  /* mismo color que el breadcrumb */
}

.breadcrumb a {
  color: black;
  text-decoration: none;
  padding: 22.5px 12px;
  font-size: 26px;
  font-family: 'Segoe UI', Roboto;
  font-weight: bold;
}


.breadcrumb-last {
  position: relative;
  display: inline-block;
  color: black;
  cursor: pointer;
  margin-left: 5px;
}


/* Flecha de dropdown al lado del texto */
.breadcrumb-dropdown-arrow {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

/* Rotación de la flecha al abrir */
.breadcrumb-last.open .breadcrumb-dropdown-arrow {
  transform: rotate(180deg);
}

.breadcrumb-text {
  vertical-align: middle;
  font-size: 26px;
  font-family: 'Segoe UI', Roboto;
  font-weight: bold;
}

.breadcrumb-dropdown-arrow {
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

/* Flecha girada cuando está abierto */
.breadcrumb-last.open .breadcrumb-dropdown-arrow {
  transform: rotate(180deg);
}

.breadcrumb-dropdown {
  position: absolute;
  top: 160%;
  left: 0;
  background: rgb(204 138 0 / 91%);
  border: 1px solid #000000;
  padding: 5px 10px;
  width: auto;
  border-radius: 8px;
  z-index: 1000;
  /* Animación */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.breadcrumb-last.open .breadcrumb-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.breadcrumb-dropdown a {
  display: block;
  padding: 5px 0;
  color: black;
  text-decoration: none;
  white-space: nowrap;
  font-size: 26px;
  font-family: 'Segoe UI', Roboto;
  font-weight: bold;
}

.breadcrumb-dropdown a:hover {
  background: #eea647;
}



/**/
/* Estilos para el nuevo modal sin zoom */
#logoModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#logoModal .imagen-contenedor {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#logoModal .imagen-sin-zoom {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  transform-origin: center center;
}

#logoModal .cerrar-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1001;
}

#logoModal .cerrar-modal:hover,
#logoModal .cerrar-modal:focus {
  color: #bbb;
  text-decoration: none;
}

/**/
/**/

.footer-bottom {
  position: absolute;
  bottom: 0;
  right: 0;
  /* width: 100%; */
  min-height: 70px;
  padding: 10px 20px;
  flex-direction: row;
  justify-content: space-between;
  z-index: 3;
  color: white;
  box-sizing: border-box;
  display: flex;
}

.logos-left {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-start;
}

.logos-right {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end;
  flex-direction: row;
}

.top-icons {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end;
  gap: 10px;
}

.bandera {
  width: 30px;
  height: auto;
}

.logos-left img {
  height: 25px;
  padding-left: 0.2%;
  margin-right: 5px;
}

.marq-logo {
  height: 50px;
  object-fit: contain;
}

/**/


/* Estilos para el overlay superior/inferior */
.top {
  position: fixed;
  /* Lo fijamos en la parte superior */
  width: 100%;
  height: 3%;
  /* Altura de la barra superior para móvil */
  background-color: rgba(255, 255, 255, 0.5);
  /* Color de fondo de la barra superior */
  display: flex;
  /* Usamos flexbox */
  align-items: center;
  /* Centrar verticalmente los elementos */
  justify-content: space-between;
  /* Reparte el espacio */
  z-index: 10;
  /* Asegura que esté por encima del resto del contenido */
}

.top>a {
  margin-left: 85%;
  white-space: nowrap;
}

.language-selector {
  position: relative;
  /* Para posicionar el desplegable respecto a este contenedor */
  display: inline-block;
  /* Ocupa solo el espacio necesario */
  margin-left: auto;
  /* ESTO ES CLAVE: Empuja el selector de idioma a la derecha */
  z-index: 11;
  /* Asegura que esté por encima de otros elementos */
  height: 100%;
  padding-right: 2%;
  padding-left: 1%;
  width: 1.9%;
}

.current-lang-button {
  background-color: rgba(255, 255, 255, 0);
  /* Fondo del botón actual */
  color: black;
  border-radius: 8px;
  border: none;
  /* Bordes redondeados */
  cursor: pointer;
  font-size: 1em;
  height: 100%;
  /* Ancho mínimo para que se vea bien "ES" o "EN" */
  text-align: center;
  width: 110%;

  display: flex;
  /* Usamos flexbox para alinear el texto y la flecha */
  align-items: center;
  /* Centramos verticalmente */
}

/* Estilo para el texto dentro del botón */
.lang-text {
  margin-right: 8px;
  /* Espacio entre el texto y la flecha */
}

/* Estilo para el icono de la flecha */
.dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid black;
  /* La flecha apunta hacia abajo por defecto */
  transition: transform 0.3s ease;
}

/* Estilo para la flecha cuando el menú está abierto */
.dropdown-arrow.open {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  /* Oculto por defecto */
  position: absolute;
  background-color: rgba(255, 255, 255, 0.5);
  /* Fondo del menú desplegable */
  z-index: 1;
  border-radius: 8px;
  right: 33%;
  /* Alinea el desplegable a la derecha del botón */
  top: 100%;
  /* Coloca el desplegable justo debajo del botón */
  margin-top: 5px;
  /* Pequeño espacio entre botón y desplegable */
  overflow: hidden;
  /* Asegura que los bordes redondeados se vean bien */

}

.lang-dropdown a {
  color: black;
  padding: 10px 12px;
  text-decoration: none;
  display: block;
  text-align: center;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
}

.lang-dropdown a:hover {
  background-color: #575757;
  color: white;
  /* Color al pasar el ratón */
}

.lang-dropdown.show {
  display: block;
  /* Clase para mostrar el desplegable con JavaScript */
}

/* Overlay inicial: oculto por defecto */

#mobileOverlay {
  display: none;
  position: fixed;
  flex-direction: column;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(205, 205, 205);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#mobileOverlay .overlay-image {
  width: 22vmin;
  border-radius: 10px;
}

#mobileOverlay p {
  color: #2D2926;
  ;
  font-family: 'Segoe UI', Roboto;
  font-weight: 350;
}


@keyframes campana {

  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-3px);
  }

}

/*Media Queris*/
@media (max-width: 768px) {


  .lang-dropdown {
    right: 10%;
  }


  .logos-left img {
    height: 20px;
    margin-right: 5px;
  }

  .marq-logo {
    height: 25px;
    object-fit: contain;
  }

  .language-selector {
    padding-right: 12%;
  }

  #logoModal .cerrar-modal {
    top: -15px;
  }

  #logoModal .imagen-contenedor {
    max-width: 80%;
    max-height: 80%;
  }

  .img-container {
    right: 20%;
    display: none;
  }


  /*cortina volta*/
  #mobileOverlay {
    display: flex;
  }

  /*video*/

  #map-content {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .top {
    padding: 5px 0px;
    justify-content: center;
  }

  .language-selector {
    padding-right: 5%;
  }
}

@media(max-height: 500px) {
  #mobileOverlay {
    display: none;
  }

  #replay {

    top: 10%;
    right: 7%;
    width: 30px;
    height: auto;


  }

  #map-content {

    height: 110%;
  }

  .marker {
    width: auto;
    height: 5%;
    animation: campana 2s ease-in-out infinite;
  }

  .escalon1 {
    font-size: 9px;
  }


  .marq-logo {
    height: 25px;
    object-fit: contain;
  }

  #logoModal .cerrar-modal {
    top: -15px;
  }

  #logoModal .imagen-contenedor {
    max-width: 80%;
    max-height: 80%;
  }

}


@media (max-width: 932px) and (orientation: landscape) {
  .top {
    padding: 5px 0px;
    justify-content: center;
  }

  .language-selector {
    padding-right: 5%;
  }
}

@media (max-width: 768px) {

  .top>a {
    margin-right: 5%;
    /* Ajusta el valor para mayor o menor espacio */
    margin-left: 70%;
    white-space: nowrap;
  }
}

@media (max-height: 375px) {
  #map-container {
    height: auto;
  }
}


/* Estilos para dispositivos en modo apaisado */
@media screen and (orientation: landscape) and (max-height: 500px) {
  #map-container {
    /* Fija el contenedor a la ventana del navegador */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Esto creará las bandas negras si el video no llena la pantalla */
  }

  #map-content {
    /* Asegura que el contenido dentro del contenedor principal también se adapte */
    width: 100%;
    height: 100%;
    position: relative;
  }

  #map-image {
    /* El video se adapta a su contenedor, manteniendo su relación de aspecto */
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Opcional: Asegúrate de que el body no tenga márgenes */
  body,
  html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Evita cualquier desplazamiento de la página */
  }
}

/* Nuevo código para mayor compatibilidad en móviles */
@supports (height: 100svh) {
  #map-container {
    height: 100svh;
  }
}