/* ================================================
   NAVBAR.CSS — Urgency bar, navegación corporativa y mega-menu
   Proyecto: SmartDaga Landing
   Autor: e-DAGA Systems
================================================ */

/* ── Urgency bar ── */
#ubar { background: var(--orange); padding: .45rem 1rem; text-align: center; font-size: .78rem; font-weight: 700; color: #fff; letter-spacing: .03em; position: relative; }
#ubar a { color: #fff; text-decoration: underline; margin-left: .4rem; }
#ubar-close { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: rgba(255,255,255,.75); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 .25rem; }

/* ── Navbar ── */
#nav { position: sticky; top: 0; z-index: 100; background: var(--navy); transition: box-shadow .3s; }
#nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.25); }
.nav-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 75px; width: auto; mix-blend-mode: screen; }

/* ── Links de escritorio ── */
.nav-links { display: flex; align-items: center; gap: .15rem; }
.nl { color: rgba(255,255,255,.78); text-decoration: none; font-size: .875rem; font-weight: 500; padding: .45rem .75rem; border-radius: 8px; transition: background .2s, color .2s; white-space: nowrap; }
.nl:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ── Dropdown "Soluciones" ── */
.nav-dropdown { position: relative; }
.nd-btn { background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: .3rem; font-family: var(--font-main); }
.nd-btn svg { transition: transform .25s; flex-shrink: 0; opacity: .7; }
.nav-dropdown.open .nd-btn svg { transform: rotate(180deg); opacity: 1; }

/* Mega-menu panel */
.mega-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.06);
  padding: 1.25rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem 1.25rem;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.nav-dropdown.open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity .2s, transform .2s, visibility 0s 0s;
}
.mega-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 6px;
  background: #fff;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.mega-col-title { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9CA3AF; padding: .3rem .5rem .55rem; }
.mega-link { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .5rem; border-radius: 10px; text-decoration: none; transition: background .15s; }
.mega-link:hover { background: var(--bg2); }
.mega-ico { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(10,36,99,.07); border-radius: 8px; flex-shrink: 0; color: var(--navy); margin-top: 1px; }
.mega-link-name { display: block; font-size: .84rem; font-weight: 600; color: var(--dark); line-height: 1.3; }
.mega-link-desc { display: block; font-size: .72rem; color: #6B7280; margin-top: .1rem; line-height: 1.35; }
.mega-divider { grid-column: 1 / -1; height: 1px; background: var(--border); margin: .5rem 0; }

/* ── CTAs escritorio ── */
.nav-acts { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.btn-login { color: rgba(255,255,255,.65); font-size: .78rem; font-weight: 600; text-decoration: none; padding: .35rem .8rem; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; transition: all .2s; white-space: nowrap; }
.btn-login:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); color: #fff; }
.btn-demo-nav { background: var(--green); color: #fff; font-size: .8rem; font-weight: 700; padding: .45rem 1.1rem; border-radius: 8px; text-decoration: none; transition: background .2s; white-space: nowrap; }
.btn-demo-nav:hover { background: var(--green2); }

/* ── Burger + menú móvil ── */
#burger { display: none; background: none; border: none; cursor: pointer; padding: .35rem; color: #fff; }
#mobileMenu { display: none; background: var(--navy); border-top: 1px solid rgba(255,255,255,.08); padding: .75rem 1.25rem 1rem; }
#mobileMenu.open { display: block; }
#mobileMenu > a { display: block; padding: .55rem .5rem; color: rgba(255,255,255,.8); font-size: .9rem; font-weight: 500; text-decoration: none; border-radius: 8px; }
#mobileMenu > a:hover { background: rgba(255,255,255,.07); color: #fff; }

/* Mobile: acordeón Soluciones */
.mm-accordion-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .55rem .5rem; background: none; border: none; color: rgba(255,255,255,.8); font-size: .9rem; font-weight: 500; cursor: pointer; font-family: var(--font-main); border-radius: 8px; }
.mm-accordion-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.mm-accordion-btn svg { transition: transform .25s; opacity: .6; flex-shrink: 0; }
.mm-accordion-btn.open svg { transform: rotate(180deg); opacity: 1; }
.mm-accordion-body { display: none; padding-left: 1rem; }
.mm-accordion-body.open { display: block; }
.mm-accordion-body a { display: block; padding: .45rem .5rem; color: rgba(255,255,255,.6); font-size: .85rem; text-decoration: none; border-radius: 6px; }
.mm-accordion-body a:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.06); }

.mm-demo { background: var(--green) !important; color: #fff !important; text-align: center; font-weight: 700 !important; margin-top: .4rem; }
