/* ============================================================
   Header/nav del sitio PUBLICADO, extraído de assets/css/style.css
   (líneas 124-724) para reusar el mega-menú EXACTO en la landing v2.
   Selectores propios (#header, .nav-menu, .mega*, .mobile-nav*) que
   no chocan con el template BS5 (que usa .header/.navmenu).
   ============================================================ */
/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
  height: 80px;
  z-index: 997;
  transition: all 0.5s;
  background: #fff;
}

#header .container {
  position: relative;
  align-self: stretch;
}

/* Compat Bootstrap 4 -> 5: header.php usa clases BS4 (mr-auto) que no existen
   en el Bootstrap 5 de la v2. Restauramos su efecto solo dentro del header
   para que el logo quede a la izquierda y el menú se empuje a la derecha. */
#header .container {
  display: flex;
  align-items: center;
}
#header .mr-auto {
  margin-right: auto !important;
}

#header.header-scrolled {
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
  height: 60px;
  background: #fff;
}

#header .logo h1 {
  font-size: 32px;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 1px;
}

#header .logo h1 a, #header .logo h1 a:hover {
  color: #222222;
  text-decoration: none;
}

#header .logo img {
  padding: 0;
  margin: 0;
  max-height: 40px;
}

@media (max-width: 768px) {
  #header {
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    height: 60px;
    background: #fff;
  }
  #header .logo h1 {
    font-size: 28px;
  }
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
.nav-menu, .nav-menu * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > ul > li {
  position: relative;
  white-space: nowrap;
  float: left;
}

.nav-menu a {
  display: block;
  position: relative;
  color: #555555;
  padding: 8px 0 12px 25px;
  transition: 0.3s;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
}

.nav-menu a:hover, .nav-menu .active > a, .nav-menu li:hover > a {
  color: #3498db;
  text-decoration: none;
}

.nav-menu .get-started a {
  background: #3498db;
  color: #fff;
  border-radius: 50px;
  margin: 0 0 0 30px;
  padding: 10px 25px;
}

.nav-menu .get-started a:hover {
  background: #57aae1;
  color: #fff;
}

.nav-menu .drop-down ul {
  display: block;
  position: absolute;
  left: 25px;
  top: calc(100% + 30px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  padding: 10px 0;
  background: #fff;
  box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
  transition: ease all 0.3s;
  border-radius: 5px;
}

.nav-menu .drop-down:hover > ul {
  opacity: 1;
  top: 100%;
  visibility: visible;
}

.nav-menu .drop-down li {
  min-width: 180px;
  position: relative;
}

.nav-menu .drop-down ul a {
  padding: 10px 20px;
  font-size: 14px;
  text-transform: none;
  color: #222222;
}

.nav-menu .drop-down ul a:hover, .nav-menu .drop-down ul .active > a, .nav-menu .drop-down ul li:hover > a {
  color: #3498db;
}

.nav-menu .drop-down > a:after {
  content: "\ea99";
  font-family: IcoFont;
  padding-left: 5px;
}

.nav-menu .drop-down .drop-down ul {
  top: 0;
  left: calc(100% - 30px);
}

.nav-menu .drop-down .drop-down:hover > ul {
  opacity: 1;
  top: 0;
  left: 100%;
}

.nav-menu .drop-down .drop-down > a {
  padding-right: 35px;
}

.nav-menu .drop-down .drop-down > a:after {
  content: "\eaa0";
  font-family: IcoFont;
  position: absolute;
  right: 15px;
}

@media (max-width: 1366px) {
  .nav-menu .drop-down .drop-down ul {
    left: -90%;
  }
  .nav-menu .drop-down .drop-down:hover > ul {
    left: -100%;
  }
  .nav-menu .drop-down .drop-down > a:after {
    content: "\ea9d";
  }
}

/* Mega menu (full-width two-column dropdown) — desktop only */
.nav-menu .drop-down.mega {
  position: static;
}

.nav-menu .drop-down.mega > ul.mega-menu {
  display: block;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0;
  min-height: 300px;
  overflow: hidden;
  border-radius: 6px;
  /* Only clickable when actually open — prevents the invisible panel from
     swallowing body clicks during the fade-out (visibility lingers while
     opacity animates to 0). */
  pointer-events: none;
}

/* Mega menu opens on click only (via .mega-open), never on hover */
.nav-menu .drop-down.mega:hover > ul.mega-menu {
  opacity: 0;
  visibility: hidden;
  top: calc(100% + 30px);
}

.nav-menu .drop-down.mega.mega-open > ul.mega-menu {
  opacity: 1;
  visibility: visible;
  top: 100%;
  pointer-events: auto;
}

/* Left column — list of main solutions */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col {
  position: static;
  width: 300px;
  min-width: 300px;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 25px;
  font-size: 15px;
  color: #222222;
  transition: 0.2s;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > a:after {
  content: "\eaa0";
  font-family: IcoFont;
  position: static;
  margin-left: 12px;
  color: #bcc4cf;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col:hover > a,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-active > a {
  background: #f7f9fc;
  color: #3498db;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col:hover > a:after,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-active > a:after {
  color: #3498db;
}

/* Right column — detail panel (submenu list OR description) */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > .mega-detail {
  display: block;
  position: absolute;
  top: 0;
  left: 300px;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 40px 50px;
  background: #f7f9fc;
  box-shadow: none;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  white-space: normal;
  transition: opacity 0.25s ease;
}

/* Description panel: vertically centered content */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > .mega-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Allow the panel text to wrap (parent nav forces white-space: nowrap) */
.nav-menu .drop-down.mega .mega-detail,
.nav-menu .drop-down.mega .mega-detail h4,
.nav-menu .drop-down.mega .mega-detail p,
.nav-menu .drop-down.mega .mega-detail a {
  white-space: normal;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col:hover > ul,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col:hover > .mega-detail,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-active > ul,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-active > .mega-detail {
  left: 300px;
  top: 0;
  opacity: 1;
  visibility: visible;
}

/* Right column — submenu as a single column, aligned with the main list */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 300px;
  right: auto;
  bottom: auto;
  padding: 0;
  gap: 0;
  background: #ffffff;
  border-left: 1px solid #e4e8ee;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col:hover > ul,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-active > ul {
  display: flex;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li {
  min-width: 0;
  margin: 0;
}

/* Items transparent so the column shows the #f7f9fc background uniformly */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li > a {
  display: block;
  padding: 18px 25px;
  font-size: 15px;
  color: #222222;
  background: transparent;
  transition: 0.2s;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li > a:hover {
  background: #3498db;
  color: #ffffff;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li > a:after {
  display: none;
}

/* Third level — a parallel column matching the level-2 column, top-aligned beside it */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Chevron on the sub-item that opens the third column */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down > a:after {
  content: "\eaa0";
  font-family: IcoFont;
  display: inline-block;
  margin-left: 12px;
  color: #bcc4cf;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down:hover > a:after {
  color: #ffffff;
}

/* Make the level-2 item a static box so the third column positions itself
   against the whole column (li.mega-col > ul), not against this single item —
   that way it starts at the very top of the megamenu card. */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down {
  position: static;
}

/* The third column: same width and card style as level 2, shifted one column
   to the right (left:100%) and top-aligned. Spans the full column height so the
   cursor can travel from the parent card across to it without the menu closing. */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down > ul {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 300px;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border-left: 1px solid #e4e8ee;
  box-shadow: none;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  z-index: 10;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down:hover > ul {
  opacity: 1;
  visibility: visible;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down > ul > li {
  margin: 0;
  min-width: 0;
}

/* Items transparent so the whole column shows the #f7f9fc background uniformly */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down > ul > li > a {
  display: block;
  padding: 18px 25px;
  font-size: 15px;
  color: #222222;
  background: transparent;
  white-space: nowrap;
  transition: 0.2s;
}

.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col > ul > li.drop-down > ul > li > a:hover {
  background: #3498db;
  color: #ffffff;
}

/* Right column — description block */
.nav-menu .mega-detail h4 {
  font-size: 20px;
  font-weight: 600;
  color: #222222;
  margin: 0 0 12px;
}

.nav-menu .mega-detail p {
  font-size: 14px;
  line-height: 1.7;
  color: #555555;
  margin: 0 0 18px;
  max-width: 480px;
}

.nav-menu .mega-detail .mega-more {
  display: inline-block;
  padding: 9px 22px;
  background: #3498db;
  color: #fff;
  border-radius: 50px;
  font-size: 14px;
  transition: 0.2s;
}

.nav-menu .mega-detail .mega-more:hover {
  background: #57aae1;
  color: #fff;
}

.nav-menu .mega-detail .mega-more i {
  margin-left: 6px;
}

/* "Plataforma eLearning": columna de nivel 2 (colegios/empresas) a altura
   completa aunque solo tenga 2 ítems. */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-elearning > ul {
  bottom: 0;
}

/* Las tres descripciones ocupan la tercera columna (espacio libre a la derecha)
   y arrancan ocultas. La que se muestra depende del subítem que se sobrevuele. */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-elearning > .mega-detail {
  left: 600px;
  border-left: 1px solid #e4e8ee;
  opacity: 0;
  visibility: hidden;
}

/* Por defecto (columna abierta, sin sobrevolar ningún subítem): descripción general */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-elearning.mega-active:not(:has(> ul > li:hover)) > .mega-detail.mega-detail-default,
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-elearning:hover:not(:has(> ul > li:hover)) > .mega-detail.mega-detail-default {
  opacity: 1;
  visibility: visible;
}

/* Sobre "Para colegios": descripción de colegios */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-elearning:has(> ul > li.sub-colegios:hover) > .mega-detail.mega-detail-colegios {
  opacity: 1;
  visibility: visible;
}

/* Sobre "Para empresas": descripción de empresas */
.nav-menu .drop-down.mega > ul.mega-menu > li.mega-col.mega-elearning:has(> ul > li.sub-empresas:hover) > .mega-detail.mega-detail-empresas {
  opacity: 1;
  visibility: visible;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  position: fixed;
  right: 15px;
  top: 15px;
  z-index: 9998;
  border: 0;
  background: none;
  font-size: 24px;
  transition: all 0.4s;
  outline: none !important;
  line-height: 1;
  cursor: pointer;
  text-align: right;
}

.mobile-nav-toggle i {
  color: #222222;
}

.mobile-nav {
  position: fixed;
  top: 55px;
  right: 15px;
  bottom: 15px;
  left: 15px;
  z-index: 9999;
  overflow-y: auto;
  background: #fff;
  transition: ease-in-out 0.2s;
  opacity: 0;
  visibility: hidden;
  border-radius: 10px;
  padding: 10px 0;
}

.mobile-nav * {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav a {
  display: block;
  position: relative;
  color: #222222;
  padding: 10px 20px;
  font-weight: 500;
  outline: none;
}

.mobile-nav a:hover, .mobile-nav .active > a, .mobile-nav li:hover > a {
  color: #3498db;
  text-decoration: none;
}

.mobile-nav .get-started {
  text-align: center;
  margin-top: 10px;
}

.mobile-nav .get-started a {
  background: #3498db;
  color: #fff;
  border-radius: 50px;
  margin: 0 15px;
  padding: 10px 30px;
  display: inline-block;
}

.mobile-nav .get-started a:hover {
  background: #57aae1;
  color: #fff;
}

.mobile-nav .drop-down > a:after {
  content: "\ea99";
  font-family: IcoFont;
  padding-left: 10px;
  position: absolute;
  right: 15px;
}

.mobile-nav .active.drop-down > a:after {
  content: "\eaa1";
}

.mobile-nav .drop-down > a {
  padding-right: 35px;
}

.mobile-nav .drop-down ul {
  display: none;
  overflow: hidden;
}

.mobile-nav .drop-down li {
  padding-left: 20px;
}

.mobile-nav-overly {
  width: 100%;
  height: 100%;
  z-index: 9997;
  top: 0;
  left: 0;
  position: fixed;
  background: rgba(9, 9, 9, 0.6);
  overflow: hidden;
  display: none;
  transition: ease-in-out 0.2s;
}

.mobile-nav-active {
  overflow: hidden;
}

.mobile-nav-active .mobile-nav {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-active .mobile-nav-toggle i {
  color: #fff;
}

