/* Menú principal (puede estar dentro de un ul grande) */
/* IMPORTAMOS UNA FUENTE MODERNA */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f7f9fc;
  color: #333;
}

/* HEADER */
#head {
  background-color: #1e1e1e;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

/* LOGO / ENLACE PRINCIPAL */
#index {
  text-decoration: none;
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}


/* BOTÓN DE MENÚ (MÓVIL) */
#menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: none;
  transition: transform 0.3s ease;
}

#menu-toggle:hover {
  transform: scale(1.1);
}

/* MENÚ PRINCIPAL */
#menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

/* ENLACES DEL MENÚ */
#menu li a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s;
}

#menu li a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: #00bcd4;
  bottom: -4px;
  left: 0;
  transition: width 0.3s ease;
}

#menu li a:hover::after {
  width: 100%;
}

#menu li a:hover {
  color: #00bcd4;
}

/* SUBMENÚ */
.submenu {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 120%;
  left: 0;
  background-color: #ffffff;
  display: none;
  flex-direction: column;
  list-style: none;
  padding: 0.5rem 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  animation: fadeIn 0.3s ease-in-out;
}

.submenu:hover .dropdown {
  display: flex;
}

.dropdown li a {
  padding: 0.75rem 1.25rem;
  display: block;
  color: #333;
  white-space: nowrap;
  font-weight: 500;
  transition: background-color 0.3s;
}

.dropdown li a:hover {
  background-color:  white;
  border-radius: 8px;
}

/* ANIMACIÓN DE ENTRADA */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  #menu {
    display: none;
    flex-direction: column;
    background-color: #ffffff;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }

  #menu.show {
    display: flex;
  }

  #menu li a {
    color: #333;
    padding: 1rem;
  }

  .submenu .dropdown {
    position: static;
    box-shadow: none;
    background-color: #f9f9f9;
  }

  .submenu.active .dropdown {
    display: flex;
  }

  .submenu:hover .dropdown {
    display: none;
  }
}
/*=================================== Main======================= */
/* Estilos generales */
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

/* Sección intro-galeria */
.intro-galeria {
  text-align: center;
  margin-bottom: 40px;
}

.titulo-galeria {
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 10px;
}

.descripcion-galeria {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

/* Contenedor de tarjetas */
.contenedor-tarjetas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

/* Tarjetas */
.tarjeta {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 300px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transition: 1s;
  position: relative;
}
.tarjeta:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  padding-bottom: 10%;
  transition: 1s;
}
.tarjeta img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.tarjeta h3 {
  margin: 1rem 0;
  font-size: 1.5rem;
}

.tarjeta a.boton {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #004c97;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.tarjeta a.boton:hover {
  background-color: #003970;
}

/* Estilo para el desplegable */
.Cerramientos {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.Cerramientos h3 a {
  text-decoration: none;
  color: #ffffff;
  cursor: pointer;
  background-color: #004c97;
  border-radius: 8px;
  padding: 5%;
}
.Cerramientos:hover h3 a{
  background-color: #003970;
  transition: 1s;
}
.Cerramientos .desplegable {
  position: absolute;
  top: 100%;
  left: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  z-index: 1000;
}

.Cerramientos .desplegable li {
  margin: 0;
}

.Cerramientos .desplegable a {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.Cerramientos .desplegable a:hover {
  background-color: #f0f0f0;
}

/* Mostrar desplegable al pasar el ratón */
.Cerramientos:hover .desplegable {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  z-index: 99999;
}

.tooltip-text {
  position: absolute;
  bottom: 13%; /* ligeramente encima de la imagen */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(202, 226, 248, 0.9);
  color: #000000;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  font-size: 0.9rem;
  z-index: 10;
}

.tarjeta:hover .tooltip-text {
  opacity: 1;
}
