/* Greater Bothell Chamber — site shell */
:root {
  --navy: #0a2a51;
  --teal: #007392;
  --green: #2e6a3f;
  --green-bright: #00772a;
  --ink: #1a1a1a;
  --muted: #555;
  --line: #c8d4dc;
  --paper: #ffffff;
  --mist: #eef4f7;
  --accent-red: #990000;
  --max: 1100px;
  --nav-w: 220px;
  --font: "Source Sans 3", "Segoe UI", Verdana, Geneva, sans-serif;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    linear-gradient(180deg, #d6e6ee 0%, var(--mist) 180px, #f7fafb 420px, #fff 100%);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.site-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px 40px;
  width: 100%;
  overflow-x: hidden;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, #13406e 55%, var(--teal) 100%);
  color: #fff;
  padding: 18px 0 16px;
  box-shadow: 0 2px 12px rgba(10, 42, 81, 0.25);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
}

.brand img {
  display: block;
  max-height: 56px;
  width: auto;
  background: #fff;
  border-radius: 4px;
  padding: 4px 6px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
}

.header-cta {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #fff;
  color: var(--navy);
}

.btn-primary:hover {
  background: #e8f3f7;
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-green {
  background: var(--green-bright);
  color: #fff;
}

.btn-green:hover {
  background: var(--green);
  color: #fff;
}

/* Layout with nav */
.site-body {
  display: flex;
  gap: 28px;
  margin-top: 22px;
  align-items: flex-start;
}

.site-nav {
  flex: 0 0 var(--nav-w);
  position: sticky;
  top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  padding: 10px 0;
}

.nav-toggle {
  display: none;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav > ul > li {
  border-bottom: 1px solid #eef2f5;
}

.site-nav > ul > li:last-child {
  border-bottom: 0;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--mist);
  color: var(--teal);
  text-decoration: none;
}

.site-nav .has-sub > a {
  position: relative;
}

.site-nav .submenu {
  display: none;
  background: #f8fbfd;
  padding: 4px 0 8px;
}

.site-nav .has-sub:hover > .submenu,
.site-nav .has-sub:focus-within > .submenu,
.site-nav .has-sub.is-open > .submenu {
  display: block;
}

.site-nav .submenu a {
  padding: 6px 14px 6px 22px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #35506a;
}

.site-main {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px 26px 32px;
}

.page-header {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
}

.page-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}

.site-main h2 {
  font-family: var(--display);
  color: var(--navy);
  font-size: 1.35rem;
  margin: 1.4em 0 0.45em;
}

.site-main h3 {
  color: var(--navy);
  font-size: 1.1rem;
  margin: 1.2em 0 0.4em;
}

.site-main p {
  margin: 0 0 0.9em;
}

.site-main ul,
.site-main ol {
  margin: 0 0 1em 1.25em;
  padding: 0;
}

.site-main li {
  margin-bottom: 0.35em;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
}

/* Home */
.hero {
  margin: -22px -26px 24px;
  padding: 36px 28px 32px;
  background:
    linear-gradient(120deg, rgba(10, 42, 81, 0.92), rgba(0, 115, 146, 0.78)),
    url("/images/gbcc_masthead_2008.jpg") center / cover no-repeat;
  color: #fff;
  animation: heroFade 0.7s ease both;
}

.hero h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  color: #fff;
  border: 0;
}

.hero p {
  margin: 0 0 18px;
  max-width: 36em;
  font-size: 1.05rem;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 22px 0;
}

.home-block {
  flex: 1 1 240px;
  padding: 16px 0;
  border-top: 3px solid var(--teal);
  animation: riseIn 0.55s ease both;
}

.home-block:nth-child(2) {
  animation-delay: 0.08s;
  border-top-color: var(--green);
}

.home-block:nth-child(3) {
  animation-delay: 0.16s;
  border-top-color: var(--navy);
}

.home-block h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.staff-grid,
.logo-grid,
.area-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 16px 0 24px;
}

.staff-card {
  flex: 1 1 160px;
  max-width: 220px;
  text-align: center;
}

.staff-card img {
  display: block;
  margin: 0 auto 8px;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.logo-grid a,
.logo-grid span {
  flex: 0 1 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

.logo-grid img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.note {
  padding: 12px 14px;
  background: var(--mist);
  border-left: 4px solid var(--teal);
  margin: 16px 0;
}

.news-flag {
  color: var(--accent-red);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Footer */
.site-footer {
  margin-top: 36px;
  background: var(--navy);
  color: #dce7f0;
  padding: 28px 0 22px;
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  justify-content: space-between;
}

.site-footer a {
  color: #fff;
  font-weight: 600;
}

.site-footer a:hover {
  color: #b8e0ec;
}

.footer-meta {
  font-size: 0.88rem;
  opacity: 0.9;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

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

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Blog listing */
.blog-container {
  margin-top: 8px;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.blog-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-family: var(--display);
}

.blog-title a {
  color: var(--navy);
}

.blog-preview {
  color: var(--muted);
  font-size: 0.95rem;
}

.blog-preview p {
  margin: 0;
}

.page-content,
.romlicontainer {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.page-content img,
.romlicontainer img {
  max-width: 100%;
  height: auto;
}

/* Wide data tables: scroll inside wrapper, not the page */
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 12px 0;
}

.page-content > table,
.page-content table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.page-content td,
.page-content th {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.table-scroll > table {
  width: max-content !important;
  min-width: 100%;
  max-width: none !important;
  table-layout: auto;
}

.table-scroll > table th,
.table-scroll > table td {
  white-space: nowrap;
  overflow-wrap: normal;
  word-wrap: normal;
}

@media (max-width: 860px) {
  .site-body {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-nav {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    position: static;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav > ul {
    display: none;
  }

  .site-nav.is-open > ul {
    display: block;
  }

  .header-cta {
    margin-left: 0;
    width: 100%;
  }

  .site-main {
    padding: 18px 16px 26px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero {
    margin: -18px -16px 20px;
    padding: 28px 18px;
    max-width: none;
  }

  .site-header-inner,
  .site-footer-inner {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Kill fixed legacy widths so layout tables fit the viewport */
  .page-content table,
  .page-content td,
  .page-content th {
    width: auto !important;
    max-width: 100%;
  }

  .page-content > table,
  .page-content table {
    width: 100% !important;
  }

  .table-scroll > table,
  .table-scroll > table td,
  .table-scroll > table th {
    width: auto !important;
    max-width: none;
  }
}
