/* ==========================================================================
   AJUSTE DE CABECERA (header)
   Problema: en pantallas de escritorio/portátil el botón "SOLICITAR SERVICIO"
   quedaba cortado o fuera de pantalla porque el contenido de la cabecera era más
   ancho que el espacio disponible.
   Solo cambia tamaños/espaciados de la cabecera. No modifica textos, enlaces,
   funciones ni datos. Archivo independiente: para revertir basta con quitar el
   <link> a header-fix.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   A) Cabecera con 8 enlaces (Inicio, Nosotros, Servicios, Sectores, Empleo,
      Preguntas Frecuentes, Hemeroteca Laboral, Solicitud) – escritorio amplio
   -------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-inner { gap: 1.5rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .brand-logo-wrap img,
  .site-header:has(.header-nav-menu > li:nth-child(8)) .brand-logo img { height: 38px !important; max-height: 38px !important; max-width: 236px !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-nav-menu { gap: 1.1rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-nav-link { font-size: .875rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-actions { gap: .7rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .btn-header-login { height: 40px !important; padding: 0 15px !important; font-size: .84rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-btn,
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-btn-desktop { font-size: .78rem !important; padding: 10px 18px !important; }
}

/* --------------------------------------------------------------------------
   B) Portátiles (1200px – 1599px): cabecera compacta, todo visible.
      Con 8 enlaces se oculta "Solicitud" (ya existe el botón "Solicitar
      Servicio" justo al lado, que lleva a la misma página).
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) and (max-width: 1599px) {
  .site-header:has(.header-nav-menu > li:nth-child(8)) .container { padding: 0 clamp(16px, 2vw, 32px) !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-inner { gap: 1rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .brand-logo-wrap { flex-shrink: 0 !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .brand-logo-wrap img,
  .site-header:has(.header-nav-menu > li:nth-child(8)) .brand-logo img { height: 34px !important; max-height: 34px !important; max-width: 212px !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-nav-menu { gap: clamp(.7rem, 1.1vw, 1.05rem) !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-nav-link { font-size: clamp(.76rem, .98vw, .86rem) !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-nav-menu > li:has(> a[href="/solicitud"]) { display: none !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-actions { gap: .5rem !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .btn-header-login { height: 38px !important; padding: 0 12px !important; font-size: .8rem !important; gap: 6px !important; }
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-btn,
  .site-header:has(.header-nav-menu > li:nth-child(8)) .header-btn-desktop { font-size: .74rem !important; padding: 9px 16px !important; }
}

/* --------------------------------------------------------------------------
   B2) Resto de páginas (7 enlaces): ya caben desde 1440px; se compactan solo
       entre 1200px y 1439px para que no se corte el botón.
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) and (max-width: 1439px) {
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .container { padding: 0 clamp(16px, 2vw, 32px) !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .header-inner { gap: 1rem !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .brand-logo-wrap { flex-shrink: 0 !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .brand-logo-wrap img,
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .brand-logo img { height: 34px !important; max-height: 34px !important; max-width: 212px !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .header-nav-menu { gap: clamp(.7rem, 1.1vw, 1.05rem) !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .header-nav-link { font-size: clamp(.76rem, .98vw, .86rem) !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .header-actions { gap: .5rem !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .btn-header-login { height: 38px !important; padding: 0 12px !important; font-size: .8rem !important; gap: 6px !important; }
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .header-btn,
  .site-header:not(:has(.header-nav-menu > li:nth-child(8))) .header-btn-desktop { font-size: .74rem !important; padding: 9px 16px !important; }
}

/* --------------------------------------------------------------------------
   C) Pantallas medias (993px – 1199px): no hay espacio para el menú completo,
      se usa el mismo menú compacto (hamburguesa) que ya existe en tablet/móvil.
   -------------------------------------------------------------------------- */
@media (min-width: 993px) and (max-width: 1199px) {
  .site-header { padding: 14px 0 !important; }
  .site-header .container { padding: 0 24px !important; }
  .site-header .header-inner { height: 44px !important; gap: 12px !important; flex-wrap: nowrap !important; }
  .site-header .brand-logo-wrap { flex-shrink: 1 !important; min-width: 0 !important; }
  .site-header .brand-logo-wrap img,
  .site-header .brand-logo img { height: 32px !important; max-height: 32px !important; max-width: 200px !important; }
  .header-nav-desktop,
  .header-btn-desktop { display: none !important; }
  .header-btn-mobile { display: inline-flex !important; }
  .mobile-menu-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 38px !important; height: 38px !important; flex-shrink: 0 !important; border: 1px solid #e2e8f0 !important; border-radius: 8px !important; background: #fff !important; padding: 0 !important; }
  .site-header .header-actions { margin-left: auto !important; gap: 8px !important; flex-shrink: 0 !important; }
  .site-header .btn-header-login { height: 36px !important; padding: 0 12px !important; font-size: .8rem !important; }
}
