/* PROGRAM MODULE NAVIGATION */
/* Add this file to all three module pages: <link rel="stylesheet" href="program-module-navigation.css"> */

:root {
  --nav-bg: rgba(251, 250, 246, 0.86);
  --nav-green: #244638;
  --nav-muted: #68726a;
  --nav-sage: #5f755d;
  --nav-line: rgba(37, 42, 39, 0.12);
  --nav-card: rgba(255, 255, 255, 0.78);
  --nav-soft: #f2efe7;
  --nav-shadow: 0 16px 44px rgba(42, 51, 45, 0.06);
  --nav-radius: 8px;
}

.module-local-nav {
  position: sticky !important;
  top: calc(var(--global-header-height, 76px) + 66px) !important;
  z-index: 4980;
  border-top: 1px solid var(--nav-line);
  border-bottom: 1px solid var(--nav-line);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.module-local-nav-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.module-back-link {
  flex: 0 0 auto;
  color: var(--nav-green);
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.module-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.module-anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(36, 70, 56, 0.14);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--nav-green);
  background: rgba(255, 255, 255, 0.54);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.module-anchor-nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 70, 56, 0.28);
  background: rgba(255, 255, 255, 0.86);
}

.module-switch-section {
  padding: 44px 0 26px;
  background: var(--bg, #fbfaf6);
}

.module-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.module-switch.two-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-switch-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--nav-line);
  border-radius: var(--nav-radius);
  background: var(--nav-card);
  box-shadow: var(--nav-shadow);
  text-decoration: none;
}

.module-switch-card:hover {
  border-color: rgba(36, 70, 56, 0.24);
}

.module-switch-card.is-home {
  background: var(--nav-soft);
}

.module-switch-kicker {
  color: var(--nav-sage);
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-switch-title {
  color: var(--nav-green);
  font-size: clamp(1.1rem, 1.45vw, 1.38rem);
  line-height: 1.22;
  font-weight: 500;
}

.module-switch-note {
  margin: 0;
  color: var(--nav-muted);
  font-size: 0.95rem;
  line-height: 1.56;
}

@media (max-width: 960px) {
  .module-local-nav {
    position: sticky !important;
    top: calc(var(--global-header-height, 76px) + 84px) !important;
  }

  .module-local-nav-inner {
    display: grid;
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .module-anchor-nav {
    justify-content: flex-start;
  }

  .module-switch,
  .module-switch.two-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .module-anchor-nav {
    gap: 7px;
  }

  .module-anchor-nav a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .module-switch-card {
    min-height: auto;
    padding: 22px;
  }
}
