:root {
  --bg-header: #e8f4fc;
  --border-color: #c5e0f5;
  --text-primary: #1a3a52;
  --text-secondary: #3d6b8a;
  --accent: #3498db;
  --accent-light: #e3f2fd;
}

/* ── Site Header (scoped reset for header only) ── */
.site-header, .site-header *, .site-header *::before, .site-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.site-header {
  position: relative;
  background-color: #1a3a52;
  background: url('/assets/images/banner_1920.webp') center center / cover no-repeat;
  min-height: 100px;
  max-height: 163.517px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  /* Full viewport width - breaks out of Blowfish's max-w-7xl container */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* Prevent flex container from shifting header vertically */
  margin-top: 0;
  margin-bottom: 0;
  align-self: flex-start;
  flex-shrink: 0;
}

/* Dark overlay so logo/nav pop over the banner */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,58,82,0.55) 0%, rgba(26,58,82,0.45) 100%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  z-index: 1;
  line-height: normal;
}

.header-logo-wrapper {
  display: inline-block;
  text-decoration: none;
}

.header-logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-logo-wrapper:hover .header-logo {
  transform: scale(1.05);
}

/* ── Navigation ── */
.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  padding: 10px 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease,
              box-shadow 0.25s ease;
}

.nav-link:hover {
  background: rgba(52, 152, 219, 0.7);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.45);
}

.nav-link.active {
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.5);
}

.nav-link.active:hover {
  background: #2980b9;
  transform: translateY(-4px) scale(1.08);
}

.iframe-container {
  flex: 1;
  width: 100%;
  height: 0;
}

.iframe-container iframe {
  width: 100%;
  height: 100vh;
  border: none;
  display: block;
}

/* ── Mobile Toggle ── */
.mobile-toggle {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  color: #fff;
  padding: 8px;
  border-radius: 8px;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.mobile-toggle:active {
  transform: scale(0.95);
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* Hamburger lines */
.mobile-toggle .hamburger-line {
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

/* Hamburger to X animation */
.mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-header {
    min-height: 80px;
  }

  .mobile-toggle {
    display: none;
  }

  .header-logo {
    height: 55px;
  }

  .top-bar-nav {
    display: flex !important;
    position: relative;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    padding: 0;
  }

  .top-bar-nav .nav-link {
    flex: 1 1 auto;
    min-width: 90px;
    max-width: 160px;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1a3a52;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .top-bar-nav .nav-link:hover {
    background: rgba(52, 152, 219, 0.7);
    color: #fff;
  }

  .top-bar-nav .nav-link.active {
    background: var(--accent);
    color: #fff;
  }

  .iframe-container iframe {
    flex: 1;
    min-height: 0;
  }
}

/* Extra small screens - hide less important links */
@media (max-width: 400px) {
  .top-bar-nav .nav-link:nth-child(3),
  .top-bar-nav .nav-link:nth-child(4) {
    display: none;
  }
}
