/*
 * Site header (resources/views/partials/header.blade.php). Loaded on every page.
 * Own .sh- classes so the legacy .main-header theme rules do not apply.
 */
.site-header {
  --sh-navy: #0d2b5c;
  --sh-navy-2: #0a1f45;
  --sh-ink: #14213d;
  --sh-text: #3a4762;
  --sh-muted: #6b7690;
  --sh-line: #e3e8f1;
  --sh-blue: #1f5fbf;
  --sh-green: #17924a;
  --sh-green-2: #2fbf5a;
  --sh-red: #d9232b;
  --sh-yellow: #ffe94f;
  --sh-top-h: 40px;
  --sh-bar-h: 76px;
  --sh-gradient: linear-gradient(90deg, #1f5fbf 0%, #1a8a8c 50%, #2fbf5a 100%);

  position: sticky;
  top: calc(var(--sh-top-h) * -1); /* the utility bar scrolls away, the main bar stays */
  z-index: 1000;
  font-family: "Ubuntu", system-ui, sans-serif;
}
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header :where(ul) { margin: 0; padding: 0; }
.site-header :where(li) { list-style: none; }
.site-header a { text-decoration: none; }
.site-header :focus-visible { outline: 3px solid var(--sh-yellow); outline-offset: 2px; border-radius: 6px; }

.sh-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- Utility bar ---------- */
.sh-top { height: var(--sh-top-h); background: var(--sh-navy-2); color: #c6d3ea; font-size: 13.5px; }
.sh-top__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sh-top a { color: #c6d3ea; transition: color .18s ease; }
.sh-top a:hover { color: #fff; }
.sh-top__mail, .sh-top__link { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.sh-top__mail span { overflow: hidden; text-overflow: ellipsis; }
.sh-top__mail i, .sh-top__link i { color: var(--sh-green-2); }
.sh-top__right { display: flex; align-items: center; gap: 18px; }

.sh-lang { position: relative; }
.sh-lang__btn {
  display: inline-flex; align-items: center; gap: .45rem; height: 28px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font: inherit; font-weight: 500;
}
.sh-lang__btn:hover { background: rgba(255, 255, 255, .16); }
.sh-lang__btn i:first-child { color: var(--sh-green-2); }
.sh-lang__chev { font-size: 10px; transition: transform .18s ease; }
.sh-lang__btn[aria-expanded="true"] .sh-lang__chev { transform: rotate(180deg); }
.sh-lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; z-index: 1100;
  background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(10, 31, 69, .22); border: 1px solid var(--sh-line);
}
.sh-lang__menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--sh-text) !important; font-size: 14.5px; }
.sh-lang__menu a:hover { background: #f1f5fb; color: var(--sh-ink) !important; }
.sh-lang__menu a[aria-current] { background: #eaf7ef; color: #0f6b35 !important; font-weight: 700; }

/* ---------- Main bar ---------- */
.sh-bar { position: relative; background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--sh-line); transition: box-shadow .2s ease; }
.sh-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--sh-gradient); opacity: 0; transition: opacity .2s ease; }
.site-header.is-scrolled .sh-bar { box-shadow: 0 8px 24px rgba(10, 31, 69, .1); }
.site-header.is-scrolled .sh-bar::after { opacity: 1; }
.sh-bar__inner { height: var(--sh-bar-h); display: flex; align-items: center; gap: 24px; }

.sh-brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; color: var(--sh-ink); }
.sh-brand img { width: 52px; height: 52px; object-fit: contain; }
.sh-brand__name { font-weight: 700; font-size: 15px; line-height: 1.15; color: var(--sh-navy); letter-spacing: .02em; }
.sh-brand__name small { display: block; font-size: 11.5px; font-weight: 500; color: var(--sh-muted); letter-spacing: .05em; margin-top: 3px; }

.sh-nav { margin-left: auto; }
.sh-nav ul { display: flex; align-items: center; gap: 2px; }
.sh-nav a {
  position: relative; display: block; padding: 10px 13px; border-radius: 8px; color: var(--sh-text); font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.sh-nav a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 3px; border-radius: 2px; background: var(--sh-gradient);
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.sh-nav a:hover { color: var(--sh-navy); background: #f3f6fb; }
.sh-nav a:hover::after { transform: scaleX(.5); }
.sh-nav a.is-current { color: var(--sh-navy); font-weight: 700; }
.sh-nav a.is-current::after { transform: scaleX(1); }

.sh-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sh-donate {
  display: inline-flex; align-items: center; gap: .5rem; height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--sh-red); color: #fff !important; font-weight: 700; font-size: 15px; box-shadow: 0 6px 16px rgba(217, 35, 43, .25);
  transition: background-color .18s ease, transform .18s ease;
}
.sh-donate:hover { background: #b81c23; transform: translateY(-1px); }
.sh-donate.is-current { box-shadow: 0 0 0 3px rgba(217, 35, 43, .25); }

.sh-burger {
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--sh-line); background: #fff; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.sh-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--sh-navy); }
.sh-burger:hover { background: #f3f6fb; }

/* ---------- Drawer ---------- */
.sh-overlay { position: fixed; inset: 0; background: rgba(6, 18, 40, .55); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 1200; }
.sh-overlay.active { opacity: 1; visibility: visible; }
.sh-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 1300; background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility .3s; overflow-y: auto;
}
.sh-drawer.active { transform: none; visibility: visible; box-shadow: -20px 0 40px rgba(6, 18, 40, .2); }
.sh-drawer::before { content: ""; display: block; height: 5px; background: var(--sh-gradient); flex-shrink: 0; }
.sh-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--sh-line); }
.sh-brand--small img { width: 40px; height: 40px; }
.sh-drawer__close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--sh-line); background: #fff; color: var(--sh-navy); font-size: 17px; cursor: pointer; }
.sh-drawer__close:hover { background: #f3f6fb; }
.sh-drawer__nav { padding: 10px 12px; }
.sh-drawer__nav a {
  display: flex; align-items: center; justify-content: space-between; padding: 13px 12px; border-radius: 10px; color: var(--sh-ink); font-weight: 500; font-size: 16px;
}
.sh-drawer__nav a i { font-size: 12px; color: var(--sh-muted); }
.sh-drawer__nav a:hover { background: #f3f6fb; }
.sh-drawer__nav a.is-current { background: #eef4ff; color: var(--sh-navy); font-weight: 700; box-shadow: inset 3px 0 0 var(--sh-red); }
.sh-drawer__section { padding: 14px 24px; border-top: 1px solid var(--sh-line); }
.sh-drawer__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-muted); margin-bottom: 10px; }
.sh-drawer__langs { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-drawer__langs a { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--sh-line); color: var(--sh-text); font-size: 14px; }
.sh-drawer__langs a.is-current { border-color: var(--sh-green); background: #eaf7ef; color: #0f6b35; font-weight: 700; }
.sh-drawer__foot { margin-top: auto; padding: 18px 24px 24px; background: #f6f8fc; display: grid; gap: 10px; }
.sh-drawer__login, .sh-drawer__mail { display: inline-flex; align-items: center; gap: .6rem; color: var(--sh-text); font-size: 14.5px; }
.sh-drawer__login i, .sh-drawer__mail i { color: var(--sh-green); width: 18px; }
.sh-drawer__tagline { margin: 6px 0 0; font-weight: 700; color: var(--sh-navy); font-size: 13px; line-height: 1.3; }
.sh-drawer__tagline small { font-weight: 500; color: var(--sh-muted); }

@media (prefers-reduced-motion: reduce) {
  .site-header *, .site-header *::before, .site-header *::after { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .sh-nav a { padding: 10px 9px; font-size: 14.5px; }
  .sh-nav a::after { left: 9px; right: 9px; }
  .sh-brand__name small { font-size: 10.5px; }
}
@media (max-width: 1023px) {
  .site-header { --sh-bar-h: 66px; }
  .sh-nav { display: none; }
  .sh-burger { display: inline-flex; }
  .sh-actions { margin-left: auto; }
  .sh-brand__name small { display: block; }
}
@media (max-width: 560px) {
  .sh-wrap { padding: 0 16px; }
  .sh-top__mail span { max-width: 150px; }
  .sh-top__right { gap: 12px; }
  .sh-brand img { width: 42px; height: 42px; }
  .sh-brand__name { font-size: 13px; }
  .sh-brand__name small { font-size: 10px; }
  .sh-donate { width: 44px; padding: 0; justify-content: center; }
  .sh-donate span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 380px) {
  .sh-top__link span, .sh-top__link { font-size: 12.5px; }
  .sh-brand__name small { display: none; }
}

@media print { .site-header { position: static; } .sh-top, .sh-actions, .sh-nav, .sh-drawer, .sh-overlay { display: none !important; } }
