/* Sachse Choir — shared site navigation.
   Markup is rendered by /assets/nav.js so every page stays identical.
   All rules are scoped to .sc-header to avoid touching page styles. */

.sc-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 8px clamp(14px, 3.5vw, 46px);
  background: linear-gradient(180deg, rgba(5, 7, 13, .95), rgba(5, 7, 13, .74));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.2;
}

/* Pages whose layout was built around an out-of-flow bar keep it fixed. */
.sc-header--fixed { position: fixed; }

.sc-header *,
.sc-header *::before,
.sc-header *::after { box-sizing: border-box; }

/* Brand ------------------------------------------------------------------ */
.sc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 800;
  font-size: clamp(.78rem, 1.15vw, 1rem);
  white-space: nowrap;
}

.sc-brand img {
  display: block;
  height: 46px;
  width: 46px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 22px rgba(46, 246, 255, .26);
}

.sc-brand:hover { color: #fff; }

/* Top level -------------------------------------------------------------- */
/* Explicit resets so page-level element selectors (nav {}, ul {}, button {})
   cannot leak into the component. */
.sc-header .sc-nav {
  position: static;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  max-height: none;
  overflow: visible;
}

.sc-menu {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.2vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sc-item {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sc-link,
.sc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 11px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: rgba(255, 255, 255, .88);
  font-family: inherit;
  font-size: clamp(.62rem, .8vw, .75rem);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease;
}

.sc-link:hover,
.sc-trigger:hover,
.sc-link:focus-visible,
.sc-trigger:focus-visible,
.sc-item.is-open > .sc-trigger {
  color: #2ef6ff;
  text-shadow: 0 0 14px rgba(46, 246, 255, .65);
}

.sc-item.is-current > .sc-link,
.sc-item.is-current > .sc-trigger { color: #2ef6ff; }

.sc-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .8;
  transition: transform .2s ease;
}

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

/* Dropdowns -------------------------------------------------------------- */
.sc-sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 234px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: rgba(5, 10, 18, .98);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.sc-item.is-open > .sc-sub { display: flex; }

.sc-sub li { margin: 0; padding: 0; list-style: none; }

.sc-sub a {
  display: block;
  padding: 11px 14px;
  border-radius: 11px;
  background: none;
  color: rgba(255, 255, 255, .9);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.sc-sub a:hover,
.sc-sub a:focus-visible {
  background: rgba(46, 246, 255, .12);
  color: #2ef6ff;
}

.sc-sub a.is-current { color: #2ef6ff; }

/* Mobile toggle ---------------------------------------------------------- */
.sc-burger {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-family: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 980px) {
  .sc-burger { display: inline-flex; }

  .sc-header .sc-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    display: none;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 12px;
    background: rgba(5, 7, 13, .98);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
  }

  .sc-header .sc-nav.is-open { display: block; }

  .sc-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .sc-link,
  .sc-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 14px 12px;
    font-size: .78rem;
  }

  .sc-sub {
    position: static;
    transform: none;
    min-width: 0;
    margin: 2px 0 6px;
    padding: 6px;
    background: rgba(255, 255, 255, .05);
    box-shadow: none;
  }

  .sc-sub a { font-size: .72rem; }
}

@media (max-width: 420px) {
  .sc-brand img { height: 38px; width: 38px; }
  .sc-brand { font-size: .72rem; letter-spacing: .14em; }
}
