
/* =========================================
   ENCABEZADO Y NAVEGACIÓN - TECNOSALUD
========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 82px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(16, 91, 104, 0.08);
  box-shadow: 0 3px 18px rgba(22, 65, 78, 0.04);
  backdrop-filter: blur(12px);
}

.site-header,
.site-header * {
  box-sizing: border-box;
}

.site-header .nav-wrap {
  display: flex;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

/* LOGOTIPO */

.site-header .brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-header .brand img {
  display: block;
  width: 228px;
  max-width: 100%;
  max-height: 54px;
  object-fit: contain;
}

.site-header .brand-fallback {
  font: 800 1.85rem Montserrat, sans-serif;
  letter-spacing: -0.07em;
  color: var(--teal, #32b5be);
}

.site-header .brand-fallback span {
  color: var(--orange, #ed8b35);
}

/* MENÚ PRINCIPAL */

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 32px);
}

.site-header .nav-links > a,
.site-header .nav-parent > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 30px 0 27px;
  color: #354650;
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* SUBRAYADO NARANJA */

.site-header .nav-links > a::after,
.site-header .nav-parent > a::after {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--orange, #ed8b35);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-header .nav-links > a:hover,
.site-header .nav-parent > a:hover,
.site-header .nav-links > a.active {
  color: var(--teal-dark, #32b5be);
}

.site-header .nav-links > a:hover::after,
.site-header .nav-parent > a:hover::after,
.site-header .nav-links > a.active::after {
  transform: scaleX(1);
}

/* ELEMENTOS CON SUBMENÚ */

.site-header .nav-item {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
}

.site-header .nav-parent {
  display: flex;
  align-items: center;
  gap: 7px;
}

.site-header .submenu-toggle {
  display: inline-flex;
  width: 22px;
  height: 30px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #354650;
  cursor: pointer;
}

.site-header .submenu-arrow {
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.site-header .submenu-open .submenu-arrow {
  transform: translateY(2px) rotate(225deg);
}

/* SUBMENÚ DESPLEGABLE */

.site-header .submenu {
  position: absolute;
  top: 100%;
  left: -18px;
  z-index: 1100;
  display: none;
  min-width: 245px;
  padding: 8px 0;
  background: #fff;
  border-top: 3px solid var(--orange, #ed8b35);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(22, 65, 78, 0.14);
}

.site-header .submenu a {
  display: block;
  padding: 12px 18px;
  color: #354650;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-header .submenu a::after {
  display: none;
}

.site-header .submenu a:hover {
  color: var(--teal-dark, #32b5be);
  background: #f0f8f8;
}

/* SUBMENÚ EN COMPUTADORAS */

@media (min-width: 901px) {
  .site-header .nav-item:hover > .submenu,
  .site-header .nav-item:focus-within > .submenu,
  .site-header .nav-item.submenu-open > .submenu {
    display: block;
  }
}

/* BOTÓN HAMBURGUESA */

.site-header .menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--teal-dark, #126c75);
  cursor: pointer;
}

.site-header .menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header .menu-toggle.active span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.site-header .menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.site-header .menu-toggle.active span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

/* TABLET Y MÓVIL */


@media (max-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    height: 82px;
  }

  .site-header .nav-wrap {
    position: relative;
    height: 82px;
  }

  .site-header .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10001;
    font-size: 30px;
    cursor: pointer;
  }

  .site-header .nav-links {
    position: absolute !important;
    top: 82px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 12px 22px 24px !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    border-top: 1px solid #e5e5e5;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: 10000;
  }

  .site-header .nav-links.open {
    display: flex !important;
  }

  .site-header .nav-links > li {
    display: block;
    width: 100%;
  }

  .site-header .nav-links a {
    display: block;
    width: 100%;
    padding: 15px 0 !important;
    white-space: normal;
  }

  .site-header .nav-links a::after {
    display: none;
  }

  .site-header .submenu {
    display: none;
    position: static !important;
    width: 100%;
    padding: 0 0 0 15px;
    box-shadow: none;
    background: #f7f9fa;
  }

  .site-header .has-submenu.submenu-open .submenu {
    display: block !important;
  }
}


/* TELÉFONOS PEQUEÑOS */

@media (max-width: 380px) {
  .site-header .nav-wrap {
    padding: 0 12px;
  }

  .site-header .brand img {
    width: 170px;
  }
}

