/* ---- RESET ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f9fafb;
  color: #333;
}

/* ---- HEADER ---- */
.header {
  background-color: #3d90f9;
  color: #fff;
  padding: 15px 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-bottom: 1px solid #ffffff;
}

/* ----------- Desktop Layout ----------- */
.header-desktop-layout {
  display: flex;
  justify-content: space-between; /* logo izq + texto / logo der */
  align-items: center;
  width: 100%;          /* ocupa todo el ancho */
  padding: 0 20px;      /* solo un poquito de espacio interno */
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-text {
  text-align: left;
}

.header-desktop-layout .header-logo-left img {
  height: 90px;
}

.header-desktop-layout .header-logo-right img {
  height: 90px;
}


/* ----------- Mobile Layout ----------- */
.header-mobile-layout {
  display: none;
}

@media (max-width: 768px) {
  .header-desktop-layout {
    display: none;
  }

  .header-mobile-layout {
    display: flex;
    justify-content: space-between; /* logos en las esquinas */
    align-items: center;
    gap: 10px;
  }

  .header-mobile-layout .header-logo-left img,
  .header-mobile-layout .header-logo-right img {
    height: 55px;
  }

  .header-mobile-layout .header-text {
    flex: 1;
    text-align: center;
  }
}

/* ---- Tipografía ---- */
.header-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin: 0;
}

.header-subtitle {
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1px;
  margin-top: 4px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .header-title {
    font-size: 22px;
  }

  .header-subtitle {
    font-size: 14px;
  }
}


/* ---- BANNER ---- */
.banner {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.banner video {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.banner::after {
  content: "";
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: transparent;
}


/* TÍTULO */
.titulo {
  text-align: center;
  font-size: 28px;
  margin: 40px 0 20px;
  color: #2f80ed;
  font-weight: 700;
}

/* GRID DE INSTITUCIONES */
.instituciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

/* TARJETA */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* IMÁGENES */
.card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

/* NOMBRE */
.card p {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.volver-contenedor {
  text-align: center;
  margin: 40px 0;
}
/* Contenedor centrado */
.contenedor-boton {
  text-align: center;
  margin-bottom: 40px;
  margin-top: 20px;
}

/* Estilo del botón */
.btn-volver {
  display: inline-block;
  background-color: #2563eb; /* Azul */
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
  
  /* Animación inicial */
  opacity: 0;
  transform: scale(0.8);
  animation: agrandar 0.6s ease forwards;
  animation-delay: 0.2s;
}

/* Hover con efecto de agrandado */
.btn-volver:hover {
  background-color: #1d4ed8; /* Azul más oscuro */
  transform: scale(1.1);
}

/* Animación de entrada (agrandar + fade) */
@keyframes agrandar {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Quitar subrayado de los títulos */
.instituciones-grid .card a {
  text-decoration: none;
  color: #222;   /* Color del texto */
  font-weight: 600;
}

.instituciones-grid .card a:hover p {
  color: #0056b3; /* Color al pasar el mouse */
}

/* ---- FOOTER ---- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 60px;
  padding: 25px 50px 14px;
  border-top: 1px solid #ccc;
  background: #4299ff;
  color: #fff;
}
.footer-info {
  justify-self: start;
  font-size:14px;
  line-height:1.6;
}
.footer-info a {
  color: #fff;
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.anim-link::after {
  content:"";
  position:absolute;
  left:0;
  bottom:-2px;
  width:0;
  height:2px;
  background:#fff;
  transition:width 0.3s ease;
}
.anim-link:hover::after {
  width:100%;
}
.logo-footer {
  justify-self: center;
  margin-top: 20px;
}
.logo-footer img.logo-estatico {
  width:110px; height:110px; object-fit:contain;
  margin-right: 15px;
}
.footer-social {
  justify-self: end;
  text-align: right;
}
.footer-social .icons {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}
.footer-social img {
  width:40px; height:40px;
  margin-top: 15px;
  border-radius:50%;
}
.footer-social img:hover {
  transform:scale(1.2);
}
.site-footer .copyright {
  grid-column: 1 / -1;
  text-align:center;
  margin-top:6px;
  font-size:12px;
  color:#eee;
}
@media (max-width: 768px){
  .site-footer{ grid-template-columns: 1fr; text-align:center; }
  .footer-info, .footer-social{ justify-self:center; text-align:center; }
  .footer-social .icons{ justify-content:center; }

}
.mensaje {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0.9;
}
/* ------------------ MODAL ------------------ */
/* Fondo semitransparente del modal */
#passwordModal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0; 
  top: 0; 
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0, 0, 0, 0.4); /* fondo gris transparente */
  justify-content: center;
  align-items: center;
}

/* Caja del modal */
#passwordModal .modal-content {
  background-color: #fff; /* blanco */
  padding: 30px 25px;
  border-radius: 12px;
  width: 450px;
  max-width: 90%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
}

/* Título */
#passwordModal h3 {
  color: #007bff; /* azul como en la primera imagen */
  font-size: 20px;
  margin-bottom: 20px;
}

/* Input */
#passwordModal input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 0px;
  box-sizing: border-box;

}

/* Botones */
#passwordModal .btn-confirm {
  background-color: #007bff; /* azul */
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  margin-right: 10px;
}

#passwordModal .btn-cancel {
  background-color: #e0e0e0; /* gris */
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

/* Mensaje de error */
#passwordModal .pw-message {
  color: #b33;
  min-height: 18px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

@keyframes fadeIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px){
  .site-footer{ grid-template-columns: 1fr; text-align:center; }
  .footer-info, .footer-social{ justify-self:center; text-align:center; }
  .footer-social .icons{ justify-content:center; }
}
/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100dvh;
    background: #4299ff;
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 1200;
    gap: 12px;

    /* 🔹 Marco y sombra */
    border-right: 3px solid #1e4fa1;   /* borde lateral derecho */
    box-shadow: 4px 0 12px rgba(0,0,0,0.25); /* sombra hacia el contenido */
  }


  nav.show { left: 0; }
  nav a { display: block; padding: 12px; width: 100%; }
  .dropdown:hover .dropdown-content {
    position: static; box-shadow: none; background: none; display: none;
  }
  .dropdown.open .dropdown-content { display: block; }
  .dropdown-content a { padding-left: 20px; }
  .hamburger {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1300;
  }
}
@media (max-width: 768px) {
  header .logo { flex-direction: column; }
  header h1 { font-size: 24px; text-align: center; }
  header h2 { font-size: 14px; text-align: center; }
  header .logo img { height: 60px; margin: 0; }
  nav { gap: 16px; }
  .banner { max-height: 300px; }

  .inscripciones-content { 
    flex-direction: column; 
    padding: 2rem; 
    text-align: center; 
  }
  .inscripciones-text { margin: 0 0 2rem; }
  .inscripciones-img { text-align: center; }
  .inscripciones-img img { width: 80%; }

  .site-footer { 
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
    padding: 25px 20px;
  }
  .footer-info, 
  .footer-social {
    justify-self: center;
    text-align: center;
  }
  .footer-social .icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  header h1 { font-size: 20px; }
  header h2 { font-size: 12px; }
  header .logo img { height: 50px; }
  nav { gap: 10px; }
  .banner { max-height: 200px; }

  .inscripciones-title { font-size: 2rem; }
  .inscripciones-text p { font-size: 1rem; }
  .inscripciones-btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }

  .cuadros { grid-template-columns: 1fr; gap: 30px; }
  .cuadro { width: 200px; height: 200px; }
}
