﻿.fi-header {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
  background: transparent;
  color: var(--fi-navy);
  pointer-events: none;
  box-shadow: none;
  backdrop-filter: none;
}

.fi-header.is-scrolled,
.fi-header.is-open {
  position: fixed;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.admin-bar .fi-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .fi-header {
    top: 46px;
  }
}

.fi-header-shell {
  pointer-events: none;
}

.fi-header-bar {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  min-height: var(--fi-header-height);
  background: #fff;
  border-radius: 999px;
  box-shadow:
    0 14px 40px rgba(26, 50, 96, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  border: 1px solid rgba(219, 234, 254, 0.95);
  overflow: visible;
}

.fi-header.is-scrolled .fi-header-bar {
  box-shadow:
    0 16px 44px rgba(26, 50, 96, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.fi-header-accent { display: none; }

.fi-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  z-index: 2;
  flex-shrink: 0;
  padding: 0.65rem 1.15rem 0.65rem 1.1rem;
  margin: 0;
  background: linear-gradient(135deg, #f7f1e8 0%, #f3ece3 100%);
  border-radius: 999px 48px 48px 999px;
  align-self: stretch;
}

.fi-brand-mark { color: var(--fi-navy); display: inline-flex; }
.fi-brand-text { display: flex; flex-direction: column; line-height: 1.05; }

.fi-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fi-navy);
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.fi-brand-kicker {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--fi-orange);
  max-width: 11.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fi-brand-logo { max-height: 48px; width: auto; }

.fi-nav-toggle {
  display: none;
  margin-left: auto;
  margin-right: 0.85rem;
  align-self: center;
  border: 0;
  background: transparent;
  color: var(--fi-navy);
  padding: 0.35rem;
  z-index: 2;
  cursor: pointer;
}
.fi-nav-toggle-icon--close { display: none; }
.fi-header.is-open .fi-nav-toggle-icon--open { display: none; }
.fi-header.is-open .fi-nav-toggle-icon--close { display: block; }

.fi-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  z-index: 2;
  min-width: 0;
}

.fi-nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.15rem;
  width: 100%;
}

.fi-nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 1 1 0;
  max-width: 7.5rem;
}

.fi-nav-item + .fi-nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(26, 50, 96, 0.12);
  pointer-events: none;
}

.fi-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: 100%;
  padding: 0.55rem 0.45rem 0.65rem;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--fi-navy);
  text-decoration: none;
  line-height: 1.15;
  border-bottom: none;
  transition: color 0.2s ease;
}

.fi-nav-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: inherit;
}

.fi-nav-link__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.fi-nav-link__label {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.fi-nav-link.is-active,
.fi-nav-item:hover > .fi-nav-link {
  color: var(--fi-orange);
  text-decoration: none;
}

.fi-nav-link.is-active .fi-nav-link__label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  width: 1.35rem;
  height: 3px;
  border-radius: 999px;
  background: var(--fi-orange);
  transform: translateX(-50%);
}

.fi-header-donate {
  margin: 0.55rem 0.65rem 0.55rem 0.25rem;
  align-self: center;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(245, 130, 32, 0.35);
  padding: 0.75rem 1.15rem;
  white-space: nowrap;
}

.fi-header-donate:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(245, 130, 32, 0.4);
}

.fi-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 0.5rem 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26, 50, 96, 0.15);
  z-index: 50;
  border: 1px solid rgba(219, 234, 254, 0.95);
}

.fi-nav-item:hover .fi-dropdown,
.fi-nav-item:focus-within .fi-dropdown {
  display: block;
}

.fi-dropdown a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--fi-navy);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.fi-dropdown a:hover {
  background: rgba(245, 130, 32, 0.08);
  color: var(--fi-orange);
}

@media (max-width: 1100px) {
  .fi-brand-kicker { display: none; }
  .fi-nav-link { font-size: 0.58rem; padding-inline: 0.3rem; }
  .fi-header-donate span { display: none; }
  .fi-header-donate { padding: 0.75rem; border-radius: 50%; width: 2.75rem; height: 2.75rem; }
}

@media (max-width: 960px) {
  .fi-header { padding: 0.65rem 0; }
  .fi-header-bar {
    border-radius: 22px;
    flex-wrap: wrap;
    min-height: auto;
  }
  .fi-brand {
    border-radius: 22px 0 0 22px;
    padding: 0.7rem 1rem;
  }
  .fi-nav-toggle { display: inline-flex; }
  .fi-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    padding: 0.75rem;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(26, 50, 96, 0.14);
    border: 1px solid rgba(219, 234, 254, 0.95);
  }
  .fi-header.is-open .fi-nav { display: block; }
  .fi-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0;
  }
  .fi-nav-item {
    max-width: none;
    flex: none;
  }
  .fi-nav-item + .fi-nav-item::before { display: none; }
  .fi-nav-link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.78rem;
    text-align: left;
    border-radius: 12px;
  }
  .fi-nav-link.is-active .fi-nav-link__label::after { display: none; }
  .fi-nav-link.is-active,
  .fi-nav-item:hover > .fi-nav-link {
    background: rgba(245, 130, 32, 0.08);
  }
  .fi-header-donate { display: none; }
  .fi-dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: 0;
    padding-left: 2.4rem;
    background: transparent;
  }
}

.fi-footer { margin-top: auto; }

.fi-page-header {
  background: linear-gradient(135deg, var(--fi-navy), var(--fi-navy-soft));
  color: #fff;
  padding: calc(var(--fi-header-height) + 2.5rem) 0 3rem;
}
.fi-page-title { margin: 0 0 .5rem; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.fi-page-description { opacity: .9; }
.fi-page-meta, .fi-page-kicker { opacity: .85; }
.fi-page-kicker a { color: #fff; }

.fi-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .fi-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

.fi-sidebar-block + .fi-sidebar-block { margin-top: 1.5rem; }
.fi-sidebar-block h2 { font-size: 1rem; margin: 0 0 .75rem; }
.fi-sidebar-links { list-style: none; margin: 0; padding: 0; }
.fi-sidebar-links li + li { margin-top: .5rem; }

.fi-notice {
  max-width: var(--fi-container);
  margin: 0 auto 1rem;
  padding: .85rem 1rem;
  border-radius: var(--fi-radius-sm);
  font-weight: 600;
}
.fi-notice--success { background: #ecfdf5; color: #065f46; }
.fi-notice--error { background: #fef2f2; color: #991b1b; }

.fi-page-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.fi-page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.fi-page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(18,38,72,.88), rgba(18,38,72,.55));
}
.fi-page-hero-inner {
  position: relative;
  z-index: 1;
  padding: calc(var(--fi-header-height) + 2.5rem) 0 5rem;
  max-width: 760px;
}
.fi-page-hero-title {
  margin: 0 0 .75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}
.fi-page-hero-text {
  margin: 0;
  opacity: .92;
  font-size: 1.05rem;
}
.fi-page-hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}
.fi-page-hero-wave svg { width: 100%; height: 72px; }
