/* ===================== HERO (bienvenida + fotos) ===================== */   
.hero {
  position: relative;
  width: 100%;
  height: 130vh; /* ahora ocupa toda la pantalla */
  overflow: hidden;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 7rem; /* ajustable según contenido */
  background-image: url("../img/fondo.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0; /* aseguramos que el hero quede detrás */
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.3);
  z-index: 1; /* overlay, debajo del contenido */
}

.hero h1 {
  font-size: 2.5rem;
  z-index: 2; /* contenido por encima del overlay */
  text-shadow: 0px 2px 5px rgba(0,0,0,0.6);
  margin-bottom: 2rem;
}

/* ===================== IMÁGENES HERO ===================== */
.hero img {
  position: absolute;
  max-width: 90%;
  max-height: 55%;
  object-fit: contain;
  top: 65%; /* bajamos un poco para dar más espacio arriba */
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: fade 24s infinite;
  z-index: 2; /* encima del overlay */
}

@keyframes fade {
  0%, 20%   { opacity: 1; }
  33%, 100% { opacity: 0; }
}

.hero img:nth-child(2) { animation-delay: 8s; }
.hero img:nth-child(3) { animation-delay: 16s; }

/* ===================== MAIN ===================== */
.main {
  position: relative;
  z-index: 1; /* por encima del hero */
  margin-top: 0;
  padding: 2rem 0;
  background: none; /* quitar fondo que tapa las fotos */
}

.section {
  position: relative;
  z-index: 3;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto 2rem auto;
  color: #333;
  background: none;
  border-radius: 0;
}

/* ===================== SUBMENU ===================== */


.submenu {
  position: absolute;
  z-index: 9999; /* submenu por encima del fondo */
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 768px) {
  .hero {
    padding-top: 6rem;
    height: 170vh;
  }

  .hero h1 {
    font-size: 1.8rem;
    padding: 0 10px;
    margin-bottom: 1.5rem;
  }

  .hero img {
    max-width: 100%;
    max-height: 60%;
    top: 50%; /* bajamos un poco en móvil */
  }

  .main {
    margin-top: 0;
  }

  .section {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* Ajustar la posición de la imagen del hero en pantallas móviles */
@media (max-width: 900px) {
  .hero img {
    top: 60%; /* Baja la imagen para que no tape el título */
  }
}

/* ===================== SECCIONES ESPECÍFICAS DE INDEX ===================== */ 
.section {
  background-color: #f9f9f9; /* color de fondo suave para diferenciar */
  padding: 3rem 2rem;
  margin: 2rem auto;
  border-radius: 10px;
  max-width: 1000px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center; /* centra todos los elementos dentro de la sección */
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #003366; /* azul oscuro */
}

.section p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1.5rem;
}

/* ===================== BOTONES PDF ===================== */
.btn-pdf {
  display: inline-block;       /* permite centrado con text-align */
  background-color: #0077cc;   /* azul llamativo */
  color: #fff;
  font-weight: bold;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
  text-align: center;
  margin: 0 auto;             /* centra horizontalmente */
}

.btn-pdf:hover {
  background-color: #005fa3; /* azul más oscuro al pasar el mouse */
  transform: translateY(-2px);
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 768px) {
  .section {
    padding: 2rem 1rem;
    margin: 1rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .section p {
    font-size: 1rem;
  }

  .btn-pdf {
    width: 100%;
    padding: 0.8rem;
  }
}

/* Mostrar flechas solo en móvil */
@media (max-width: 900px) {
  .submenu-toggle {
    display: inline-block; /* Mostrar flechas en móvil */
    cursor: pointer;
    font-size: 16px;
    margin-left: 5px;
    color: #fff;
  }
}

/* Ocultar flechas en escritorio */
@media (min-width: 901px) {
  .submenu-toggle {
    display: none; /* Ocultar flechas en escritorio */
  }
}
/* ===================== SECCIÓN DESTACADO EN INDEX ===================== */
.destacado-section {
  text-align: center;
  padding: 2rem 1rem;
}

.destacado-video video {
  width: 100%;
  max-width: 700px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.destacado-fotos {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.destacado-fotos {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  margin-top: 2rem; /* Espacio arriba */
}

.destacado-fotos img {
  width: 30%;
  max-width: 250px; /* Aumentado de 100px a 350px */
  min-width: 150px; /* Tamaño mínimo en escritorio */
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.destacado-fotos img:hover {
  transform: scale(1.05); /* Efecto hover */
}

/* Responsive para tablets */
@media (max-width: 900px) {
  .destacado-fotos img {
    width: 45%;
    min-width: 200px;
    max-width: 300px;
  }
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .destacado-fotos img {
    width: 50%;
    min-width: 150px;
    max-width: 10%;
  }
}



/* ===================== MODAL PARA FOTOS ===================== */ 
.foto {
  width: 30%;
  max-width: 200px;
  cursor: pointer;
  transition: transform 0.2s;
}

.foto:hover {
  transform: scale(1.05);
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* Mostrar modal cuando se activa con el ID */
.modal:target {
  display: flex;
}

/* Botón cerrar */
.cerrar {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  text-decoration: none;
  font-weight: bold;
}

/* Contenedor solo para video + imagen */
.destacado-video-imagen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem; 
  width: 100%; /* Ocupa todo el ancho disponible */
}

/* Video y imagen ocupan la mitad del contenedor cada uno */
.destacado-video,
.destacado-imagen {
  flex: 1 1 45%; /* crece proporcionalmente */
  max-width: 600px; /* opcional */
}

/* Video e imagen llenan su contenedor */
.destacado-video video,
.destacado-imagen img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: pointer; /* muestra que es clickeable */
}

/* ===================== MEDIA QUERIES PARA MÓVILES ===================== */
@media (max-width: 768px) {
  .foto {
    width: 45%;
    max-width: none;
  }
  
  .destacado-video,
  .destacado-imagen {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .foto {
    width: 80%;
  }
  
  .cerrar {
    font-size: 1.5rem;
    top: 15px;
    right: 20px;
  }
}
/* Ajuste para el iframe de YouTube */
.destacado-video iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9; /* Mantiene la proporción del video */
  border-radius: 10px;
}
/* ===================== BOTÓN VER MÁS EN TALLERES ===================== */
.btn-ver-mas {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: #0077cc;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  text-align: center;
}

.btn-ver-mas:hover {
  background-color: #005fa3;
  transform: translateY(-2px);
}