/* Public site header: full-width bar, mega menus, mobile drawer. */

:root {
  --sh-gap: 14px;
  --sh-h: 68px;
  --sh-offset: var(--sh-h);
  --sh-navy: #1e3a8a;
  --sh-ink: #0f172a;
  --sh-text: #1e293b;
  --sh-muted: #64748b;
  --sh-orange: #f97316;
  --sh-orange-dark: #ea580c;
  --sh-line: #e2e8f0;
  --sh-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
  margin-top: var(--sh-offset);
}

.is-home .main-content {
  margin-top: 0;
}

.is-home .hero-section {
  padding-top: calc(var(--sh-offset) + 1.5rem);
}

/* ---------- Bar ---------- */

.sh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--sh-line);
  font-family: "Roboto", Arial, sans-serif;
  transition: box-shadow 0.3s var(--sh-ease);
}

.sh.is-scrolled {
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.25);
}

.sh-bar {
  position: relative;
  max-width: 1320px;
  height: var(--sh-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
}

.sh-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.sh-logo img {
  display: block;
  width: 160px;
  height: auto;
}

/* ---------- Desktop nav ---------- */

.sh-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.sh-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sh-text);
  font: 500 0.95rem/1 "Roboto", Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.sh-link:hover,
.sh-link:focus-visible,
.sh-item.is-open > .sh-link {
  background: rgba(30, 58, 138, 0.07);
  color: var(--sh-navy);
  text-decoration: none;
}

.sh-link:focus-visible,
.sh-btn:focus-visible,
.sh-phone:focus-visible,
.sh-burger:focus-visible,
.sh-mega-link:focus-visible {
  outline: 2px solid var(--sh-orange);
  outline-offset: 2px;
}

.sh-link.is-active {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
  font-weight: 600;
}

.sh-caret {
  font-size: 0.62rem;
  transition: transform 0.25s var(--sh-ease);
}

.sh-item.is-open .sh-caret {
  transform: rotate(180deg);
}

/* ---------- Mega menu ---------- */

.sh-mega {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(640px, calc(100vw - var(--sh-gap) * 2));
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 22px;
  box-shadow: 0 32px 64px -24px rgba(15, 23, 42, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s var(--sh-ease),
    visibility 0.2s;
}

.sh-mega--compact {
  width: min(400px, calc(100vw - var(--sh-gap) * 2));
}

.sh-mega--compact .sh-mega-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* Hover bridge across the gap between bar and panel */
.sh-mega::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.sh-item.is-open .sh-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.sh-mega-main {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.sh-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem;
}

.sh-mega-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  color: var(--sh-ink);
  text-decoration: none;
  transition: background 0.18s ease;
}

.sh-mega-link:hover {
  background: #f8fafc;
  color: var(--sh-ink);
  text-decoration: none;
}

.sh-mega-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(30, 58, 138, 0.08);
  color: var(--sh-navy);
  font-size: 1rem;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.sh-mega-link:hover .sh-mega-icon,
.sh-mega-link.is-active .sh-mega-icon {
  background: linear-gradient(135deg, var(--sh-orange), var(--sh-orange-dark));
  color: #fff;
  transform: scale(1.04);
}

.sh-mega-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sh-mega-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
}

.sh-mega-link.is-active .sh-mega-title {
  color: #c2410c;
}

.sh-ext {
  font-size: 0.65rem;
  color: var(--sh-muted);
}

.sh-mega-desc {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--sh-muted);
}

.sh-mega-all {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.6rem 0.85rem 0.25rem;
  color: var(--sh-navy);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.sh-mega-all i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.sh-mega-all:hover {
  color: var(--sh-orange-dark);
  text-decoration: none;
}

.sh-mega-all:hover i {
  transform: translateX(3px);
}

/* ---------- Actions ---------- */

.sh-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.sh-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border-radius: 999px;
  color: var(--sh-ink);
  text-decoration: none;
  transition: background 0.2s ease;
}

.sh-phone:hover {
  background: rgba(30, 58, 138, 0.07);
  color: var(--sh-ink);
  text-decoration: none;
}

.sh-phone-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.13);
  color: var(--sh-orange-dark);
  font-size: 0.85rem;
}

.sh-phone-text {
  display: flex;
  flex-direction: column;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.sh-phone-text small {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sh-muted);
}

.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 46px;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.sh-btn-primary {
  background: linear-gradient(135deg, var(--sh-orange) 0%, var(--sh-orange-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(234, 88, 12, 0.75);
}

.sh-btn-primary:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 26px -10px rgba(234, 88, 12, 0.85);
}

.sh-btn-block {
  width: 100%;
}

.sh-burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 58, 138, 0.07);
  cursor: pointer;
}

.sh-burger span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--sh-navy);
  transition: transform 0.3s var(--sh-ease), opacity 0.2s ease;
}

.sh-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sh-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.sh-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile drawer ---------- */

.sh-overlay,
.sh-drawer {
  display: none;
}

body.sh-menu-open {
  overflow: hidden;
}

/* ---------- Responsive ---------- */

@media (max-width: 1339px) {
  .sh-phone {
    padding: 0.3rem;
  }

  .sh-phone-text {
    display: none;
  }

  .sh-link {
    padding: 0 0.8rem;
  }
}

@media (max-width: 1179px) {
  .sh-bar {
    gap: 0.6rem;
    padding-left: 1rem;
  }

  .sh-logo img {
    width: 132px;
  }

  .sh-link {
    padding: 0 0.62rem;
    font-size: 0.9rem;
  }

  .sh-book {
    width: 46px;
    padding: 0;
  }

  .sh-book-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 991px) {
  :root {
    --sh-gap: 10px;
    --sh-h: 62px;
  }

  .sh-bar {
    padding: 0 0.6rem 0 1rem;
  }

  .sh-logo img {
    width: auto;
    height: 38px;
  }

  .sh-nav,
  .sh-book {
    display: none;
  }

  .sh-actions {
    margin-left: auto;
  }

  .sh-burger {
    display: inline-flex;
  }

  .sh-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s;
  }

  .sh-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .sh-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1002;
    width: min(400px, 100%);
    background: #f8fafc;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.25);
    transform: translateX(105%);
    transition: transform 0.35s var(--sh-ease);
    overscroll-behavior: contain;
    font-family: "Roboto", Arial, sans-serif;
  }

  .sh-drawer.is-open {
    transform: none;
  }

  .sh-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    background: #fff;
    border-bottom: 1px solid var(--sh-line);
  }

  .sh-drawer-head .sh-logo img {
    height: 36px;
  }

  .sh-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 58, 138, 0.07);
    color: var(--sh-navy);
    font-size: 1.1rem;
    cursor: pointer;
  }

  .sh-drawer-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .sh-dlink {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.7rem 0.75rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--sh-text);
    font: 600 1rem/1.2 "Roboto", Arial, sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
  }

  .sh-dlink:hover,
  .sh-dtoggle[aria-expanded="true"] {
    background: #fff;
    color: var(--sh-navy);
    text-decoration: none;
  }

  .sh-dlink.is-active {
    background: rgba(249, 115, 22, 0.1);
    color: #c2410c;
  }

  .sh-dicon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #fff;
    color: var(--sh-navy);
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  }

  .sh-dlink.is-active .sh-dicon,
  .sh-dtoggle[aria-expanded="true"] .sh-dicon {
    background: linear-gradient(135deg, var(--sh-orange), var(--sh-orange-dark));
    color: #fff;
  }

  .sh-dlabel {
    flex: 1 1 auto;
  }

  .sh-dtoggle[aria-expanded="true"] .sh-caret {
    transform: rotate(180deg);
  }

  .sh-dsub {
    margin: 0.25rem 0 0.5rem 1.6rem;
    padding-left: 1rem;
    border-left: 2px solid var(--sh-line);
    display: flex;
    flex-direction: column;
  }

  .sh-dsub[hidden] {
    display: none;
  }

  .sh-dsub-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    color: #475569;
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none;
  }

  .sh-dsub-link i {
    width: 1rem;
    text-align: center;
    color: var(--sh-muted);
    font-size: 0.85rem;
  }

  .sh-dsub-link:hover,
  .sh-dsub-link.is-active {
    background: #fff;
    color: var(--sh-orange-dark);
    text-decoration: none;
  }

  .sh-dsub-link:hover i,
  .sh-dsub-link.is-active i {
    color: var(--sh-orange-dark);
  }

  .sh-dsub-all {
    color: var(--sh-navy);
    font-weight: 600;
  }

  .sh-drawer-foot {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--sh-line);
  }

  .sh-drawer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .sh-drawer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
  }

  .sh-drawer-contact a:hover {
    color: var(--sh-navy);
  }

  .sh-drawer-contact i {
    width: 1rem;
    color: var(--sh-orange);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh,
  .sh-bar,
  .sh-mega,
  .sh-drawer,
  .sh-overlay,
  .sh-burger span {
    transition: none;
  }
}
