/* ══════════════════════════════════════════════════════════════
   menu.css — Servicios DEMO Seguridad Privada
   Estilos: Banner superior + Barra de navegación
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ── Variables globales ── */
:root {
  --c-primary: #4146A6;
  --c-dark: #3B3F8C;
  --c-deeper: #3E4095;
  --c-navy: #3B3F8C;
  --c-accent: #62D9D9;
  --c-accent-dk: #3eb8b8;
  --c-light: #F2F2F2;
  --c-white: #ffffff;
  --c-text: #2f3374;
  --c-muted: #6b6f93;
  --c-bg: #F2F2F2;
  --c-border: #d9ddf0;

  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;

  --banner-h: 108px;
  --nav-h: 68px;
  --nav-bg: rgba(255, 255, 255, .96);
  --nav-hover-bg: #eef2fb;
  --nav-border: rgba(65, 70, 166, .12);

  --shadow-sm: 0 2px 8px rgba(26, 29, 74, .10);
  --shadow-md: 0 6px 24px rgba(26, 29, 74, .13);
  --shadow-lg: 0 16px 48px rgba(26, 29, 74, .18);
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 200ms ease;
}

/* ── Reset base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--c-primary);
  text-decoration: none;
}

/* ════════════════════════════════════════════════════
   BANNER SUPERIOR — Logo + nombre empresa
   ════════════════════════════════════════════════════ */
.site-banner {
  width: 100%;
  height: var(--banner-h);
  background:
    radial-gradient(circle at top right, rgba(98, 217, 217, .18) 0%, rgba(98, 217, 217, 0) 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fe 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Patrón de puntos diagonal — fondo sutil */
.site-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(65, 70, 166, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 70, 166, .04) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .22) 100%);
}

/* Línea inferior de acento */
.site-banner::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-deeper) 45%, var(--c-accent) 100%);
}

.banner-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 0 2.5rem;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

.banner-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
}

.banner-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(65, 70, 166, .12));
  flex-shrink: 0;
}

.banner-logo-placeholder {
  height: 50px;
  width: 50px;
  background: rgba(98, 217, 217, .12);
  border: 2px solid rgba(98, 217, 217, .35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: .06em;
  flex-shrink: 0;
}

.banner-brand {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}

.banner-overline {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-deeper);
}

.banner-brand-name {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: none;
}

.banner-brand-name span {
  color: var(--c-primary);
}

.banner-brand-subline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-muted);
  max-width: 640px;
}

.banner-brand-tagline {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(62, 64, 149, .72);
  margin-top: .4rem;
}

.banner-cert-strip {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .55rem;
  padding: .9rem 0 .9rem 1.5rem;
  border-left: 1px solid rgba(65, 70, 166, .10);
}

.banner-cert-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-deeper);
}

.banner-cert-list {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.banner-cert-list img {
  height: 52px;
  width: auto;
  object-fit: contain;
  opacity: .94;
  padding: .45rem;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(65, 70, 166, .08);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(65, 70, 166, .08);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.banner-cert-list img:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(65, 70, 166, .12);
}

/* ════════════════════════════════════════════════════
   BARRA DE NAVEGACIÓN — Debajo del banner
   ════════════════════════════════════════════════════ */
.site-nav {
  width: 100%;
  background: var(--nav-bg);
  border-top: 1px solid rgba(65, 70, 166, .06);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(12, 19, 48, .08);
}

.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  height: var(--nav-h);
}

.nav-mobile-logo {
  display: none;
}

.nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex: 0 1 auto;
  list-style: none;
  gap: .35rem;
}

/* ── Ítems del menú ── */
.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.2rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-text);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  min-height: 100%;
}

.nav-link:hover,
.nav-link.active {
  background: var(--nav-hover-bg);
  color: var(--c-primary);
  border-bottom-color: var(--c-accent);
}

.nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(65, 70, 166, .06);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  border: none;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.nav-toggle svg {
  width: 10px;
  height: 6px;
  transition: transform var(--transition);
}

/* ── Dropdown ── */
.dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 250px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(65, 70, 166, .12);
  border-top: 2px solid var(--c-accent);
  border-radius: 0 0 10px 10px;
  list-style: none;
  padding: .45rem 0;
  box-shadow: 0 20px 40px rgba(18, 25, 56, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  max-height: 440px;
  overflow-y: auto;
}

.dropdown::-webkit-scrollbar {
  width: 3px;
}

.dropdown::-webkit-scrollbar-thumb {
  background: var(--c-accent);
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1.1rem;
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 600;
  color: var(--c-text);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.dropdown a::before {
  content: '›';
  color: var(--c-accent);
  font-size: .9rem;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition);
}

.dropdown a:hover {
  background: rgba(65, 70, 166, .06);
  color: var(--c-primary);
  border-left-color: var(--c-accent);
  padding-left: 1.5rem;
}

.dropdown a:hover::before {
  opacity: 1;
}

/* Show on hover — desktop */
@media (min-width: 1024px) {

  .nav-item:hover .dropdown,
  .nav-item:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item:hover .nav-toggle svg,
  .nav-item:focus-within .nav-toggle svg {
    transform: rotate(180deg);
  }
}

/* ── Hamburger (mobile) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 1rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform .28s ease, opacity .28s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-inner {
    position: relative;
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    padding: 0;
    gap: 0;
  }

  /* Nav logo mobile */
  .nav-mobile-logo {
    display: flex !important;
    align-items: center;
    padding: 0 1rem;
    height: var(--nav-h);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .08em;
    color: var(--c-primary);
    text-transform: uppercase;
  }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: .45rem 0 .7rem;
    border-top: 1px solid rgba(65, 70, 166, .12);
    background: rgba(255, 255, 255, .98);
    /* Sin scroll propio: deja que el body/página haga el scroll
       y el submenú abierto haga su propio scroll interno */
  }

  .nav-list.open {
    display: flex;
  }

  .nav-item {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    justify-content: flex-start;
    padding: .85rem 1.2rem;
    border-bottom: none;
    margin-bottom: 0;
    min-height: auto;
  }

  .nav-link:hover {
    border-bottom: none;
  }

  .nav-item[id^="dd"] {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .nav-item[id^="dd"] .dropdown {
    grid-column: 1 / -1;
  }

  .nav-toggle {
    display: inline-flex;
    width: 52px;
    color: var(--c-primary);
  }

  .nav-toggle:hover {
    background: rgba(65, 70, 166, .05);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: hidden;
    transform: none;
    max-height: 0;
    overflow: hidden;
    border: none;
    border-top: 1px solid rgba(65, 70, 166, .08);
    border-radius: 0;
    box-shadow: none;
    background: rgba(65, 70, 166, .03);
    transition: max-height .3s ease, visibility .3s;
    padding: 0;
  }

  .nav-item.dd-open .dropdown {
    visibility: visible;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: .3rem 0;
  }

  /* Scrollbar visible y delgado para el submenú móvil */
  .nav-item.dd-open .dropdown::-webkit-scrollbar {
    width: 6px;
  }
  .nav-item.dd-open .dropdown::-webkit-scrollbar-track {
    background: rgba(65, 70, 166, .06);
  }
  .nav-item.dd-open .dropdown::-webkit-scrollbar-thumb {
    background: var(--c-accent);
    border-radius: 3px;
  }

  .nav-item.dd-open .nav-toggle svg {
    transform: rotate(180deg);
  }

  .dropdown a {
    padding-left: 2rem;
  }
}

@media (max-width: 1023px) {
  .banner-cert-strip {
    display: none;
  }

  .banner-inner {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .banner-logo {
    height: 58px;
  }

  .banner-overline {
    font-size: .68rem;
    letter-spacing: .16em;
  }
}

@media (max-width: 600px) {
  .site-banner {
    height: auto;
    min-height: 110px;
    padding: 1.2rem 0;
  }

  .banner-inner {
    grid-template-columns: 1fr;
    padding: 0 1rem;
    text-align: center;
  }

  .banner-mark {
    min-width: 0;
  }

  .banner-logo {
    height: 53px;
    margin: 0 auto;
  }

  .banner-overline {
    letter-spacing: .14em;
  }

  .banner-brand-name {
    font-size: 1.4rem;
  }

  .banner-brand-subline {
    font-size: .9rem;
  }

  .banner-brand-tagline {
    letter-spacing: .12em;
    font-size: .72rem;
  }
}

/* ════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════ */
.site-footer {
  background: var(--c-navy);
  border-top: 4px solid var(--c-accent);
  color: rgba(242, 242, 242, .72);
  font-family: var(--font-body);
}

.footer-top {
  max-width: 1300px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .22));
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: .05em;
  margin-bottom: .5rem;
}

.footer-brand p {
  font-size: .82rem;
  line-height: 1.7;
  color: rgba(242, 242, 242, .5);
  max-width: 270px;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(98, 217, 217, .2);
}

.footer-col ul {
  list-style: none;
}

.footer-col li+li {
  margin-top: .4rem;
}

.footer-col a {
  font-size: .81rem;
  color: rgba(242, 242, 242, .55);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.footer-col a::before {
  content: '›';
  color: var(--c-accent);
}

.footer-col a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: rgba(242, 242, 242, .35);
}

.footer-bottom strong {
  color: rgba(242, 242, 242, .55);
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    padding: 2rem 1rem;
    gap: 1.5rem;
  }

  .footer-bottom {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }
}

/* -- Usuario logueado en el navbar -- */
.nav-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

.nav-user-name {
  font-size: .82rem;
  color: #fff;
  opacity: .9;
  padding: 0 .4rem;
  white-space: nowrap;
}

.nav-link--admin {
  background: rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: .35rem .8rem !important;
}

.nav-link--admin:hover {
  background: rgba(255, 255, 255, .25);
}

.nav-link--logout {
  background: #c62828;
  color: #fff !important;
  border-radius: 6px;
  padding: .35rem .8rem !important;
  font-weight: 600;
  transition: background .2s;
}

.nav-link--logout:hover {
  background: #ef4444;
}

@media (max-width: 1024px) {
  .nav-user {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: .5rem 1rem;
  }

  .nav-user-name {
    padding: .3rem 0;
  }
}

/* === Usuario logueado en el navbar === */
.nav-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

.nav-user-name {
  font-size: .82rem;
  color: #fff;
  opacity: .9;
  padding: 0 .4rem;
  white-space: nowrap;
}

.nav-link--admin {
  background: rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: .35rem .8rem !important;
}

.nav-link--admin:hover {
  background: rgba(255, 255, 255, .25);
}

.nav-link--logout {
  background: #c62828;
  color: #fff !important;
  border-radius: 6px;
  padding: .35rem .8rem !important;
  font-weight: 600;
  transition: background .2s;
}

.nav-link--logout:hover {
  background: #ef4444;
}

@media (max-width: 1024px) {
  .nav-user {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: .5rem 1rem;
  }

  .nav-user-name {
    padding: .3rem 0;
  }
}

/* === Usuario logueado en el navbar === */
.nav-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

.nav-user-name {
  font-size: .82rem;
  color: #fff;
  opacity: .9;
  padding: 0 .4rem;
  white-space: nowrap;
}

.nav-link--admin {
  background: rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: .35rem .8rem !important;
}

.nav-link--admin:hover {
  background: rgba(255, 255, 255, .25);
}

.nav-link--logout {
  background: #c62828;
  color: #fff !important;
  border-radius: 6px;
  padding: .35rem .8rem !important;
  font-weight: 600;
  transition: background .2s;
}

.nav-link--logout:hover {
  background: #ef4444;
}

@media (max-width: 1024px) {
  .nav-user {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: .5rem 1rem;
  }

  .nav-user-name {
    padding: .3rem 0;
  }
}

/* === Usuario logueado en el navbar === */
.nav-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

.nav-user-name {
  font-size: .82rem;
  color: #fff;
  opacity: .9;
  padding: 0 .4rem;
  white-space: nowrap;
}

.nav-link--admin {
  background: rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: .35rem .8rem !important;
}

.nav-link--admin:hover {
  background: rgba(255, 255, 255, .25);
}

.nav-link--logout {
  background: #c62828;
  color: #fff !important;
  border-radius: 6px;
  padding: .35rem .8rem !important;
  font-weight: 600;
  transition: background .2s;
}

.nav-link--logout:hover {
  background: #ef4444;
}

@media (max-width: 1024px) {
  .nav-user {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: .5rem 1rem;
  }

  .nav-user-name {
    padding: .3rem 0;
  }
}

/* Separador dentro de los dropdowns del navbar */
.dropdown .dropdown-sep {
  height: 1px;
  padding: 0;
  margin: .35rem .75rem;
  background: rgba(255, 255, 255, .18);
  list-style: none;
}

@media (max-width: 1024px) {
  .dropdown .dropdown-sep {
    background: rgba(0, 0, 0, .08);
  }
}