/*
Theme Name: St. Joseph Connect
Theme URI: https://stjosephconnect.com
Author: St. Joseph Connect
Description: An everything hub for people who live in St. Joseph, Missouri. Events from city calendars, local headlines from KQ2, News-Press NOW, and City Hall, a business directory, and the history of St. Joe.
Version: 2.11.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: stjoseph-connect
License: GNU General Public License v2 or later
*/

:root {
  --navy: #16323f;
  --navy-deep: #0e2635;
  --gold: #f4c430;
  --gold-soft: #fdf5d2;
  --sky: #d7eef5;
  --cream: #f7f4e6;
  --paper: #fffdf6;
  --ink: #0e2635;
  --muted: #4a5c62;
  --line: #d5e0e4;
  --river: #3d7a96;
  --building: #4f92b8;
  --hill: #7a9b6e;
  --ok: #7a9b6e;
  --shadow: 0 10px 30px rgba(14, 38, 53, 0.08);
  --radius: 16px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Geologica, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--river); }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 {
  font-family: Geologica, "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }

.site-header {
  background: var(--cream);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-deep);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand img,
.custom-logo-link img,
.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--navy-deep);
  display: grid;
  place-items: center;
  font-family: Geologica, sans-serif;
  font-weight: 700;
}
.brand small { display: block; font-weight: 400; opacity: 0.72; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--navy-deep);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: Geologica, sans-serif;
}
.primary-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--navy-deep);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
}
.primary-nav a:hover,
.primary-nav .current-menu-item a {
  background: var(--sky);
  color: var(--navy-deep);
}

.hero {
  background:
    linear-gradient(120deg, var(--sky) 0%, #eef7ea 42%, var(--gold-soft) 100%);
  color: var(--navy-deep);
  padding: 64px 0 56px;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 16ch; }
.hero p { max-width: 46ch; font-size: 1.15rem; opacity: 0.92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--navy-deep); border: 1px solid var(--river); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-line { background: #fff; color: var(--navy); border: 1px solid var(--line); }

.section { padding: 48px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--river);
  font-weight: 700;
}
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 18px 18px 20px; }
.card .meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.card h3 { font-size: 1.2rem; }
.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--navy-deep);
  border-radius: 999px;
  padding: 3px 8px;
}

.hub-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -36px; position: relative; z-index: 2; }
.hub-tile {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hub-tile strong { display: block; font-size: 1.05rem; margin-top: 6px; }
.hub-tile span { color: var(--muted); font-size: 14px; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.filter-bar input,
.filter-bar select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
.filter-bar input { min-width: 220px; flex: 1; }

.page-hero {
  padding: 36px 0 10px;
}
.page-hero h1 { font-size: clamp(2rem, 3vw, 2.6rem); }

.entry { background: var(--paper); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.entry .meta { color: var(--muted); margin-bottom: 16px; }

.site-footer {
  background: var(--navy-deep);
  color: #d7eef5;
  padding: 40px 0 24px;
  margin-top: 48px;
  font-family: Geologica, sans-serif;
}
.site-footer a { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 24px; }
.site-footer .signup-form input { background: #fff; color: var(--ink); }
.fineprint { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 24px; padding-top: 16px; font-size: 13px; }

.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }

.calendar-list .when {
  font-weight: 700;
  color: var(--navy);
}
.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.history-lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 60ch;
}

.feature-band {
  background: var(--navy-deep);
  color: #fff;
  padding: 28px 0;
  margin: 28px 0 8px;
  border-radius: var(--radius);
}
.feature-band h2, .feature-band a { color: #fff; }
.feature-band .kicker { color: var(--gold); }
.feature-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 18px;
}
.feature-card p { color: #d7eef5; }
.signup-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.signup-form { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-form input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
.signup-note { font-weight: 600; }
.sjc-form { display: grid; gap: 14px; margin-top: 20px; }
.sjc-form label { display: grid; gap: 6px; font-weight: 600; }
.sjc-form input,
.sjc-form select,
.sjc-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  background: #fff;
}
.sjc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .sjc-form-row { grid-template-columns: 1fr; }
}
.card.featured { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.card-media img,
.entry-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.entry-media { margin: 0 0 18px; border-radius: 12px; overflow: hidden; }
.entry-media img { height: auto; max-height: 420px; }
#sjc-map {
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 0 0 28px;
  z-index: 1;
}
.account-slot { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.account-chip img { width: 28px; height: 28px; border-radius: 50%; }
.promote-box { margin-top: 10px; }
.people-hero { display: flex; gap: 20px; align-items: start; }
.people-hero img { border-radius: 50%; }
.people-card img { border-radius: 50%; }
.dash-list { display: grid; gap: 8px; margin: 12px 0 28px; }
.dash-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.dash-actions { display: flex; gap: 12px; white-space: nowrap; }
.navigation.pagination { margin: 28px 0 0; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.navigation.pagination a,
.navigation.pagination span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.navigation.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.square-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.square-filters .pill.is-on { background: var(--navy); color: #fff; }
.status-compose-fields { flex: 1; display: grid; gap: 8px; }
.status-address { margin: 8px 0 0; font-size: 14px; }
.status-address-field[hidden],
#sjc-square-address-wrap[hidden] { display: none !important; }
.feed-wrap { max-width: 680px; }
.status-compose-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.status-compose-row { display: flex; gap: 12px; align-items: flex-start; }
.status-compose-row img { border-radius: 50%; flex: 0 0 auto; }
.status-compose-row textarea {
  flex: 1;
  min-height: 88px;
  resize: vertical;
  font: inherit;
}
.status-compose-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-left: 56px;
}
.status-photo { font-size: 13px; color: var(--muted); }
.status-feed { display: grid; gap: 12px; }
.status-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.status-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.status-head img { border-radius: 50%; }
.status-name { font-weight: 600; }
.status-body { font-size: 17px; line-height: 1.45; }
.status-body p:last-child { margin-bottom: 0; }
.status-photo-link { display: block; margin-top: 12px; }
.status-photo-link img { width: 100%; height: auto; border-radius: 12px; }
.status-foot { margin-top: 12px; font-size: 14px; }
.status-replies { margin-top: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 12px 0; border-top: 1px solid var(--line); }
.sjc-feature-ask {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
}
.sjc-feature-ask legend { font-weight: 700; padding: 0 6px; }
.sjc-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.sjc-check input { width: auto; margin-top: 4px; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2, .hub-tiles, .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--cream); padding: 12px 16px 20px; border-bottom: 1px solid var(--line); }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2, .hub-tiles, .footer-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
}
