/* Shared site header (landing pages + /producto). Markup lives between
   HEADER:START / HEADER:END in every page; keep it identical everywhere.

   Layout (all sizes):  [logo] ................ [Contáctenos] [Portal Cliente]
                        [ chip ][ chip ][ chip ][ chip ][ chip ][ chip ][ chip ]
   Desktop: chips centered in one row.  Tablet/phone: chips in a horizontal scroll bar. */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9997;
  background: rgba(17, 24, 39, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 41, 55, 0.5);
  font-family: "Raleway", sans-serif;
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4); }

.site-header__inner {
  max-width: 1536px;
  margin: 0 auto;
  padding: 10px 32px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}
.site-header__logo img { display: block; height: 72px; width: auto; }
.site-header__main { display: contents; }   /* actions and nav become rows of the header */

/* Top row, right side */
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.site-header__contact {
  color: #c084fc;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #c084fc;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}
.site-header__contact:hover { color: #d8b4fe; }
.site-header__portal {
  padding: 8px 16px;
  border: 1px solid #a855f7;
  border-radius: 8px;
  color: #fff;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header__portal:hover { background: rgba(168, 85, 247, 0.1); border-color: #c084fc; }

/* Second row: section links as bordered chips */
.site-header__nav {
  order: 3;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}
.site-header__nav a {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid #374151;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.6);
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.site-header__nav a:hover { border-color: #a855f7; color: #e9d5ff; }
.site-header__nav a.is-active {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.15);
  color: #e9d5ff;
}

/* "Contáctenos" lives next to Portal Cliente on desktop and inside the chip bar on smaller screens */
.site-header__nav .site-header__nav-contact { display: none; color: #c084fc; }

/* Tablet and phone */
@media (max-width: 1279px) {
  .site-header__inner { padding: 8px 16px 10px; gap: 8px 16px; }
  .site-header__logo img { height: 56px; }
  .site-header__actions { gap: 12px; }
  .site-header__actions .site-header__contact { display: none; }
  .site-header__nav .site-header__nav-contact { display: inline-block; }
  .site-header__nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 24px;
    /* fade on the right edge hints that the bar scrolls */
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }
  .site-header__nav::-webkit-scrollbar { display: none; }
  .site-header__nav a { scroll-snap-align: start; padding: 7px 14px; }
}

/* Wide screens: everything in one row, vertically centered: [logo] [chips…] [Contáctenos] [Portal Cliente].
   (Below 1500px the full link names don't fit in one row, so the chips go to a second row.) */
@media (min-width: 1500px) {
  .site-header__inner { flex-wrap: nowrap; padding: 10px 32px; gap: 28px; }
  .site-header__nav { order: 1; width: auto; flex: 1 1 auto; flex-wrap: nowrap; }
  .site-header__actions { order: 2; margin-left: 0; flex: 0 0 auto; }
}

/* Anchored sections must not end up hidden behind the fixed header (header.js refines it) */
html { scroll-padding-top: 150px; }
