@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*Inicio Header*/
.hero {
  width: 100%;
  height: 100vh;
  position: relative;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  padding: 20px 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
}

nav .logo {
  width: 200px;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  font-family: 'Cinzel Decorative', serif;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0 1.5rem;
  position: relative;
}

nav a {
  text-decoration: none;
  color: #221712;
  padding: 1rem 0;
  transition: color 0.3s ease;
}

nav a::before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: rgb(111, 99, 91);
  transition: width 0.3s ease;
}

nav a:hover {
  color: rgb(111, 99, 91); 
}

nav a:hover::before {
  width: 100%;
}

.contenedor {
  text-align: center;
  display: block;
}

.contenedor h1 {
  font-size: 80px;
  color: #fff;
  font-weight: 600;
  transition: 0.5s; /* Transición de color */
  white-space: nowrap; /* Mantener el texto en una sola línea */
  overflow: hidden; /* Evitar desbordamiento */
  border-right: 2px solid #fff; /* Cursor de escritura */
  border-right: none;
  -webkit-text-stroke: 2px #fff;
}

.contenedor h1:hover {
  -webkit-text-stroke: 2px #fff;
  color: transparent;
}

.contenedor a {
  text-decoration: none;
  display: inline-block;
  color: #fff;
  font-size: 18px;
  border: 2px solid #fff;
  padding: 14px 50px;
  border-radius: 50px;
  margin-top: 10px;
}

.back-video {
  position: absolute;
  right: 0;
  bottom: 10;
  z-index: -1;
  overflow: hidden;
}
/*Fin header*/

/*Proyectos*/
.business-line-section {
  background-color: #f0f0f0;
  padding: 40px 0;
  display: block;
}

.business-line-section h2{
  font-size: 38px;
  margin-bottom: 30px;
  color: #333;
  text-align: center;
}
.container {
  display: flex;
  justify-content: center; /* Centrar horizontalmente */
  align-items: center; /* Centrar verticalmente */
  flex-wrap: wrap; /* Permitir que los elementos se ajusten */
  width: 90vw; /* Ancho del contenedor */
  margin: 0 auto; /* Centrar el contenedor en la página */
}
/*Fin de Proyectos*/
/* Galería de Imágenes */
.conter {
  position: relative;
  text-align: center;
  display: block;
}

.imagen-con-texto {
  position: relative;
  overflow: hidden;
  display: flex;
  width: 0; /* Comienza con ancho 0 */
  flex-grow: 2;
  transition: width 1.5s ease; /* Transición del ancho */
}

.imagen-con-texto:hover {
  cursor: crosshair;
  width: 600px; /* Ampliar imagen al pasar el cursor */
}

.imagen-con-texto:hover img {
  transform: scale(1.05);
  width: 600px; /* Se mantendrá el aumento de ancho */
  opacity: 1;
  filter: contrast(120%); /* Agranda ligeramente la imagen */
}

.texto-sobre-imagen {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px;
  text-align: center;
  opacity: 0; /* Comienza oculto */
  transition: opacity 0.3s ease; /* Transición para mostrar el texto */
}

.imagen-con-texto:hover .texto-sobre-imagen {
  opacity: 1; /* Mostrar texto al pasar el cursor */
}

.galeria-img {
  display: flex;
  width: 100vw;
  height: 600px;
  overflow: hidden;
  position: relative; /* Cambiar a relative */
}

.cont {
  position: absolute;
  top: 50%; /* Centrado vertical */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  color: #fff;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.cont a {
  text-decoration: none;
  display: inline-block;
  color: #fff;
  font-size: 18px;
  border: 2px solid #fff;
  padding: 14px 50px;
  border-radius: 50px;
  margin-top: 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cont a:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: #000;
}

.galeria-img img {
  width: 100px; /* Mantén tu configuración original */
  height: 100%;
  flex-grow: 2;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.5s ease, width 1.5s ease, opacity 0.5s ease;
}

.galeria-img img:hover {
  transform: scale(1.05);
  width: 600px; /* Se mantendrá el aumento de ancho */
  opacity: 1;
  filter: contrast(120%);
}

.galeria-img:hover ~ .cont {
  opacity: 0; /* Esconde el texto al pasar el cursor sobre las imágenes */
}

/* Fin de Galería de Imágenes */

/*INICIO FOOTER*/
.footer {
  background-color: #333;
  color: #fff;
  padding: 60px 0;
  font-size: 16px;
  }
  .footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  }
  .footer-section {
  flex-basis: 30%;
  }
  .footer-section h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  }
  .footer-section ul {
  list-style-type: none;
  padding: 0;
  }
  .footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: #aaa;
  }

.footer-map {
  margin-top: 40px;
  text-align: center;
}
/*Fin Footer*/

/* 3 barras */
#checkbox {
  display: none;
}

.toggle {
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition-duration: .3s;
}

.bars {
  width: 100%;
  height: 4px;
  background-color: rgb(0, 0, 0);
  border-radius: 5px;
  transition-duration: .3s;
}

#checkbox:checked + .toggle .bars {
  margin-left: 13px;
}

#checkbox:checked + .toggle #bar2 {
  transform: rotate(135deg);
  margin-left: 0;
  transform-origin: center;
  transition-duration: .3s;
}

#checkbox:checked + .toggle #bar1 {
  transform: rotate(45deg);
  transition-duration: .3s;
  transform-origin: left center;
}

#checkbox:checked + .toggle #bar3 {
  transform: rotate(-45deg);
  transition-duration: .3s;
  transform-origin: left center;
}
/* Fin de 3 barras */


.toggle {
  display: none;
}

@media (max-width: 768px) {
  html, body {
    width: 100%;
    margin: 0;
    overflow-x: hidden; /* Evita el desbordamiento horizontal */
  }
  
  nav ul {
    display: none; /* Ocultar el menú por defecto en móviles */
    flex-direction: column;
    position: absolute;
    top: 60px; /* Ajusta según sea necesario */
    left: 0;
    background-color: transparent; /* Fondo del menú */
    width: 100%;
    padding: 10px 0;
  }

  nav ul.active {
    display: flex; /* Mostrar el menú al activar */
  }

  .toggle {
    display: flex; /* Mostrar el toggle en móviles */
  }

  nav li {
    margin: 50px 0; /* Espaciado para elementos de menú en móvil */
    text-align: center; /* Centrar texto */
  }

  .hero {
    padding: 0 2%; /* Reduce el padding para móviles */
  }

  .back-video {
    position: absolute;
    top: 50%; /* Centrar verticalmente */
    left: 50%; /* Centrar horizontalmente */
    width: 100%; /* Ancho completo */
    height: 100%; /* Altura completa */
    object-fit: cover; /* Asegura que el video cubra el contenedor sin distorsión */
    transform: translate(-50%, -50%); /* Centrar el video */
    z-index: -1; /* Asegurar que esté detrás de otros elementos */
}

  nav {
    padding: 25px 5%; /* Ajustar padding en móviles */
    font-size: 0.9rem; /* Tamaño de fuente más pequeño en móviles */
  }

  nav .logo {
    width: 150px; /* Tamaño del logo más pequeño */
  }

  nav ul {
    flex-direction: column; /* Cambiar a columna en móviles */
    display: none; /* Ocultar el menú por defecto */
    position: absolute;
    top: 90px; /* Ajustar según sea necesario */
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.3); /* Fondo del menú */
    padding: 30px 0;
  }

  nav ul.active {
    display: flex; /* Mostrar el menú al activar */
  }

  nav li {
    margin: 10px 0; /* Ajustar margen para elementos en móvil */
    text-align: center; /* Centrar texto */
  }

  .business-line-section {
    display: block;
  }
  
  .contenedor {
    padding: 0 5%; /* Añadir padding para evitar que el texto toque los bordes */
  }

  .contenedor h1 {
    font-size: 7vw; /* Adaptar tamaño del texto */
    color: #fff;
  }

  .contenedor a {
    font-size: 3vw; /* Tamaño de fuente responsive */
    padding: 10px 4vw; /* Ajustar padding del botón */
  }

  .container {
    width: 100vw;
    max-width: 100%;
    transition: opacity 0.3s ease-in 0.4s;
  }

  .panel:nth-of-type(4),
  .panel:nth-of-type(5){
    display: none;
  }

  .title {
    color: black; /* Cambia el color del texto a negro */
}

  /*Footer */
  .footer-content {
    flex-direction: column; /* Cambiar a columna en pantallas pequeñas */
    align-items: center; /* Centrar elementos */
  }

.footer-section {
    flex-basis: 100%; /* Cada sección ocupa el 100% del ancho */
    text-align: center; /* Centrar texto en secciones */
    margin-bottom: 40px; /* Aumentar el espacio entre secciones */
  }

.footer-section h3 {
    font-size: 16px; /* Tamaño de fuente más pequeño para el título */
    margin-bottom: 15px; /* Espacio debajo del título */
  }

.footer-bottom {
    margin-top: 20px; /* Espacio reducido en la parte inferior */
    font-size: 12px; /* Tamaño de fuente más pequeño para el texto inferior */
  }
  /*Fin Footer */
}

.modal {
  display: none; /* Ocultar el modal por defecto */
  position: fixed;
  z-index: 1000; /* Asegurar que esté en la parte superior */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro */
  display: flex; /* Usar flexbox para centrar el contenido */
  justify-content: center; /* Centrar horizontalmente */
  align-items: center;
  flex-direction: column; /* Centrar verticalmente */
}

.modal-content {
  max-width: 90%; /* Ancho máximo del contenido del modal */
  max-height: 80%; /* Altura máxima para que no desborde en pantallas pequeñas */
  display: block; /* Asegurar que el contenido se muestre como bloque */
  object-fit: contain;  
  margin-bottom: 10px;
}

.cerrar {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001; /* Asegurar que la "X" esté por encima del modal */
}

/* Animaciones para las barras */
#checkbox:checked ~ nav ul {
  display: flex; /* Mostrar menú al activar */
}