*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-color: #d8d8d8;
}

html {
  scroll-behavior: smooth;
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 0;
}
p {
  font-size: 18px;
}
p.texto {
  color: black;
}
.link {
  text-decoration: none;
  color: #115f87;

  margin-right: 50px;
}
header {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: white;
  font-weight: bold;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: auto;
}
.logoEscritorio {
  display: block;
  width: 189px;
  margin-left: 20px;
}
.logoMovil {
  display: none;
  width: 100px;
}

nav .link:hover {
  color: #26b5d8;
}
.menu-toggle {
  display: none;
  background-color: #115f87;
  color: white;
  padding: 10px 15px;
  font-size: 18px;
  border: none;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}
.dropdown-menu.show {
  display: block;
}

.dropdown {
  position: relative;
}
.dropdown-toggle::after {
  font-size: 0.7em;
}
.dropdown-toggle {
  text-decoration: none;
  color: #115f87;
  margin-right: 50px;
  cursor: pointer;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0; /* Alineado a la derecha */
  top: 100%;
  background-color: white;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  z-index: 100;
}
.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  color: #115f87;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

/* Mostrar dropdown al pasar el mouse */
.dropdown:hover .dropdown-menu {
  display: block;
}

.filaAC {
  background-color: #26b5d8;
  color: white;
  height: 500px;
  justify-content: center;
  margin-top: 100px;
}

.f2 {
  padding: 20px 60px;
  margin-bottom: 56px;
  justify-content: center;
  align-items: center;
}
.colFila1 {
  padding: 100px;
  height: 100%;
  margin-top: 25px;
}
.colFila2 {
  padding: 200px 0px;
  height: 100%;
}
.filaAF {
  background-color: #115f87;
  color: white;
  height: 500px;
}
.filaB {
  background-color: white;
  color: #115f87;
  height: 500px;
  justify-content: center;
  text-align: center;
  margin-bottom: 15%;
}
.filaB1 {
  background-color: white;
  color: #115f87;
  height: 500px;
}

/* .colFila3 {
    padding: 50px 25px 0px 25px;
    height: 500px;
    box-shadow: inset -2px 2px hsl(0 0 100% / 1),
      -20px 20px 40px hsl(0 0 0 / 0.25);
  } */
.tituloFila3 {
  color: #115f87;
}

.imgFila1 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0;
  margin: 0;
  filter: drop-shadow(0 0 5rem #115f87);
  transition: 0.5s;
  border-radius: 20px;
}
.imgFila1:hover,
.imgFila2:hover {
  filter: drop-shadow(0 0 5rem white);
  transition: 0.5s;
}
.imgFila2 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0;
  margin: 0;
  filter: drop-shadow(0 0 5rem #26b5d8);
  transition: 0.5s;
  border-radius: 20px;
}

.colFila4 {
  padding: 20px 60px;
  height: 100%;
}
.colFila5 {
  height: 100%;
}
.imgFila4 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0;
  margin: 0;
  filter: drop-shadow(0 0 5rem #26b5d8);
  border-radius: 20px;
  transition: 0.5s;
}
.imgFila4:hover {
  filter: drop-shadow(0 0 5rem #115f87);
  transition: 0.5s;
}

.row-equal-height {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
/* .recuadroFila5 {
  padding: 30px;
  filter: drop-shadow(0 0 0.75rem #115f87);
} */
iframe {
  width: 75%;
  height: 75%;
  border-radius: 70px;
  box-shadow: 0 0 0 4px #fff, 0 0 20px rgba(0, 0, 0, 0.2);
  margin-top: 55px;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  animation: float 6s ease-in-out infinite;
  background: linear-gradient(200deg, #115f87, #26b5d8);
  padding: 4px;
  border: none;
  outline: none;
}
iframe:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 4px #00ffe1, 0 0 40px rgba(0, 255, 225, 0.4);
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}
iframe::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background: linear-gradient(270deg, #00ffe1, #007cf0, #ff4ecd);

  background-size: 10% 10%;
  animation: gradient-border 10s ease infinite;
  z-index: -1;
}
@keyframes gradient-border {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.col3 label {
  font-size: 20px;
  color: #115f87;
}
.col3 i {
  font-size: 30px;
  margin: 10px;
  color: #115f87;
  transition: 0.2s;
  cursor: pointer;
}
.col3 a {
  text-decoration: none;
  color: white;
  font-size: 18px;
}
.col3 i:hover {
  /* font-size: 30px; */
  color: white;
  transition: 0.2s;
}

footer {
  width: 100%;
  bottom: 0;
  position: fixed;
  z-index: 3;
  background-color: #f8f9fa;
}
footer .navbar {
  min-height: auto;
  padding: 0 10px;
}

footer .navbar-brand {
  font-size: 16px;
  margin: 0 auto;
}

/*  */
.lista {
  list-style: disclosure-closed;
}
.container2 {
  width: 100px;
  position: relative;
  display: flex;
  justify-content: center;
}

.container2 .card {
  position: relative;
  cursor: pointer;
  margin-left: 100px;
  margin-right: 100px;
  border-color: white;
}

.container2 .card .face {
  width: 300px;
  height: 300px;
  transition: 0.6s;
}

.container2 .card .face.face1 {
  position: relative;
  background: #26b5d8;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  transform: translateY(200px);
}

.container2 .card:hover .face.face1 {
  background: #115f87;
  transform: translateY(0);
}

/* .container2 .card .face.face1 .content {
  opacity: 0.2;
  transition: 0.5s;
} */
/* 
.container2 .card:hover .face.face1 .content {
  opacity: 1;
} */

.container2 .card .face.face1 .content h1 {
  margin: 10px 0 0;
  padding: 0;
  color: black;
  font-weight: bold;
  text-align: center;
  font-size: 1.5em;
}

.container2 .card .face.face2 {
  position: relative;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  height: 230px;
  box-shadow: 0 10px 50px #115f87;
  transform: translateY(-100px);
}

.container2 .card:hover .face.face2 {
  transform: translateY(0);
}

.container2 .card .face.face2 .content p {
  margin: 0;
  padding: 0;
  color: black;
}

.container2 .card .face.face2 .content a:hover {
  background: #26b5d8;
  color: black;
}
.container2 {
  background-color: white;
  width: 100%;
}
.container2 .card .face.face2 .content ul {
  color: black;
}

#contcarrusel {
  /* display: flex; */
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#carousel,
#navigation {
  display: block;
}

#carousel {
  overflow: hidden;
  width: 600px;
  height: 400px;
  border-radius: 4px;
  background-color: #fff;
}

.p-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}

#button_a:checked ~ #carousel .p-wrapper {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

#button_b:checked ~ #carousel .p-wrapper {
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
}

#button_c:checked ~ #carousel .p-wrapper {
  -webkit-transform: translateY(-200%);
  transform: translateY(-200%);
}

[class^="panel_"] {
  overflow: auto;
  position: relative;
  width: inherit;
  height: inherit;
  padding: 48px;
}

#navigation {
  display: flex;
  margin-left: 24px;
}

[class^="label_"] {
  display: block;
  cursor: pointer;
  margin: 8px 0;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 4px;
  color: #aaa;
  background-color: #fff;
  transition: all 0.3s ease;
}

[class^="label_"]:hover {
  color: #444;
  background-color: #ffeed9;
}

#button_a:checked ~ #navigation .label_a,
#button_b:checked ~ #navigation .label_b,
#button_c:checked ~ #navigation .label_c {
  cursor: default;
  color: #fff;
  background-color: #222;
}

.home-title span,
.home-title1 span {
  position: relative;
  overflow: hidden;
  display: block;
  line-height: 1.2;
}

.home-title span::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #115f87;
  animation: a-ltr-after 10s cubic-bezier(0.5, 0, 0.2, 1) infinite;
  transform: translateX(-101%);
}

.home-title span::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: white;
  animation: a-ltr-before 10s cubic-bezier(0.42, 0, 0.58, 1) infinite;

  transform: translateX(0);
}
.home-title1 span::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #115f87;
  animation: a-ltr-after 10s cubic-bezier(0.5, 0, 0.2, 1) infinite;
  transform: translateX(-101%);
}

.home-title1 span::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #26b5d8;
  animation: a-ltr-before 10s cubic-bezier(0.42, 0, 0.58, 1) infinite;

  transform: translateX(0);
}
.home-title span:nth-of-type(1)::before,
.home-title span:nth-of-type(1)::after {
  animation-delay: 1s;
}

.home-title span:nth-of-type(2)::before,
.home-title span:nth-of-type(2)::after {
  animation-delay: 1.5s;
}

@keyframes a-ltr-after {
  0% {
    transform: translateX(-100%);
  }
  25% {
    transform: translateX(-50%);
  }
  50% {
    transform: translateX(101%);
  }
  100% {
    transform: translateX(101%);
  }
}

@keyframes a-ltr-before {
  0% {
    transform: translateX(100%); /* empieza fuera, a la derecha */
  }
  40% {
    transform: translateX(0); /* se mueve lentamente hacia la posición */
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(200%);
  }
}

.botonEnviar {
  background-color: #115f87;
  color: white;
}
.botonEnviar:hover {
  background-color: white;
  color: #115f87;
}

/*OPTIMIZADO PARA MOVILES*/
@media (max-width: 900px) {
  p {
    font-size: 16px;
  }
  .link {
    margin-right: 20px; /* Menor separación en móviles */
    font-size: 16px; /* Asegura legibilidad */
    padding: 8px 0; /* Mejora área táctil */
    display: inline-block; /* Asegura que padding funcione correctamente */
  }
  header {
    flex-direction: column; /* Elementos uno debajo del otro si es necesario */
    align-items: flex-start; /* Alineación a la izquierda */
    padding: 10px 15px;
    height: auto;
  }
  .logo {
    width: 100%;
    display: flex;
    justify-content: space-between; /* LOGO IZQUIERDA | BOTÓN DERECHA */
    align-items: center;
  }

  .logoEscritorio {
    display: none;
  }
  .logoMovil {
    display: block;
  }

  nav .link:hover {
    color: #26b5d8;
    flex-direction: column;
  }
  .navbarM {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px; /* ajusta según tu header */
    right: 0;
    width: 60vw;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: max-height 0.3s ease;

    top: 60px;
    max-height: 70vh; /* o usa 50vh para que ocupe la mitad */
    overflow-y: auto; /* para permitir scroll si hay muchas opciones */
    border-radius: 0 0 12px 12px; /* opcional, para suavizar bordes */
    padding: 10px 0;
    transition: max-height 0.3s ease;
  }
  .navbarM.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }
  .navbarM .dropdown-toggle {
    text-align: center;
    display: block;
    width: 100%;
  }
  .dropdown {
    position: relative;
    width: 100%;
  }
  .dropdown-menu {
    position: static; /* Se posiciona naturalmente debajo */
    width: 100%; /* Ocupa todo el ancho del contenedor */
    box-shadow: none; /* Quita sombra flotante */
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }

  .dropdown:hover .dropdown-menu {
    display: none; /* Anula el hover en móviles */
  }

  .dropdown.open .dropdown-menu {
    display: flex;
    flex-direction: column;
  }
  .dropdown-menu > * {
    padding: 10px;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
  }
  .dropdown-menu li {
    width: 100%;
    padding: 10px 16px;
  }
  .filaAC {
    height: auto;
    margin-top: 50px;
    margin-bottom: 30px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .colFila1,
  .colFila2 {
    padding: 40px 20px;
    height: auto;
    width: 100%;
  }

  .filaAF {
    height: auto;
    padding: 40px 20px;
    text-align: center;
  }
  .filaB {
    padding: 40px 20px;
    height: auto; /* deja que el contenido determine la altura */
  }

  .filaB1 {
    height: auto;
    margin-top: 40px;
    padding: 40px 20px;
    text-align: center;
  }
  .imgFila1,
  .imgFila2 {
    height: auto; /* Para que se ajuste al contenido */
    max-height: 300px; /* Evita que ocupen toda la pantalla */
    filter: drop-shadow(0 0 1.5rem #999); /* Sombra más suave en móviles */
    border-radius: 12px; /* Bordes más suaves en pantallas pequeñas */
  }

  .imgFila1:hover {
    filter: drop-shadow(0 0 1.5rem white);
  }

  .imgFila2:hover {
    filter: drop-shadow(0 0 1.5rem white);
  }
  .colFila4,
  .colFila5 {
    padding: 20px 20px; /* Reduce el espacio lateral */
    height: auto; /* Permite que se ajuste al contenido */
    width: 100%; /* Asegura ocupación completa del contenedor */
    box-sizing: border-box; /* Incluye padding en el ancho */
  }
  .imgFila4 {
    height: auto; /* Se adapta al contenido */
    max-height: 300px; /* Previene que sea demasiado alta */
    filter: drop-shadow(0 0 1.5rem #999); /* Sombra más sutil en móviles */
    border-radius: 12px; /* Bordes más suaves */
  }

  .imgFila4:hover {
    filter: drop-shadow(0 0 1.5rem #115f87);
  }
  .row-equal-height {
    flex-direction: column;
    align-items: stretch;
  }

  .recuadroFila5 {
    flex: 1 1 100%; /* Ocupa todo el ancho disponible */
    margin: 10px 0;
    padding: 16px;
    height: auto; /* Permite altura flexible */
    filter: drop-shadow(0 0 0.5rem #888); /* Sombra más sutil en móviles */
  }
  iframe {
    height: 250px; /* Más compacto */
    border-radius: 20px;
    box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(0, 0, 0, 0.15);
    margin: 10px 0;
    animation: none; /* Opcional: eliminar animación para mejorar rendimiento */
  }

  iframe:hover {
    transform: none; /* Quitar efecto hover en móviles (sin hover) */
    box-shadow: 0 0 0 2px #00ffe1, 0 0 20px rgba(0, 255, 225, 0.3);
  }
  iframe {
    animation: none; /* Desactivar animación float para móviles */
    position: relative; /* Para que ::before se posicione bien */
  }
  iframe::before {
    animation: none; /* Desactivar animación de borde */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 20% 20%; /* Reducir tamaño patrón */
    border-radius: 20px; /* Ajustar bordes para que encajen con iframe */
  }
  .col3 i {
    font-size: 16px; /* Un poco más pequeño para pantallas pequeñas */
    margin: 6px; /* Menos espacio alrededor */
  }
  .col3 i:hover {
    font-size: 20px; /* También más suave el efecto hover */
  }
  footer {
    position: fixed; /* Optional: remove fixed position if it overlaps content */
  }
  footer .navbar {
    justify-content: center; /* centra horizontalmente el contenido */
  }

  footer .navbar-brand {
    font-size: 11px;
    text-align: center;
    width: 100%;
  }
  .container2 {
    flex-direction: column;
    align-items: center;
  }

  .container2 .card {
    margin: 15px 0;
  }

  .container2 .card .face {
    width: 90vw;
    height: auto;
  }

  .container2 .card .face.face1,
  .container2 .card .face.face2 {
    transform: none !important;
    position: relative;
  }

  .container2 .card .face.face1 .content {
    opacity: 1 !important; /* Siempre visible en móvil */
  }
  #contcarrusel {
    min-height: auto;
  }

  #carousel {
    width: 100%;
    height: 300px;
  }
  .home-title span,
  .home-title1 span {
    font-size: 1.1rem; /* un poco más pequeño para pantallas chicas */
    padding: 0 3px;
  }

  /* Reducir duración para que sea más rápido y ligero */
  .home-title span::after,
  .home-title1 span::after,
  .home-title span::before,
  .home-title1 span::before {
    animation-duration: 6s;
  }
  .container2 {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    display: block; /* cambia flex a block para stacking vertical */
  }

  .container2 .card {
    margin: 15px auto; /* centrado con margen vertical */
    width: 90vw; /* casi ancho completo de pantalla */
    max-width: 300px; /* para que no se pase en pantallas más anchas */
  }

  .container2 .card .face {
    width: 100%;
    height: auto; /* altura automática para que se adapte */
    max-height: none; /* elimina la restricción fija de altura */
  }

  .container2 .card .face.face1 {
    transform: translateY(200px); /* mantiene animación */
  }

  .container2 .card:hover .face.face1 {
    transform: translateY(0); /* mantiene animación */
  }

  .container2 .card .face.face1 .content h1 {
    font-size: 1.2em; /* texto un poco más pequeño para móviles */
  }

  .container2 .card .face.face2 {
    height: auto;
    max-height: none;
    padding: 15px;
    transform: translateY(-100px); /* mantiene animación */
  }

  .container2 .card:hover .face.face2 {
    transform: translateY(0); /* mantiene animación */
  }

  .container2 .card .face.face2 .content p,
  .container2 .card .face.face2 .content ul {
    font-size: 0.9em;
  }
  .dropdown-menu a {
    font-size: 15px;
  }
}
