/* ═══════════════════════════════════════════════════════════════════════════
   Cosmos Menu — 3 layouts: horizontal, centered, split
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Base Reset ─────────────────────────────────────────────────────────── */

.cosmos-menu {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.cosmos-menu__inner {
  display: flex;
  align-items: center;
  max-width: var(--website-max-width, 1280px);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
}

/* ─── Brand ──────────────────────────────────────────────────────────────── */

.cosmos-menu__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.cosmos-menu__icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.cosmos-menu__brand-text {
  display: flex;
  flex-direction: column;
}

.cosmos-menu__title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}

.cosmos-menu__subtitle {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.2;
}

/* ─── Links ──────────────────────────────────────────────────────────────── */

.cosmos-menu__links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.cosmos-menu__links li a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.cosmos-menu__links li a:hover {
  background: #f3f4f6;
  color: #111;
}

.cosmos-menu__links li a.cosmos-menu__link--active {
  background: #f3f4f6;
  color: #111;
  font-weight: 600;
}

/* ─── CTA ────────────────────────────────────────────────────────────────── */

.cosmos-menu__cta a {
  display: inline-block;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #111;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.cosmos-menu__cta a:hover {
  background: #333;
}

/* ─── Hamburger (hidden on desktop) ──────────────────────────────────────── */

.cosmos-menu__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: auto;
}

.cosmos-menu__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.cosmos-menu__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.cosmos-menu__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.cosmos-menu__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Mobile Panel (hidden by default) ───────────────────────────────────── */

.cosmos-menu__mobile {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.cosmos-menu__mobile[hidden] {
  display: none !important;
}

.cosmos-menu__mobile:not([hidden]) {
  display: flex;
}

.cosmos-menu__mobile-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cosmos-menu__mobile-links li a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
}

.cosmos-menu__mobile-links li a:hover,
.cosmos-menu__mobile-links li a.cosmos-menu__link--active {
  color: #111;
}

.cosmos-menu__mobile-cta {
  margin-top: 16px;
}

.cosmos-menu__mobile-cta a {
  display: block;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #111;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Layout: horizontal (default)
   Brand left, links center, CTA right
   ═══════════════════════════════════════════════════════════════════════════ */

[data-menu-layout="horizontal"] .cosmos-menu__inner {
  justify-content: space-between;
}

[data-menu-layout="horizontal"] .cosmos-menu__links {
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Layout: centered
   Brand centered on top row, links centered below
   ═══════════════════════════════════════════════════════════════════════════ */

[data-menu-layout="centered"] .cosmos-menu__inner {
  flex-wrap: wrap;
  justify-content: center;
  height: auto;
  padding-top: 16px;
  padding-bottom: 12px;
  gap: 4px;
}

[data-menu-layout="centered"] .cosmos-menu__brand {
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

[data-menu-layout="centered"] .cosmos-menu__brand-text {
  align-items: center;
}

[data-menu-layout="centered"] .cosmos-menu__links {
  justify-content: center;
}

[data-menu-layout="centered"] .cosmos-menu__cta {
  margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Layout: split
   Brand left, links + CTA right inline
   ═══════════════════════════════════════════════════════════════════════════ */

[data-menu-layout="split"] .cosmos-menu__inner {
  justify-content: space-between;
}

[data-menu-layout="split"] .cosmos-menu__links {
  margin-left: auto;
  margin-right: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive — Mobile (<768px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .cosmos-menu__links,
  .cosmos-menu__cta {
    display: none;
  }

  .cosmos-menu__hamburger {
    display: flex;
  }

  /* All layouts collapse to split style on mobile */
  .cosmos-menu__inner {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    padding-top: 0;
    padding-bottom: 0;
    gap: 0;
  }

  .cosmos-menu__brand {
    flex-direction: row !important;
    width: auto !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .cosmos-menu__brand-text {
    align-items: flex-start !important;
  }
}
