/* ============================== */
/* RESET & BASE                  */
/* ============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🔧 Prevenir scroll lateral en móviles */
html, body {
  overflow-x: hidden;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1;
  background-color: #fafafa;
  color: #222;
}

/* ============================== */
/* LAYOUT GLOBAL                 */
/* ============================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================== */
/* HEADER & NAV                  */
/* ============================== */
header {
  background: #fff;
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 0;
    gap: 0;
}

#nav {
  display: flex;
  align-items: center;
  gap: 25px; /* Espaciado entre elementos del nav */
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 0;
    gap: 0;
}



.logo {
  height: 80px;
  max-height: 100px;
}

/* posicionamos #nav para que su <ul> fijo lo tome como referencia */
#nav {
  position: relative;
}

/* ============================== */
/* PIE DE PÁGINA - Footer         */
/* ============================== */
footer[role="contentinfo"] {
  background-color: #646464;; /* o blanco si prefieres */
  text-align: center;
  padding: 0.5rem 0.5rem;
}

footer[role="contentinfo"] p {
  margin: 0;
  font-size: 0.95rem;
  color: #b3afaf;
  font-family: var(--font-base);
}


/* NAV PRINCIPAL */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;   /* <— centra verticalmente cada ítem */
  gap: 20px;
}
nav ul li {
  display: flex;         /* que su contenido sea flex también */
  align-items: center;   /* centra iconos/textos dentro de cada li */
  position: relative;    /* ya lo tenías, no lo borres */
}

nav ul li a {
  color: #003366;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s;
}
nav ul li a::after {
  content: '';
  position: absolute;
  height: 2px;
  width: 0;
  left: 0;
  bottom: 0;
  background: #990000;
  transition: width 0.3s;
}
nav ul li a:hover,
nav ul li a.activo {
  color: #990000;
}
nav ul li a:hover::after,
nav ul li a.activo::after {
  width: 100%;
}

/* HAMBURGUESA (oculta desktop) */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  color: #c62828;
}

/* DROPDOWN “Conócenos” */
.dropdown-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.arrow {
  margin-left: 4px;
  font-size: 0.8em;
  transition: transform 0.2s;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
  padding: 0.5rem 0;
  z-index: 50;
  top: calc(100% + 4px); /* Un pequeño espacio debajo del menú padre */

}
.dropdown-menu li + li {
  margin-top: 0.2rem;
}
.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: #333;
  transition: background 0.2s;
}
.dropdown-menu a:hover {
  background: #f5f5f5;
}
/* Desktop: abrir al pasar el ratón */
.dropdown:hover > .dropdown-menu {
  display: flex;
}
.dropdown:hover > .dropdown-toggle .arrow {
  transform: rotate(180deg);
}

/* ============================== */
/* HERO SECTION                  */
/* ============================== */
.hero {
  background: #c07a7a;
  color: #fff;
  text-align: center;
  padding: 60px 20px;
  animation: fadeInUp 0.7s both ease-in-out;
}
.hero h1 {
  font-size: 40px;
  margin-bottom: 10px;
}
.hero p {
  font-size: 20px;
  opacity: 0.9;
}

/* ============================== */
/* SLIDER                        */
/* ============================== */
.slider {
  position: relative;
  max-width: 1000px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 10px;
}
.slide {
  display: none;
}
.slide img {
  width: 100%;
  display: block;
}
.slide.active {
  display: block;
  animation: fade 1s ease-in-out;
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================== */
/* MODAL IMAGES                  */
/* ============================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  padding-top: 60px;
  background: rgba(0,0,0,0.9);
}
.modal-contenido {
  display: block;
  margin: auto;
  width: 80%;
  max-width: 800px;
  border-radius: 10px;
}
.cerrar {
  position: absolute;
  top: 20px; right: 35px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 1000;
}
@keyframes aparecer {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================== */
/* PROGRAMAS (cards)             */
/* ============================== */
.programass {
  padding: 40px 20px;
  background: #f9f9f9;
}
.contenedor-programas {
  max-width: 1200px;
  margin: auto;
  text-align: center;
}
.grid-programas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 20px;
  margin-top: 30px;
}
.card-programa {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, opacity 0.4s;
}
.card-programa:hover {
  transform: translateY(-5px);
}
.card-programa h3 {
  color: #b71c1c;
}
.card-programa p {
  font-size: 14px;
  color: #555;
}
.btn-programa {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background: #c62828;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}
.btn-programa:hover {
  background: #a00000;
}
.ver-mas-btn {
  margin-top: 20px;
  padding: 10px 20px;
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.ver-mas-btn:hover {
  background: #b71c1c;
}
.extra {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s;
}
.extra.mostrar {
  opacity: 1;
  transform: translateY(0);
}
.oculto {
  display: none;
}

/* ============================== */
/* REDES SOCIALES                */
/* ============================== */
.redes-sociales {
  padding: 40px 20px;
  background: #f9f9f9;
}
.redes-sociales, h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #222;
}
.contenedor-redes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
}
.red-facebook,
.red-instagram {
  max-width: 500px;
  min-width: 320px;
  display: flex;
  justify-content: center;
}
.red-facebook .fb-page,
.red-instagram .elfsight-app-919a43f0-0981-4741-980d-3178654fa71a {
  width: 100%;
  min-height: 600px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.red-facebook .fb-page:hover,
.red-instagram .elfsight-app-919a43f0-0981-4741-980d-3178654fa71a:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}
.red-instagram button {
  background: #fff;
  color: #cc2366;
  border: none;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}
.red-instagram button:hover {
  background: #cc2366;
  color: #fff;
}
.red-twitter {
  max-width: 500px;
  min-width: 320px;
  display: flex;
  justify-content: center;
}

.red-twitter .elfsight-app-0746b09b-cbbe-4aa5-baae-dc5e94acacb3 {
  width: 100%;
  min-height: 600px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.red-twitter .elfsight-app-0746b09b-cbbe-4aa5-baae-dc5e94acacb3:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}

.red-twitter button {
  background: #fff;
  color: #1DA1F2;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}

.red-twitter button:hover {
  background: #1DA1F2;
  color: #fff;
}
.redes-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.red-instagram, .red-twitter {
  flex: 1 1 300px;
  max-width: 48%;
}

/* ============================== */
/* FOOTER INSTITUCIONAL           */
/* ============================== */
.footer-institucional {
  background: #333;
  color: #fff;
  padding: 40px 20px;
  font-size: 14px;
}
.footer-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}
.footer-col {
  flex: 1 1 200px;
}
.footer-col h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 6px;
}
.logo-footer {
  max-width: 150px;
}
.footer-col p {
  line-height: 1.6;
}

.footer-institucional a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-institucional a:hover {
  color: #ffcccc; /* opcional: un blanco rosado claro al pasar el cursor */
}


/* ============================== */
/* BOTÓN EMERGENCIA FLOTA        */
/* ============================== */
.emergencia-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  text-align: right;
}
.boton-emergencia {
  background: #d32f2f;
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.boton-emergencia:hover {
  background: #b71c1c;
}
.emergencia-lista {
 /* display: none;*/
  background: #fff3f3;
  border: 1px solid #e53935;
  border-radius: 10px;
  padding: 15px;
  margin-top: 10px;
  width: 280px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.emergencia-lista ul {
  list-style: none;
}
.emergencia-lista li {
  margin: 8px 0;
  font-size: 14px;
}
.linea-mujer-flotante {
  position: fixed;
  bottom: 10px;
  left: 20px; /* <- Cambia "right" por "left" */
  z-index: 1000;
}

.boton-linea-mujer {
  background-color: #5108a6;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}
.boton-linea-mujer:hover {
  background-color: #880e4f;
}

.linea-mujer-lista {
  display: none;
  background: white;
  border: 1px solid #ccc;
  padding: 1rem;
  margin-top: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.linea-mujer-lista ul {
  list-style: none;
  padding-left: 0;
}
.linea-mujer-lista li {
  margin-bottom: 8px;
}

.linea-mujer-lista.oculto {
  display: none;
}
.linea-mujer-lista.mostrar {
  display: block;
}


/* ============================== */
/* ANIMACIONES GLOBALES           */
/* ============================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================== */
/* RESPONSIVE GENERAL             */
/* ============================== */
@media (max-width: 768px) {
  /* muestra el botón hamburguesa */
.menu-toggle {
  display: block;              /* ya lo tenías */
  position: fixed;             /* fijo en pantalla */
  top: 1rem;                   /* separación desde arriba */
  right: 1rem;                 /* separación desde la derecha */
  z-index: 1100;               /* por encima del nav ul */
  background: none;
  border: none;
  font-size: 2rem;
  color: #c62828;
}

  /* MENÚ PRINCIPAL: fijo desde la derecha */
  nav ul {
    display: none;
    position: fixed;
    top: 0;
    right: -260px;
    bottom: 0;
    width: 260px;
    flex-direction: column;
    background: #fff;
    padding: 80px 20px 20px;
    box-shadow: -4px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
  }
/* Cuando el menú está abierto */
nav ul.show {
  right: 0;
  display: flex;
}
  nav ul li {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  nav ul li a,
  .dropdown-toggle {
    width: 100%;
    font-size: 16px;
    padding: 10px 0;
    font-weight: bold;
    color: #990000;
    border-bottom: 1px solid #eee;
  }

  .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

    .arrow {
    transition: transform 0.3s ease;
  }

   nav ul li .dropdown-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-left: 1rem;
    width: 100% !important;
    display: none;
    flex-direction: column;
  }
    .dropdown-menu.show-dropdown {
    display: flex;
  }

    .dropdown-menu a {
    padding: 8px 20px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
  }

  .dropdown-menu a:hover {
    background-color: #f9f9f9;
  }


} 

/* ===== Sección con tres opciones ===== */
/* Contenedor de todos los servicios */
.seccion-servicios {
  background: #fafafa;
  /* reducimos el padding inferior de 4rem a 2rem */
  padding: 1.5rem 0 0.5rem;
  text-align: center;
  
}
.contenedor-servicios {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.contenedor-servicio {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

/* Wrapper para forzar 100×100 */
.icono-box {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.icono-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

/* Hover en la tarjeta completa */
.contenedor-servicio:hover {
  transform: scale(1.05);
}

/* Hover en el icono */
.contenedor-servicio:hover .icono-box img {
  transform: scale(1.1) rotate(-3deg);
  filter: brightness(1.2);
}

/* Hover en el título */
.contenedor-servicio:hover h2 {
  transform: translateY(-5px);
  color: #8e0e2e;
  transition: transform 0.3s ease, color 0.3s ease;
}
/* ============================== */
/* 📱 Responsive Celulares Medianos y Pequeños */
/* ============================== */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .btn-programa {
    font-size: 14px;
    padding: 6px 12px;
  }

  .grid-programas {
    grid-template-columns: 1fr;
  }

  .redes-sociales h2 {
    font-size: 22px;
  }

  .contenedor-servicio h2 {
    font-size: 18px;
  }

  .icono-box {
    width: 100px;
    height: 100px;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-col {
    text-align: center;
  }

  .red-facebook,
  .red-instagram {
    width: 100%;
    max-width: 100%;
    min-width: unset;
  }

  .red-facebook .fb-page,
  .red-instagram .elfsight-app-919a43f0-0981-4741-980d-3178654fa71a {
    width: 100%;
    max-width: 100%;
  }

  .emergencia-flotante {
    bottom: 15px;
    right: 15px;
  }

  .boton-emergencia {
    padding: 10px 16px;
    font-size: 14px;
  }

  .emergencia-lista {
    width: 90%;
  }
}

/* ============================== */
/* 📱 Afinado para A54 / iPhone 13-15 */
/* ============================== */
@media (min-width: 390px) and (max-width: 430px) {
  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 18px;
  }

  .btn-programa {
    font-size: 15px;
    padding: 8px 14px;
  }

  .contenedor-programas {
    padding: 0 10px;
  }

  .card-programa {
    padding: 15px;
  }

  .contenedor-servicio h2 {
    font-size: 20px;
    margin-top: 8px;
  }

  .icono-box {
    width: 110px;
    height: 110px;
  }

  .footer-institucional {
    font-size: 13px;
    padding: 30px 10px;
  }

  .emergencia-lista {
    width: 95%;
  }
}
body.menu-abierto .emergencia-flotante {
  display: none;
}
/* Submenú dentro de un dropdown */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-left: 0.2rem;
  display: none;
  position: absolute;
  min-width: 200px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: flex;
  flex-direction: column;
}

.dropdown-submenu:hover > .dropdown-toggle .arrow {
  transform: rotate(-90deg);
}

/* Mobile override */
@media (max-width: 768px) {
  .dropdown-submenu > .dropdown-menu {
    position: static !important;
    left: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 1rem;
  }
}
@media (max-width: 768px) {
  nav ul.show {
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .dropdown-menu.show-dropdown {
    max-height: 65vh; /* Ajusta según la altura de tu submenú */
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Si tu submenú tiene otra clase usa ese nombre */
}
.dropdown-menu.show-dropdown {
  scrollbar-width: thin;
  scrollbar-color: #a22 #fff;
}
.dropdown-menu.show-dropdown::-webkit-scrollbar {
  width: 6px;
  background: #fff;
}
.dropdown-menu.show-dropdown::-webkit-scrollbar-thumb {
  background: #a22;
  border-radius: 3px;
}
/* Menús muy largos: scroll interno elegante */
.dropdown-menu,
.dropdown-menu.submenu {
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Botones de toggles con apariencia de enlace (para no romper tu estilo) */
.dropdown-toggle {
  background: none;
  border: none;
  color: #003366;
  font: inherit;
  padding: 8px 0;
  cursor: pointer;
}

/* Efecto hover/activo igual que <a> */
.dropdown-toggle:hover,
.dropdown-toggle:focus {
  color: #990000;
  outline: none;
}

/* Flechas */
.dropdown-toggle .arrow {
  margin-left: 4px;
  font-size: .8em;
}

/* En móvil, fuerza que los submenús abiertos sean visibles */
@media (max-width: 768px) {
  .dropdown-menu.show-dropdown {
    display: flex !important;
  }
}
/* ===== 1) Desktop: mantener el menú en una sola línea ===== */
@media (min-width: 1201px) {
  /* que el nav ocupe el espacio a la derecha del logo */
  #nav {
    flex: 1;
    justify-content: flex-start;
  }

  nav ul {
    flex-wrap: nowrap;   /* una sola fila */
    gap: 18px;           /* separador razonable */
  }

  nav ul > li {
    white-space: nowrap; /* no partir palabras largas */
  }

  nav ul > li a,
  nav ul > li .dropdown-toggle {
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
    font-size: 0.96rem;  /* un pelín más compacto */
    line-height: 1;      /* alinea mejor la flecha */
  }

  .dropdown-toggle .arrow {
    margin-left: 4px;
    position: relative;
    top: -1px;           /* alineación óptica */
  }

  header .container { padding-left: 0;
    gap: 0;  } /* aire entre logo y nav */
}

/* ===== 2) Menú móvil tipo drawer: activar ANTES (<=1200px) ===== */
@media (max-width: 1200px) {
  .menu-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    background: none;
    border: none;
    font-size: 2rem;
    color: #c62828;
  }

  /* Drawer lateral */
  nav ul {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    bottom: 0;
    width: 280px;
    flex-direction: column;
    background: #fff;
    padding: 80px 20px 20px;
    box-shadow: -4px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
  }
  nav ul.show { right: 0; display: flex; }

  nav ul li {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  nav ul li a,
  .dropdown-toggle {
    width: 100%;
    font-size: 16px;
    padding: 10px 0;
    font-weight: bold;
    color: #990000;
    border-bottom: 1px solid #eee;
  }

  .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Submenús en columna y con scroll si son largos */
  nav ul li .dropdown-menu {
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-left: 1rem;
    width: 100% !important;
    display: none;
    flex-direction: column;
  }
  .dropdown-menu.show-dropdown { display: flex; }

  /* Scroll interno del panel y submenús */
  nav ul.show {
    max-height: 80vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .dropdown-menu.show-dropdown {
    max-height: 65vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ===== 3) (ya lo tenías, lo reafirmamos) submenús con scroll elegante ===== */
.dropdown-menu,
.dropdown-menu.submenu {
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Botón toggle con look de enlace */
.dropdown-toggle {
  background: none;
  border: none;
  color: #003366;
  font: inherit;
  padding: 8px 0;
  cursor: pointer;
}
.dropdown-toggle:hover,
.dropdown-toggle:focus {
  color: #990000;
  outline: none;
}
header .container {
  width: 100% !important;   /* anula el 90% del .container global SOLO en header */
  max-width: none !important;
  margin: 0 !important;      /* evita centrado con márgenes laterales */
  padding-left: 0 !important;/* pegado total al borde izquierdo */
  gap: 0 !important;         /* sin aire extra entre logo y nav */
}
/* Un pequeño aire del lado del menú (ajusta 0–24px a gusto) */
header .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px; /* este valor separa logo y menú */
}

/* El logo no deja espacio “de línea” debajo */
.logo {
  display: block;
}


#nav .dropdown-menu{
  min-width:240px; max-width:360px;
  overflow-x:hidden; overflow-y:auto; max-height:60vh;
  white-space:normal; word-break:break-word; text-align:left;
}
.dropdown-submenu{position:relative;}
.dropdown-submenu > .dropdown-menu{left:100%; right:auto; top:0; margin-left:4px;}
.dropdown-submenu.open-left > .dropdown-menu{right:100%; left:auto; margin-left:0; margin-right:4px;}
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 1000; /* IMPORTANTE */
  background: white;
  white-space: normal;
  min-width: 250px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: flex;
  flex-direction: column;
}

#nav .dropdown-menu {
  overflow: visible !important; /* MUY IMPORTANTE para que no lo tape el scroll vertical */
}
@media (max-width: 768px) {
  .dropdown-menu.show-dropdown {
    display: flex !important;
  }
}
.dropdown-menu {
  overflow-y: auto;
  max-height: 60vh;
}
/* Por defecto, los submenús están ocultos */
.dropdown .dropdown-menu {
  display: none;
}

/* Cuando tengan la clase dropdown--open, se muestran */
.dropdown.dropdown--open .dropdown-menu {
  display: block;
}
