/* ==================================================
   HEADER GLOBAL COMPARTIDO
   Usar en todas las páginas del sitio
   Archivo: components/header.css
================================================== */

/* ===== Espacio superior por header fixed ===== */
body{
  padding-top:90px;
}

/* ===== Header base ===== */
.page-header.header-basic{
  position:fixed !important;
  top:0;
  left:0;
  width:100%;
  z-index:99999;
  background:rgba(5,14,38,.72) !important;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(0,191,255,.12);
  box-shadow:0 8px 24px rgba(0,0,0,.18);
  transition:all .3s ease;
}

.page-header.header-basic::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(0,191,255,.45),transparent);
}

/* ===== Container navbar ===== */
.page-header .container{
  max-width:1680px;
  margin:0 auto !important;
  padding-left:14px;
  padding-right:14px;
}

.menu-navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* ===== Logo ===== */
.header-logo .logo-img{
  max-height:42px;
  width:auto;
  transition:.3s ease;
  filter:drop-shadow(0 0 10px rgba(0,191,255,.15));
}

.header-logo:hover .logo-img{
  transform:scale(1.03);
}

/* ===== Controls derecha ===== */
.controls-box{
  display:flex;
  align-items:center;
  gap:6px;
}

.controls-box .control,
.mode-switcher{
  border-radius:12px;
  transition:.25s ease;
}

.controls-box .control:hover,
.mode-switcher:hover{
  background:rgba(0,191,255,.08);
  box-shadow:0 0 12px rgba(0,191,255,.14);
}

.controls-box .icon,
.mode-switcher .icon{
  transition:.25s ease;
}

.controls-box .control:hover .icon,
.mode-switcher:hover .icon{
  color:#18c7ff;
}

/* ===== Menú desktop ===== */
.links.menu-wrapper{
  display:block;
  position:static;
  width:auto;
  background:transparent;
  box-shadow:none;
  padding:0;
}

.links-list{
  display:flex;
  align-items:center;
  gap:2px;
  margin:0;
  padding:0;
}

.menu-item{
  list-style:none;
  margin:0 !important;
  padding:0 !important;
  position:relative;
}

.menu-link{
  color:#eef6ff !important;
  text-decoration:none;
  white-space:nowrap;
  padding:10px 8px !important;
  font-size:14px !important;
  transition:.25s ease;
}

.menu-link:hover{
  color:#18c7ff !important;
}

.menu-link.active{
  color:#18c7ff !important;
}

.plus-icon{
  font-size:11px;
  margin-left:4px;
}

/* ===== Submenu ===== */
.sub-menu{
  background:rgba(8,18,48,.95) !important;
  border:1px solid rgba(0,191,255,.14);
  border-radius:14px;
  box-shadow:0 14px 28px rgba(0,0,0,.22);
  backdrop-filter:blur(12px);
}

.sub-menu-link{
  color:#dbe8ff !important;
}

.sub-menu-link:hover{
  color:#18c7ff !important;
  padding-left:18px !important;
  background:rgba(0,191,255,.06);
}

/* ===== Submenu lateral ===== */
.sub-menu .has-sub-menu{
  position:relative;
}

.sub-menu .has-sub-menu > .sub-menu{
  top:0;
  left:100%;
  margin-left:8px;
}

/* ===== Submenu de ministerios ===== */
.ministries-menu > .sub-menu{
  top:-84px !important;
  max-height:72vh;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#18c7ff rgba(255,255,255,.08);
}

.ministries-menu > .sub-menu::-webkit-scrollbar{
  width:10px;
}

.ministries-menu > .sub-menu::-webkit-scrollbar-track{
  background:rgba(255,255,255,.06);
  border-radius:999px;
}

.ministries-menu > .sub-menu::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#17c8ff,#0aa0ff);
  border-radius:999px;
  border:2px solid rgba(5,14,38,.95);
}

.ministries-menu > .sub-menu::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#39d7ff,#18c7ff);
  border-radius:999px;
}

/* ===== Limpiar líneas del template ===== */
.menu-link::before,
.menu-link::after,
.menu-item::before,
.menu-item::after,
.links-list li::before,
.links-list li::after{
  content:none !important;
  display:none !important;
}

/* ==================================================
   MODAL MODELO DESARROLLO
================================================== */

.custom-modal{
  position:fixed;
  inset:0;
  background:rgba(2,8,25,.82);
  backdrop-filter:blur(8px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999999;
  padding:30px;
}

.custom-modal.show{
  display:flex;
}

.custom-modal-box{
  width:min(1400px,98vw);   /* antes 1100px */
  max-height:96vh;          /* antes 92vh */
  overflow:auto;
  background:linear-gradient(180deg,#07142f,#081a3e);
  border:1px solid rgba(0,191,255,.25);
  border-radius:22px;
  padding:28px;
  position:relative;
}

.custom-modal-close{
  position:absolute;
  top:14px;
  right:14px;
  width:46px;
  height:46px;
  border:0;
  border-radius:12px;
  background:#12244f;
  color:#fff;
  font-size:30px;
  cursor:pointer;
}

.custom-modal-title{
  color:#18c7ff;
  margin-bottom:18px;
}

.custom-modal-frame img{
  width:100%;
  display:block;
  border-radius:16px;
}

/* ==================================================
   MOBILE NAVBAR
================================================== */

@media (max-width:1199px){

  body{
    padding-top:92px;
  }

  .page-header.header-basic{
    height:92px !important;
    background:rgba(5,14,38,.96) !important;
  }

  .page-header .container,
  .menu-navbar{
    height:92px !important;
  }

  .menu-toggler{
    display:flex !important;
    width:46px;
    height:46px;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
    background:transparent;
  }

  .menu-toggler span{
    display:block;
    width:28px;
    height:3px;
    background:#fff;
    border-radius:999px;
    transition:.25s ease;
  }

  .menu-toggler.active span:nth-child(1){
    transform:rotate(45deg) translate(6px,6px);
  }

  .menu-toggler.active span:nth-child(2){
    opacity:0;
  }

  .menu-toggler.active span:nth-child(3){
    transform:rotate(-45deg) translate(6px,-6px);
  }

  .links.menu-wrapper{
    display:none !important;
    position:fixed !important;
    top:92px;
    left:0;
    right:0;
    width:100vw;
    height:calc(100vh - 92px);
    overflow-y:auto;
    background:#050e26;
    padding:18px;
    z-index:999998;
  }

  body.rg-menu-open .links.menu-wrapper{
    display:block !important;
  }

  body.rg-menu-open{
    overflow:hidden;
  }

  .links-list{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px;
  }

  .links.menu-wrapper .menu-link{
    width:100%;
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 18px !important;
    border-radius:16px;
    background:linear-gradient(90deg,#081230,#071637);
    border:1px solid rgba(0,191,255,.18);
    font-size:16px !important;
    font-weight:700;
    white-space:normal;
  }

  .links.menu-wrapper .menu-item.open > .menu-link,
  .links.menu-wrapper .menu-link:hover{
    background:rgba(0,191,255,.12);
    color:#18c7ff !important;
  }

  .links.menu-wrapper .sub-menu{
    display:none !important;
    position:static !important;
    width:100%;
    margin-top:8px;
    padding-left:14px;
    background:transparent !important;
    border:0;
    box-shadow:none;
  }

  .links.menu-wrapper .menu-item.open > .sub-menu{
    display:block !important;
  }

  .links.menu-wrapper .sub-menu .menu-link{
    min-height:44px;
    padding:10px 12px !important;
    font-size:14px !important;
    font-weight:600;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.06);
    border-radius:12px;
  }

  .ministries-menu > .sub-menu{
    width:100%;
    max-height:320px;
    columns:1;
  }
}
