/* Reset y tipografía */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #e6f0fb;
  color: #003366;
  line-height: 1.6;
  min-height: 100vh;
  background: url(images/fondo.jpg) no-repeat center center fixed;
  background-size: cover;
}

/* Encabezado */
.encabezado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #004080 0%, #003366 100%);
  padding: 15px 30px;
  color: #f0f8ff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
}

.logo {
  height: 55px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.logo-container:focus,
.logo-container:hover {
  outline: 2px solid #80b3ff;
  transform: scale(1.05);
}

.logo-submenu {
  position: absolute;
  top: 65px;
  left: 0;
  background: #454fda;
  border-radius: 6px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.25);
  display: none;
  padding: 10px 15px;
  min-width: 180px;
}

.logo-container:focus .logo-submenu,
.logo-container:hover .logo-submenu {
  display: block;
}

.logo-submenu ul {
  list-style: none;
}

.logo-submenu ul li a {
  color: #cce0ff;
  text-decoration: none;
  display: block;
  padding: 8px 0;
  font-weight: 600;
  transition: color 0.25s ease;
}

.logo-submenu ul li a:hover,
.logo-submenu ul li a:focus {
  color: #80b3ff;
}

/* Menú principal */
.menu-toggle {
  background: transparent;
  border: none;
  font-size: 26px;
  color: #cce0ff;
  cursor: pointer;
  display: none; /* Se mostrará solo en móviles */
  transition: color 0.3s ease;
  z-index: 1100;
}

.menu-toggle:hover,
.menu-toggle:focus {
  color: #80b3ff;
  outline: none;
}

.navbar {
  display: flex;
  align-items: center;
  position: relative;
}

.menu {
  list-style: none;
  display: flex;
  gap: 28px;
  font-weight: 600;
}

.menu li a {
  color: #cce0ff;
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.menu li a:hover,
.menu li a:focus {
  color: #80b3ff;
}

.menu li a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #80b3ff;
  transition: width 0.3s ease;
  position: absolute;
  bottom: -4px;
  left: 0;
}

.menu li a:hover::after,
.menu li a:focus::after {
  width: 100%;
}

/* Submenús */
.menu li.has-submenu > a::after {
  content: "▼";
  margin-left: 6px;
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.menu li.submenu-open > a::after {
  transform: rotate(-180deg);
}

.menu li ul {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-left: 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.menu li.submenu-open > ul {
  display: flex;
  max-height: 500px;
}

/* Toggle hamburguesa */
.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: #cce0ff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.4s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Menú móvil */
@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 65px; /* justo debajo del header */
    right: 0;
    width: 240px;
    height: calc(100% - 65px);
    background: #003366;
    padding-top: 25px;
    padding-left: 20px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1050;
  }

  .navbar.active .menu {
    transform: translateX(0);
  }

  .menu li a {
    font-size: 1.2rem;
    padding: 10px 0;
  }
}

/* Hero y video */
.hero {
  position: relative;
  width: 100%;
  height: 80vh; /* ajusta según necesites */
  min-height: 250px;
  background-color: #000; /* o tu video de fondo */
  display: flex;           /* importante */
  justify-content: center; /* centra horizontalmente */
  align-items: center;     /* centra verticalmente */
  overflow: hidden;
}

.hero-text {
  text-align: center;      /* centra el contenido del bloque */
  color: white;            /* opcional si quieres blanco */
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover; /* cubre todo sin franjas negras */
}

.hero-text {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 90%;
  max-width: 1000px;
  padding: 0 20px;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 18px;
  font-weight: 700;
  text-shadow: 2px 2px 5px #0e2b66;
  color: white;
  text-align: center;
  justify-content: center;
}

.hero-text p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  font-weight: 500;
  text-shadow: 1px 1px 3px #0e2b66;
  color: white;
}

/* Botón WhatsApp */
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  padding: 14px 28px;
  border-radius: 35px;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 6px 12px rgba(37, 211, 102, 0.6);
  text-decoration: none;
  display: inline-block;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background: #1ebe59;
  box-shadow: 0 8px 20px rgba(30, 190, 89, 0.8);
  outline: none;
}

/* Sección Quienes Somos */
.section-bg-light {
  background-color: transparent;
  padding: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#Quienes-Somos {
  background: #dbe9fc;
  padding: 60px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 70, 160, 0.25);
  color: #003366;
  font-weight: 500;
  margin-bottom: 50px;
  transition: transform 0.4s ease;
}

#Quienes-Somos:hover,
#Quienes-Somos:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 70, 160, 0.4);
}

#Quienes-Somos h2 {
  font-weight: 800;
  font-size: 2.8rem;
  margin-bottom: 25px;
  color: #00264d;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 1px 1px 3px #80b3ff;
}

#Quienes-Somos p {
  font-size: 1.15rem;
  margin-bottom: 20px;
  line-height: 1.7;
  text-align: justify;
  color: #004080;
}

.pilares {
  list-style-type: disc;
  padding-left: 1.8rem;
  margin-bottom: 25px;
  color: #003366;
  font-weight: 600;
  font-size: 1.2rem;
}

/* Sección Misión y Visión */
#Mision-Vision {
  background: #e3f0ff;
  padding: 55px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 80, 170, 0.3);
  margin: 80px auto 80px;
  color: #003366;
}

#Mision-Vision h2 {
  font-weight: 800;
  font-size: 2.6rem;
  margin-bottom: 30px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #00264d;
  text-shadow: 1px 1px 3px #80b3ff;
}

.bloques {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.bloque {
  background: #c9deff;
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(0, 70, 160, 0.2);
  padding: 25px 30px;
  flex: 1 1 45%;
  min-width: 300px;
  color: #00264d;
  transition: transform 0.35s ease;
}

.bloque:hover,
.bloque:focus-within {
  transform: translateY(-7px);
  box-shadow: 0 14px 28px rgba(0, 70, 160, 0.35);
}

.bloque h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
  color: #001f3d;
}

.bloque p {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: justify;
}

/* Sección Video Institucional */
#Video-Institucional {
  background: #d0e4ff;
  padding: 50px 25px 70px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 90, 200, 0.25);
  text-align: center;
  color: #003366;
  font-weight: 600;
  max-width: 850px;
  margin: 0 auto 80px;
}

#Video-Institucional h2 {
  font-size: 3rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  text-shadow: 1px 1px 3px #80b3ff;
}

#Video-Institucional p {
  text-align: justify;
  font-size: 1.15rem;
  margin-bottom: 25px;
  font-weight: 500;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.btn-video {
  background: #004080;
  color: #e6f0ff;
  padding: 15px 40px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(0, 60, 130, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-video:hover,
.btn-video:focus {
  background: #00264d;
  box-shadow: 0 10px 28px rgba(0, 40, 90, 0.8);
  outline: none;
}

/* Modal video */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(3, 37, 76, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1100;
}

.modal-content {
  position: relative;
  background-color: #f0f8ff;
  border-radius: 15px;
  padding: 10px;
  max-width: 900px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 60, 130, 0.5);
  animation: fadeInScale 0.35s ease forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal video {
  width: 100%;
  border-radius: 12px;
  outline: none;
}

.close-button {
  position: absolute;
  top: 5px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 2.8rem;
  font-weight: 900;
  color: #e1e4e7;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 1200;
}

.close-button:hover,
.close-button:focus {
  color: #001f3d;
  outline: none;
}

/* Sección contacto */
.contacto-section {
  max-width: 900px;
  margin: 0 auto 60px;
  background: #e3f0ff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(0, 80, 170, 0.3);
  color: #003366;
}

.contacto-titulo {
  font-size: 2.4rem;
  margin-bottom: 18px;
  text-align: center;
  font-weight: 800;
  text-shadow: 1px 1px 3px #80b3ff;
}

.contacto-descripcion {
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 28px;
  text-align: center;
}

.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contacto-form input,
.contacto-form textarea {
  padding: 12px 18px;
  border: 2px solid #80b3ff;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
  border-color: #004080;
  outline: none;
}

.btn-enviar {
  background: #004080;
  color: #e6f0ff;
  padding: 15px 0;
  border: none;
  border-radius: 45px;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(0, 60, 130, 0.6);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.btn-enviar:hover,
.btn-enviar:focus {
  background: #00264d;
  box-shadow: 0 10px 28px rgba(0, 40, 90, 0.8);
  outline: none;
}

/* Footer */
footer {
  background: linear-gradient(90deg, #004080 0%, #003366 100%);
  color: #cce0ff;
  padding: 22px 30px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

footer .social {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 25px;
}

footer .social a img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
  transition: filter 0.3s ease;
}

footer .social a:hover img,
footer .social a:focus img {
  filter: drop-shadow(0 0 6px #80b3ff);
  outline: none;
}

/* Responsive hero y secciones */
@media (max-width: 900px) {
  .hero {
    height: 45vh;
    padding: 50px 15px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .btn-whatsapp {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .bloques {
    flex-direction: column;
    gap: 30px;
  }

  #Quienes-Somos {
    padding: 50px 20px;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 40vh;
    padding: 40px 10px;
  }

  .hero-text h1 {
    font-size: 1.4rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .btn-whatsapp {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  #Quienes-Somos {
    padding: 40px 15px;
  }

  .bloques {
    gap: 25px;
  }

  .bloque {
    padding: 18px 20px;
  }
}
@media (max-width: 480px) {
  .hero {
    height: auto;           /* que el contenedor se ajuste al contenido */
    min-height: 250px;      /* altura mínima para que no quede muy pequeño */
    overflow: hidden;
  }

  .hero-video {
    width: 100%;            /* ocupa todo el ancho */
    height: auto;           /* ajusta altura automáticamente */
    max-height: 70vh;       /* altura máxima según quieras */
    display: block;
    margin: 0 auto;
  }
}

