/* ── Wrapper ──────────────────────────────────────────── */
.epilepsy-site-header-wrap {
  padding: 8px 32px;
  background: var(--color-navy);
}

/* ── Card — extends .glass-card ──────────────────────── */
.epilepsy-site-header {
  padding: 20px 48px;
  max-width: 1376px;
  margin: 0 auto;
}

/* ── Inner row ────────────────────────────────────────── */
.epilepsy-site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Left: logo + nav ─────────────────────────────────── */
.epilepsy-site-header__left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  flex: 1;
}

.epilepsy-site-header__logo-img {
  height: 75px;
  width: 90px;
  object-fit: contain;
  display: block;
}

.epilepsy-site-header__logo-placeholder {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
}

/* ── Desktop nav ──────────────────────────────────────── */
.epilepsy-site-header__nav {
  overflow: visible;
  min-width: 0;
}

.epilepsy-site-header__nav .epilepsy-nav__list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(12px, 1.5vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.epilepsy-site-header__nav .menu-item > a {
  color: var(--color-navy);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.epilepsy-site-header__nav .menu-item > a:hover {
  color: var(--color-teal-dark);
}

.epilepsy-site-header__nav .menu-item > a::after {
  content: "";
  display: block;
  height: 2px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--color-teal-dark) 0%,
    var(--color-teal-light) 50%,
    var(--color-teal-dark) 100%
  );
  background-size: 200% 100%;
  background-position: 100% 0;
  border-radius: 100px;
  transition: background-position 0.45s ease;
}

.epilepsy-site-header__nav .menu-item > a:hover::after {
  background-position: 0% 0;
}

/* ── Desktop dropdown (Forms → PDFs) ───────────────────── */
.epilepsy-site-header__nav .menu-item-has-children {
  position: relative;
}

.epilepsy-site-header__nav .menu-item-has-children > a {
  padding-right: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b3459' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 top 6px;
  background-size: 14px 14px;
  transition: background-image 0.2s ease;
}

.epilepsy-site-header__nav .menu-item-has-children:hover > a,
.epilepsy-site-header__nav .menu-item-has-children:focus-within > a {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b3459' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='18 15 12 9 6 15'/></svg>");
}

.epilepsy-site-header__nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  background: #f5f3f0;
  border-radius: 8px;
  padding: 4px;
  list-style: none;
  margin: 0;
  box-shadow: 0 12px 28px rgba(27, 52, 89, 0.12), 0 2px 6px rgba(27, 52, 89, 0.08);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  flex-direction: column;
  display: flex;
  gap: 0;
}

.epilepsy-site-header__nav .menu-item-has-children:hover > .sub-menu,
.epilepsy-site-header__nav .menu-item-has-children:focus-within > .sub-menu,
.epilepsy-site-header__nav .menu-item-has-children.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.epilepsy-site-header__nav .sub-menu .menu-item {
  border-radius: 6px;
  width: 100%;
}

.epilepsy-site-header__nav .sub-menu .menu-item > a {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  color: #1b3459;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.1504px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.epilepsy-site-header__nav .sub-menu .menu-item > a::after {
  display: none;
}

.epilepsy-site-header__nav .sub-menu .menu-item > a:hover,
.epilepsy-site-header__nav .sub-menu .menu-item > a:focus-visible {
  background-color: #e7e7e7;
  color: #1b3459;
}

.epilepsy-site-header__nav .sub-menu .menu-item.is-pdf > a {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M14 10v2.67c0 .35-.14.69-.39.94-.25.25-.59.39-.94.39H3.33c-.35 0-.69-.14-.94-.39-.25-.25-.39-.59-.39-.94V10' stroke='%2369969A' stroke-width='1.333' stroke-linecap='round' stroke-linejoin='round'/><path d='M4.67 6.67L8 10l3.33-3.33' stroke='%2369969A' stroke-width='1.333' stroke-linecap='round' stroke-linejoin='round'/><path d='M8 10V2' stroke='%2369969A' stroke-width='1.333' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px 16px;
}

/* ── Right: info + CTA ────────────────────────────────── */
.epilepsy-site-header__right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.epilepsy-site-header__info {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ── Info item — extends .info-item from style.css ───── */
.epilepsy-site-header__info-item {
  height: 36px;
}

/* ── CTA — extends .button .button--primary ──────────── */
.epilepsy-site-header__cta {
  flex-shrink: 0;
}

/* ── Quick contacts (mobile-only icon links between right block and burger) ── */
.epilepsy-site-header__quick-contacts {
  display: none;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.epilepsy-site-header__quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--color-navy-deep);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.epilepsy-site-header__quick-link:hover,
.epilepsy-site-header__quick-link:focus-visible {
  background-color: var(--color-teal-soft, rgba(123, 168, 172, 0.18));
  color: var(--color-teal-dark);
}

.epilepsy-site-header__quick-link svg {
  width: 22px;
  height: 22px;
}

/* ── Burger button (hidden on desktop) ────────────────── */
.epilepsy-site-header__burger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.epilepsy-site-header__burger span {
  display: block;
  position: absolute;
  width: 24px;
  height: 3px;
  background: var(--color-navy-deep);
  border-radius: 1.25px;
  left: 8px;
}

.epilepsy-site-header__burger span:nth-child(1) {
  top: 11px;
}
.epilepsy-site-header__burger span:nth-child(2) {
  top: 19px;
}
.epilepsy-site-header__burger span:nth-child(3) {
  top: 27px;
}

/* ── Mobile menu overlay ──────────────────────────────── */
.epilepsy-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.25s,
    visibility 0.25s;
  pointer-events: none;
}

.epilepsy-mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

.epilepsy-mobile-menu__panel {
  background: var(--color-surface);
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ── Mobile menu top bar ──────────────────────────────── */
.epilepsy-mobile-menu__topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(
    90deg,
    var(--color-navy) 0%,
    var(--color-navy-dark) 100%
  );
  color: var(--color-white-90);
  white-space: nowrap;
  flex-shrink: 0;
}

.epilepsy-mobile-menu__topbar svg {
  flex-shrink: 0;
}

/* ── Mobile header — extends .glass-card ─────────────── */
.epilepsy-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  margin: 8px 16px;
}

.epilepsy-mobile-menu__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.epilepsy-mobile-menu__nav-slot {
  padding: 8px 16px;
}

.epilepsy-mobile-menu__nav-slot .epilepsy-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.epilepsy-mobile-menu__nav-slot .menu-item {
  border-bottom: 1px solid var(--color-border);
  width: 100%;
}

.epilepsy-mobile-menu__nav-slot .menu-item > a {
  display: block;
  color: var(--color-navy-deep);
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  padding: 18px 4px;
  text-decoration: none;
  width: 100%;
}

.epilepsy-mobile-menu__nav-slot .menu-item > a::after {
  display: none;
}

/* ── Mobile accordion (Forms → PDFs) ──────────────────── */
.epilepsy-mobile-menu__nav-slot .menu-item-has-children > a {
  position: relative;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b3459' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 16px 16px;
  transition: background-image 0.2s ease;
}

.epilepsy-mobile-menu__nav-slot .menu-item-has-children.is-open > a {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b3459' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='18 15 12 9 6 15'/></svg>");
}

.epilepsy-mobile-menu__nav-slot .menu-item-has-children.is-open {
  border-bottom: none;
}

.epilepsy-mobile-menu__nav-slot .sub-menu {
  list-style: none;
  margin: 0;
  padding: 4px;
  background: #fbfbfd;
  border-radius: 8px;
  flex-direction: column;
  gap: 4px;
  display: none;
}

.epilepsy-mobile-menu__nav-slot .menu-item-has-children.is-open > .sub-menu {
  display: flex;
}

.epilepsy-mobile-menu__nav-slot .sub-menu .menu-item {
  border-bottom: none;
  border-radius: 6px;
}

.epilepsy-mobile-menu__nav-slot .sub-menu .menu-item > a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: #1b3459;
  text-decoration: none;
  border-radius: 6px;
}

.epilepsy-mobile-menu__nav-slot .sub-menu .menu-item.is-pdf > a::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M14 10v2.67c0 .35-.14.69-.39.94-.25.25-.59.39-.94.39H3.33c-.35 0-.69-.14-.94-.39-.25-.25-.39-.59-.39-.94V10' stroke='%2369969A' stroke-width='1.333' stroke-linecap='round' stroke-linejoin='round'/><path d='M4.67 6.67L8 10l3.33-3.33' stroke='%2369969A' stroke-width='1.333' stroke-linecap='round' stroke-linejoin='round'/><path d='M8 10V2' stroke='%2369969A' stroke-width='1.333' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

.epilepsy-mobile-menu__cta-wrap {
  padding: 16px 16px 0;
  display: flex;
  justify-content: center;
}

.epilepsy-mobile-menu__info {
  margin-top: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Tablet (1280px → hide emergency info) ────────────── */
@media (max-width: 1279px) {
  .epilepsy-site-header {
    padding: 16px 32px;
  }
}

@media (max-width: 1023px) {
  .epilepsy-site-header__info {
    display: none;
  }

  .epilepsy-site-header__right {
    gap: 0;
  }
}

/* ── Mobile (< 768px) ─────────────────────────────────── */
@media (max-width: 767px) {
  .epilepsy-site-header-wrap {
    padding: 8px 16px;
  }

  .epilepsy-site-header {
    padding: 4px 16px;
  }

  .epilepsy-site-header__nav,
  .epilepsy-site-header__right {
    display: none;
  }

  .epilepsy-site-header__quick-contacts {
    display: inline-flex;
  }

  .epilepsy-site-header__burger {
    display: block;
  }
}

body.epilepsy-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
