/* Shared SMAPAS header and section utilities */

.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 48px;
  background: rgba(15, 30, 31, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border, rgba(58, 85, 87, 0.9));
}

.header.header--fixed {
  position: fixed;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-wordmark {
  height: 22px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.68rem 1rem;
  border-radius: 10px;
  font-family: var(--font-sans, 'Montserrat', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.nav-btn.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
}

.nav-btn.ghost:hover,
.nav-btn.ghost:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-btn.ghost.active,
.nav-btn.ghost[aria-current="page"] {
  background: rgba(224, 255, 69, 0.1);
  border-color: #e0ff45;
  color: #e0ff45;
}

.nav-btn.primary {
  background: var(--accent, #e0ff45);
  color: var(--accent-dark, #1d3234);
  border: 1.5px solid var(--accent, #e0ff45);
  box-shadow: 0 4px 20px rgba(224, 255, 69, 0.32);
}

.nav-btn.primary:hover,
.nav-btn.primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(224, 255, 69, 0.42);
  filter: brightness(1.04);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text, #fff);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

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

body.library-story .page-hero,
body.library-story .page-section,
body.library-story .page-card,
body.library-story .page-cta {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(29, 50, 52, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

body.library-story .page-hero,
body.library-story .page-section,
body.library-story .page-card {
  border-radius: 24px;
}

body.library-story .page-hero {
  padding: 32px 32px 28px;
}

body.library-story .page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #e0ff45;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.library-story .page-title {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.97;
}

body.library-story .page-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.7;
}

body.library-story .page-section {
  padding: 28px;
}

body.library-story .page-cta {
  padding: 24px 28px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.library-story .page-cta h3,
body.library-story .page-cta p {
  margin: 0;
}

body.library-story .page-cta h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.library-story .page-cta p {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.library-story .page-cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body.library-story .button-primary,
body.library-story .button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-family: var(--font-sans, 'Montserrat', system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

body.library-story .button-primary {
  background: var(--button-accent, var(--accent, #e0ff45));
  color: var(--button-foreground, #1d3234);
  box-shadow: 0 4px 24px rgba(224, 255, 69, 0.28);
}

body.library-story .button-primary:hover,
body.library-story .button-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(224, 255, 69, 0.34);
}

body.library-story .button-secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

body.library-story .button-secondary:hover,
body.library-story .button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.38);
}

@media (max-width: 1024px) {
  .header {
    padding: 0 24px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px 24px 24px;
    background: rgba(15, 30, 31, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border, rgba(58, 85, 87, 0.9));
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .header-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-btn {
    width: 100%;
  }

  body.library-story .page-hero,
  body.library-story .page-section,
  body.library-story .page-card,
  body.library-story .page-cta {
    border-radius: 20px;
  }

  body.library-story .page-hero,
  body.library-story .page-section {
    padding: 24px;
  }

  body.library-story .page-cta {
    padding: 22px 24px;
  }
}
