/* =====================================================================
   header.css
   - Header shell, banner, and brand block
====================================================================== */

/* Skip link (kept accessible) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #004b8d;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; }

/* Header container */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header--empty { border-bottom: 0; background: transparent; }
.site-header--empty .site-header__inner { padding: 0; }

/* Banner with background image + overlay */
.site-banner {
  position: relative;
  height: var(--banner-h);
  border-bottom: 1px solid #e5e7eb;
  background: var(--site-bg, #e9eef3);
}
.site-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--banner-url);
  background-size: cover;
  background-position: center;
  filter: grayscale(40%);
  opacity: var(--banner-fade);
  z-index: 0;
}
.site-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 0;
}

/* Banner edge and bottom fade enhancements */
.site-banner::before {
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

/* External bottom fade shadow from banner into nav */
.banner-shadow {
  height: 20px;
  margin-top: -1px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.30), rgba(0,0,0,0));
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  pointer-events: none;
}

/* Banner inner wrapper */
.site-banner__inner {
  --banner-logo-slot: calc(var(--logo-max) + 16px);
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: var(--banner-logo-slot) minmax(0, 1fr) var(--banner-logo-slot);
  align-items: flex-end;
  gap: 8px;
  padding: var(--inner-pad-y) var(--inner-pad-x);
}

/* Brand block inside banner */
.brand--district-logo,
.brand--site-logo,
.brand--banner-title {
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  padding-bottom: var(--brand-pad-bottom);
}

.brand--district-logo { justify-content: flex-start; }
.brand--site-logo { justify-content: flex-end; }
.brand--banner-title {
  justify-content: center;
  min-width: 0;
}

.site-banner .brand__logo {
  height: var(--logo-max);
  width: auto;
  max-width: var(--logo-max);
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}

.brand--banner-title .brand__text {
  margin: 0;
  padding: 0;
  font-size: var(--brand-font);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  color: var(--title-fill, #111827);
  -webkit-text-stroke: 1px var(--title-outline, #0b2239);
  text-shadow:
    1px 0 0 var(--title-outline, #0b2239),
   -1px 0 0 var(--title-outline, #0b2239),
    0 1px 0 var(--title-outline, #0b2239),
    0 -1px 0 var(--title-outline, #0b2239),
    1px 1px 0 var(--title-outline, #0b2239),
   -1px 1px 0 var(--title-outline, #0b2239),
    1px -1px 0 var(--title-outline, #0b2239),
   -1px -1px 0 var(--title-outline, #0b2239);
}

.auth-links {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-links .auth-email {
  font-size: 0.9rem;
  opacity: 0.92;
  color: var(--nav-text, #ffffff);
}

.auth-links .auth-login,
.auth-links .auth-logout {
  font-size: 0.9rem;
  color: var(--nav-text, #ffffff);
  text-decoration: underline;
}
