/*-- -------------------------- -->
<---      Navigation Styles     -->
<--- -------------------------- -*/

/* Mobile First - Base Styles (0px and up) */
#cs-navigation {
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.5rem;
  background-color: #fff;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  position: sticky;
  z-index: 10000;
  top: 0;
}

#cs-navigation .cs-container {
  width: 100%;
  max-width: 80rem;
  margin: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem; /* Compact gap for mobile */
}

.cs-container, .main-content-container {
  max-width: 80rem;
  margin: auto;
  width: 100%;
}

/* Hamburger toggle: visible on mobile, hidden from 768px up.
   header.js toggles .cs-active here and shows/hides the .cs-ul panel. */
#cs-navigation .cs-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
  z-index: 100;
}

#cs-navigation .cs-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1rem;
}

#cs-navigation .cs-line {
  width: 100%;
  height: 2px;
  background-color: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

#cs-navigation .cs-toggle.cs-active .cs-line1 {
  transform: translateY(7px) rotate(45deg);
}

#cs-navigation .cs-toggle.cs-active .cs-line2 {
  opacity: 0;
}

#cs-navigation .cs-toggle.cs-active .cs-line3 {
  transform: translateY(-7px) rotate(-45deg);
}

#cs-navigation .cs-logo {
  width: 9rem; /* Fixed on mobile: 15% of a phone screen drew the wordmark ~8px tall */
  max-width: 12rem;
  height: 3rem; /* Smaller height for mobile */
  margin: 0 auto 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#cs-navigation .cs-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#cs-navigation .cs-nav {
  justify-content: right;
  width: auto; /* On mobile the list is an absolute panel, so the nav itself takes no row space */
  /* No auto right margin here: it would split the row's free space with the
     logo's auto margin and strand the hamburger mid-row instead of at the
     right edge. Restored for the horizontal bar at 768px+. */
  margin: 0;
  padding: 0;
  display: flex;
}

/* Mobile: the nav list is a hamburger panel dropping below the sticky
   header. Hidden by default; header.js switches it to display:flex. */
#cs-navigation .cs-ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.5rem 1.25rem 1rem;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  background-color: #fff;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  max-height: calc(100vh - 3.5rem);
  overflow-y: auto;
}

#cs-navigation .cs-li {
  list-style: none;
  padding: 0.75rem 0; /* Compact padding for mobile */
  flex: none;
}

#cs-navigation .cs-li-link {
  font-size: 0.8rem; /* Smaller font for mobile */
  font-weight: bold;
  line-height: 1.5em;
  text-decoration: none;
  margin: 0;
  color: var(--bodyTextColor);
  display: block;
  position: relative;
}

#cs-navigation .cs-li-link:hover:before {
  width: 100%;
}

#cs-navigation .cs-li-link.cs-active:before {
  width: 100%;
}

#cs-navigation .cs-li-link:before {
  content: "";
  width: 0%;
  height: 2px;
  background: var(--primary);
  opacity: 1;
  display: block;
  position: absolute;
  bottom: 0rem;
  left: 0;
  transition: width 0.3s;
}

#cs-navigation .cs-topper {
  font-size: 0.75rem; /* Smaller topper for mobile */
  line-height: 1.2em;
  text-transform: uppercase;
  text-align: inherit;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.1rem; /* Reduced margin for mobile */
  display: inline-block;
  white-space: nowrap; /* Prevent wrapping on mobile */
}

/* Login Button Styles - Mobile First */
.cs-button-6 {
  text-align: center;
  font-size: 0.8rem; /* Smaller font for mobile */
  line-height: 2.25rem; /* Smaller line height for mobile */
  text-decoration: none;
  font-weight: 700;
  min-width: 5rem; /* Much smaller for mobile */
  margin: auto;
  color: #1a1a1a;
  padding: 0 0 0 0.5rem; /* Reduced padding for mobile */
  box-sizing: border-box;
  background-color: #fff;
  display: inline-flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.5rem; /* Smaller gap for mobile */
  position: relative;
  z-index: 1;
  transition: color 0.3s, border 0.3s;
}

.cs-button-6:before {
  content: "";
  width: 0%;
  height: 100%;
  background-color: #1a1a1a;
  opacity: 1;
  position: absolute;
  display: block;
  bottom: 0;
  left: 0;
  transition: width 0.3s;
  z-index: -1;
  border-radius: 10px;
}

.cs-button-6:after {
  content: "";
  width: 100%;
  height: 100%;
  background-color: transparent;
  border: 2px solid #1a1a1a;
  box-sizing: border-box;
  opacity: 1;
  position: absolute;
  display: block;
  bottom: 0;
  right: 0;
  transition: opacity 0.3s;
  z-index: 1;
  pointer-events: none;
  border-radius: 10px;
}

.cs-button-6 .cs-wrapper {
  width: 1.75rem; /* Smaller wrapper for mobile */
  height: auto;
  background-color: #fff;
  border-left: 2px solid #1a1a1a;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  position: relative;
  transition: border 0.3s;
  border-radius: 10px;
}

.cs-button-6 .cs-wrapper:before {
  content: "";
  width: 0%;
  height: 100%;
  background-color: #dddddd;
  opacity: 1;
  position: absolute;
  display: block;
  bottom: 0;
  left: 0;
  transition: width 0.3s;
  transition-delay: 0.1s;
  z-index: -1;
  border-radius: 10px;
}

.cs-button-6 .cs-icon {
  width: 1rem; /* Smaller icon for mobile */
  height: auto;
}

.cs-button-6 .cs-icon path {
  transition: fill 0.3s;
}

.cs-button-6:hover {
  color: #fff;
}

.cs-button-6:hover:before {
  width: 100%;
}

.cs-button-6:hover:after {
  opacity: 0;
}

.cs-button-6:hover .cs-wrapper {
  border-color: #1a1a1a;
}

.cs-button-6:hover .cs-wrapper:before {
  width: 100%;
}

.cs-button-6:hover .cs-icon path {
  fill: #fff;
}

/* Dropdown arrow styles for mobile */
.cs-dropdown-arrow {
  font-size: 10px; /* Smaller arrow for mobile */
  color: #d4851c;
  transition: transform 0.3s ease;
  margin-left: 2px; /* Reduced margin for mobile */
}

.cs-dropdown:hover .cs-dropdown-arrow {
  transform: rotate(180deg);
}

/* Tablet - 768px and up */
@media only screen and (min-width: 768px) {
  #cs-navigation {
    padding: 0 1rem; /* More padding on larger screens */
  }

  #cs-navigation .cs-container {
    gap: 1rem; /* Larger gap on tablets */
  }

  #cs-navigation .cs-logo {
    width: 18%;
    max-width: 18rem;
    height: 3.5rem;
  }

  #cs-navigation .cs-toggle {
    display: none;
  }

  #cs-navigation .cs-nav {
    width: 82%;
    margin: 0 auto 0 0;
  }

  /* Restore the horizontal bar from the mobile hamburger-panel styles */
  #cs-navigation .cs-ul {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    max-height: none;
    overflow-y: visible;
    flex-wrap: wrap;
    gap: 1rem;
  }

  #cs-navigation .cs-li {
    padding: 1.25rem 0;
  }

  #cs-navigation .cs-li-link {
    font-size: 0.9rem;
  }

  #cs-navigation .cs-topper {
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
  }

  .cs-button-6 {
    font-size: 0.9rem;
    line-height: 2.75rem;
    min-width: 7rem;
    padding: 0 0 0 1rem;
    gap: 1rem;
  }

  .cs-button-6 .cs-wrapper {
    width: 2.25rem;
  }

  .cs-button-6 .cs-icon {
    width: 1.25rem;
  }

  .cs-dropdown-arrow {
    font-size: 11px;
    margin-left: 4px;
  }
}

/* Desktop - 1024px and up */
@media only screen and (min-width: 1024px) {
  #cs-navigation .cs-container {
    gap: 1.5rem; /* Full gap on desktop */
  }

  #cs-navigation .cs-logo {
    width: 20%; /* Full width on desktop */
    max-width: 21.875rem;
    height: 4.0625rem; /* Full height on desktop */
  }

  #cs-navigation .cs-nav {
    width: 80%; /* Full nav width on desktop */
  }

  #cs-navigation .cs-ul {
    gap: clamp(0.5rem, 1.2vw, 1.25rem); /* Responsive gap */
    /* Longer labels (extra nav items, Spanish translations) wrap to a
       second row instead of spilling past the viewport. */
    flex-wrap: wrap;
  }

  #cs-navigation .cs-li {
    padding: 2rem 0; /* Full padding on desktop */
  }

  #cs-navigation .cs-li-link {
    font-size: clamp(0.875rem, 1vw, 1rem); /* Responsive font */
  }

  #cs-navigation .cs-topper {
    font-size: var(--topperFontSize);
    margin-bottom: 0.25rem; /* Full margin on desktop */
    white-space: normal; /* Allow wrapping on desktop */
  }

  .cs-button-6 {
    font-size: 1rem; /* Full size on desktop */
    line-height: clamp(2.875rem, 8vw, 3.5rem);
    min-width: 10.875rem; /* Full width on desktop */
    padding: 0 0 0 1.5rem; /* Full padding on desktop */
    gap: 1.5rem; /* Full gap on desktop */
  }

  .cs-button-6 .cs-wrapper {
    width: 2.75rem; /* Full wrapper width on desktop */
  }

  .cs-button-6 .cs-icon {
    width: 1.5rem; /* Full icon size on desktop */
  }

  .cs-dropdown-arrow {
    font-size: 12px; /* Full size on desktop */
    margin-left: 5px; /* Full margin on desktop */
  }

  /* Spanish nav labels are longer; shrink them slightly so the bar keeps to
     one row at common desktop widths. English keeps the full-size styles. */
  html[lang="es"] #cs-navigation .cs-topper {
    font-size: calc(var(--topperFontSize) * 0.85);
  }

  html[lang="es"] .cs-button-6 {
    min-width: 8.75rem;
  }
}

/* Style utilities */
.cta-bold {
  font-weight: bold;
}

/* Spanish labels run ~20-30% longer than English; shrink the nav contact
   strip slightly so the bar still fits on one row. English is unaffected. */
html[lang="es"] #cs-navigation .cta-bold {
  font-size: 0.85em;
}

.line1,
.line2 {
  display: block;
}
                                  