/* ==========================================================================
   SOLUCIONES HOSPITALARIAS — NAVIGATION SYSTEM (REFINED)
   Versión: 2.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. HEADER PRINCIPAL (STICKY MINIMALISTA DISCRETO)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   01. HEADER PRINCIPAL (BARRA AZUL NOCHE CRISTALINA & STICKY ELEGANTE)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-header);
  background-color: rgba(3, 20, 48, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56, 182, 255, 0.18);
  padding: 1.1rem 0;
  transition: 
    background-color var(--duration-normal) var(--ease-natural),
    backdrop-filter var(--duration-normal) var(--ease-natural),
    box-shadow var(--duration-normal) var(--ease-natural),
    transform var(--duration-normal) var(--ease-natural),
    padding var(--duration-normal) var(--ease-natural);
  will-change: transform, background-color, box-shadow;
}

/* Header con Scroll Activo (Azul Noche Profundo con Resplandor Cristalino) */
.site-header.scrolled {
  background-color: rgba(2, 12, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 182, 255, 0.3);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  padding: 0.75rem 0;
}

/* Ocultamiento Inteligente al Scroll Down */
.site-header.header-hidden {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* --------------------------------------------------------------------------
   02. LOGO EN HEADER
   -------------------------------------------------------------------------- */
.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  z-index: 10;
  transition: opacity var(--duration-fast) var(--ease-natural);
}

.brand-link:hover {
  opacity: 0.88;
}

.brand-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Renderizado blanco impoluto para máximo contraste */
  transition: height var(--duration-fast) var(--ease-natural);
}

.site-header.scrolled .brand-logo-img {
  height: 32px;
}

/* --------------------------------------------------------------------------
   03. ENLACES DE NAVEGACIÓN DESKTOP
   -------------------------------------------------------------------------- */
.nav-menu-desktop {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.8rem);
}

.nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #FFFFFF; /* Texto blanco impoluto */
  text-decoration: none;
  position: relative;
  padding: 0.45rem 0;
  letter-spacing: var(--letter-spacing-wide);
  opacity: 0.9;
  transition: opacity var(--duration-fast) var(--ease-natural), color var(--duration-fast) var(--ease-natural);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand-cyan);
  box-shadow: 0 0 10px var(--color-brand-cyan);
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-normal) var(--ease-natural);
}

.nav-link:hover {
  opacity: 1;
  color: var(--color-brand-cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.active {
  opacity: 1;
  color: var(--color-brand-cyan);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   04. ACCIONES DEL HEADER (WHATSAPP & TOGGLE MÓVIL)
   -------------------------------------------------------------------------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.btn-nav-whatsapp {
  padding: 0.55rem 1.2rem;
  font-size: var(--text-xs);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* Botón Hamburguesa Móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  z-index: calc(var(--z-drawer) + 10);
  transition: background-color var(--duration-fast) var(--ease-natural);
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: #FFFFFF;
  border-radius: var(--radius-pill);
  transition: transform var(--duration-normal) var(--ease-natural), opacity var(--duration-fast) var(--ease-natural);
}

.hamburger-line + .hamburger-line {
  margin-top: 5px;
}

.menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   05. MOBILE DRAWER OVERLAY
   -------------------------------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(2, 10, 24, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-natural), visibility var(--duration-normal) var(--ease-natural);
}

.mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: #041732;
  border-left: 1px solid rgba(56, 182, 255, 0.25);
  padding: 6rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-natural);
}

.mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.mobile-nav-link {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  display: inline-block;
  transition: color var(--duration-fast) var(--ease-natural), transform var(--duration-fast) var(--ease-natural);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--color-brand-cyan);
  transform: translateX(6px);
}

.mobile-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-6);
}

.mobile-contact-info {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--line-height-relaxed);
}

/* --------------------------------------------------------------------------
   06. RESPONSIVE BREAKPOINT
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .nav-menu-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}
