/* Sticky Header & Responsive Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-weight: 800;
  font-size: 1.24rem;
  color: var(--brand-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-mark-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 61, 110, 0.14);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.15;
  margin-top: 2px;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link, .nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.nav-link:hover, .nav-dropdown-btn:hover, .nav-link.active {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.45rem;
  z-index: 60;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-dropdown-menu a:hover {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.icon-btn:hover {
  border-color: #93c5fd;
  background: var(--bg-page);
}

.icon-btn:active {
  transform: scale(0.95);
}

.hamburger-btn[aria-expanded="true"] {
  background: var(--brand-primary-soft);
  border-color: #93c5fd;
  color: var(--brand-primary);
}

.hamburger-box {
  width: 20px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2.2px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(5.9px) rotate(45deg);
}

.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-5.9px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
html.mobile-menu-open,
body.mobile-menu-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 0.85rem 1rem 1.25rem;
  max-height: calc(100vh - 69px);
  max-height: calc(100dvh - 69px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.mobile-drawer.open {
  display: block;
  animation: drawerSlideDown 0.22s ease-out;
}

@keyframes drawerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-nav-list a {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-page);
}

/* Grids & Sections */
.section {
  padding: 2rem 0;
}

.section-band {
  width: 100%;
  padding: 2.25rem 0;
  border-top: 1px solid var(--border-color);
}

.band-white { background: var(--band-white); }
.band-alt   { background: var(--band-alt); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-banks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

/* Article 2-Column Layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1.5rem 0 3rem;
}

.article-main {
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Footer */
.site-footer {
  background: #0b1f3a;
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.footer-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.25rem;
  font-size: 0.86rem;
  color: #94a3b8;
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-banks {
    grid-template-columns: repeat(3, 1fr);
  }
  .article-main {
    padding: 2rem;
  }
}

@media (min-width: 960px) {
  .main-nav {
    display: flex;
  }
  #mobile-menu-toggle {
    display: none;
  }
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-banks {
    grid-template-columns: repeat(6, 1fr);
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
  .article-sidebar {
    position: sticky;
    top: 86px;
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
