/*
Theme Name: Hub City Summer Guide
Theme URI: https://www.hattiesburgms.com/
Author: City of Hattiesburg
Description: A responsive WordPress theme for the annual Hub City Summer Guide, with CSV-importable summer events and family-friendly guide sections.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: hub-city-summer-guide
*/

:root {
  --sun: #f9c846;
  --coral: #ef5d50;
  --aqua: #1aa6b7;
  --mint: #7bc950;
  --ink: #183044;
  --paper: #fffaf0;
  --cloud: #ffffff;
  --sky: #dff5fb;
  --line: rgba(24, 48, 68, 0.16);
  --shadow: 0 18px 45px rgba(24, 48, 68, 0.16);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.summer-guide {
  overflow-x: hidden;
}

.guide-hero {
  min-height: 88vh;
  display: grid;
  align-items: end;
  background:
    linear-gradient(180deg, rgba(24, 48, 68, 0.08), rgba(24, 48, 68, 0.72)),
    var(--hero-image) center / cover no-repeat;
  color: #fff;
  position: relative;
}

.guide-hero__inner,
.guide-section__inner,
.guide-nav__inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.guide-hero__inner {
  padding: 84px 0 46px;
}

.guide-hero__tag {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-hero h1 {
  max-width: 920px;
  margin: 18px 0 12px;
  font-size: clamp(3.2rem, 9vw, 8.4rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-hero__dek {
  max-width: 720px;
  margin: 0 0 28px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 650;
}

.guide-actions,
.guide-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.guide-button {
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cloud);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 15px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(24, 48, 68, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.guide-button:hover,
.guide-button:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(24, 48, 68, 0.18);
}

.guide-button--sun {
  background: var(--sun);
}

.guide-button--ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: #fff;
}

.guide-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 250, 240, 0.96);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(10px);
}

.guide-nav__bar,
.guide-nav__inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.guide-nav__bar {
  display: none;
}

.guide-nav__toggle {
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.guide-nav__toggle:hover,
.guide-nav__toggle:focus-visible {
  box-shadow: 6px 6px 0 rgba(24, 48, 68, 0.18);
  transform: translate(-1px, -1px);
}

.guide-nav__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 0;
}

.guide-nav a {
  padding: 8px 11px;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.guide-nav a:hover,
.guide-nav a:focus-visible {
  background: var(--sky);
}

.guide-section {
  padding: 72px 0;
}

.guide-section--sky {
  background: var(--sky);
}

.guide-section--ink {
  background: var(--ink);
  color: #fff;
}

.guide-section--sun {
  background: #ffe592;
}

.calendar-jump {
  padding: 24px 0;
  background: var(--cloud);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  text-align: center;
}

.calendar-jump .guide-section__inner {
  display: flex;
  justify-content: center;
}

.guide-section__head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.55fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
}

.guide-section__head img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.guide-section h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-section__intro {
  margin: 12px 0 0;
  max-width: 680px;
  font-size: 1.05rem;
  font-weight: 600;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide-card,
.event-card,
.park-card,
.message-panel {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cloud);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.guide-card {
  overflow: hidden;
}

.guide-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.guide-card__body,
.park-card,
.event-card,
.message-panel {
  padding: 18px;
}

.guide-card h3,
.event-card h3,
.park-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.16;
}

.guide-card p,
.event-card p,
.park-card p,
.message-panel p {
  margin: 0;
}

.section-subhead {
  margin: 30px 0 14px;
  max-width: 760px;
}

.section-subhead h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
}

.section-subhead p {
  margin: 8px 0 0;
  font-weight: 650;
}

.message-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 0.3fr);
  gap: 22px;
  align-items: stretch;
}

.mayor-letter {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.mayor-letter__photo {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}

.mayor-letter__photo img {
  width: 180px;
  aspect-ratio: 1;
  margin: 0 auto 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
}

.mayor-letter__photo h3,
.mayor-letter__photo p {
  margin: 0;
}

.mayor-letter .message-panel p + p {
  margin-top: 14px;
}

.mayor-letter .message-panel h2 {
  margin-bottom: 24px;
}

.mayor-signoff {
  margin-top: 20px;
}

.mayor-signoff img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  margin: 8px 0 6px;
}

.message-panel {
  background: #fff;
  min-height: 100%;
}

.message-panel--accent {
  background: var(--sun);
}

.toc-list {
  list-style: none;
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
}

.toc-list a {
  display: block;
  padding: 10px 12px;
  border: 2px solid currentColor;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 26px;
  align-items: center;
}

.feature-band img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.detail-item {
  border-left: 7px solid var(--coral);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px 16px;
  border-radius: var(--radius);
}

.detail-item:nth-child(2n) {
  border-left-color: var(--aqua);
}

.detail-item:nth-child(3n) {
  border-left-color: var(--mint);
}

.detail-item strong {
  display: block;
  margin-bottom: 3px;
}

.summer-movies-section .detail-item {
  background: #fff;
  color: var(--ink);
  border-left-color: var(--sun);
}

.summer-movies-section .detail-item:nth-child(2n) {
  border-left-color: var(--aqua);
}

.summer-movies-section .detail-item:nth-child(3n) {
  border-left-color: var(--coral);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.schedule-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  box-shadow: none;
}

.schedule-card h3 {
  margin: 0 0 6px;
}

.schedule-card__theme {
  margin: 0 0 12px;
  color: var(--coral);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.schedule-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.park-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.weekly-groups {
  display: grid;
  gap: 28px;
}

.weekly-group h3 {
  margin: 0 0 12px;
}

.weekly-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.weekly-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
}

.weekly-card h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.weekly-card dl {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.weekly-card dt {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.weekly-card dd {
  margin: 2px 0 0;
}

.weekly-card p {
  margin: 0;
}

.park-card {
  box-shadow: none;
  display: block;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.park-card:hover,
.park-card:focus-visible {
  box-shadow: 6px 6px 0 rgba(24, 48, 68, 0.18);
  transform: translate(-1px, -1px);
}

.park-card__amenities {
  margin-top: 10px;
  font-size: 0.83rem;
  font-weight: 850;
  text-transform: uppercase;
}

.guide-filterbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.guide-filterbar label {
  display: grid;
  grid-template-rows: 16px 42px;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.guide-filterbar input,
.guide-filterbar select {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
}

.guide-filterbar .guide-button {
  height: 42px;
  min-width: 104px;
}

.event-calendar-stack {
  display: grid;
  gap: 18px;
}

.event-list {
  display: grid;
  gap: 14px;
}

.event-list h3,
.list-week h3 {
  margin: 0;
  font-size: 1.6rem;
  text-align: center;
}

.list-week {
  display: grid;
  gap: 14px;
}

.list-week__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.list-week__events {
  display: grid;
  gap: 14px;
}

.list-week__footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.list-week__footer .guide-button span {
  font-size: 1.2rem;
  line-height: 1;
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  width: min(100%, 310px);
  justify-self: center;
  margin: 0 auto;
}

.view-toggle .guide-button {
  width: 100%;
  gap: 8px;
}

.view-toggle .guide-button[aria-pressed="true"] {
  background: var(--sun);
}

.view-toggle__icon {
  display: inline-grid;
  place-items: center;
  width: 1.1em;
  font-size: 1.08rem;
  line-height: 1;
}

.calendar-view {
  display: grid;
  gap: 28px;
}

.calendar-month__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-month h3 {
  margin: 0;
  font-size: 1.6rem;
  text-align: center;
}

.calendar-month__arrow {
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.calendar-month__arrow:not(:disabled):hover,
.calendar-month__arrow:not(:disabled):focus-visible {
  box-shadow: 6px 6px 0 rgba(24, 48, 68, 0.18);
  transform: translate(-1px, -1px);
}

.calendar-month__arrow:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  background: #fff;
}

.calendar-day {
  position: relative;
  min-height: 150px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #fff;
  padding: 10px;
}

.calendar-weekday {
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--sun);
  padding: 8px 10px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day--blank {
  background: rgba(255, 250, 240, 0.72);
}

.calendar-day h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.calendar-holiday {
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--aqua);
  color: #fff;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
}

.calendar-event {
  position: relative;
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  cursor: help;
  font-size: 0.82rem;
}

.calendar-event:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.calendar-event[hidden],
.event-card[hidden] {
  display: none;
}

[data-view-panel][hidden],
.calendar-month[hidden],
.list-week[hidden] {
  display: none;
}

.calendar-event strong {
  line-height: 1.2;
}

.calendar-event span {
  color: rgba(24, 48, 68, 0.78);
}

.calendar-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: none;
  width: min(300px, 82vw);
  gap: 4px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 12px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.calendar-popover::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 14px;
  width: 12px;
  height: 12px;
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
  background: #fff;
  transform: rotate(45deg);
}

.calendar-popover--right {
  right: 0;
  left: auto;
}

.calendar-popover--right::before {
  right: 14px;
  left: auto;
}

.calendar-popover strong,
.calendar-popover span {
  display: block;
}

.calendar-popover span {
  color: rgba(24, 48, 68, 0.82);
  font-weight: 750;
}

.calendar-popover p {
  margin: 6px 0 0;
}

.calendar-event:hover .calendar-popover,
.calendar-event:focus .calendar-popover,
.calendar-event:focus-within .calendar-popover {
  display: grid;
}

.event-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 16px;
  box-shadow: none;
}

.event-card__date {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 112px;
  border-radius: var(--radius);
  background: var(--sun);
  border: 2px solid var(--ink);
  text-align: center;
  font-weight: 900;
}

.event-card__date span {
  display: block;
}

.event-card__meta {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.event-card__meta strong {
  font-weight: 900;
}

.event-empty {
  display: none;
  padding: 22px;
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 800;
}

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.partner-row a {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.partner-row a:hover,
.partner-row a:focus-visible {
  box-shadow: 7px 7px 0 rgba(24, 48, 68, 0.42);
  transform: translate(-1px, -1px);
}

#star-spangled .partner-row a:hover,
.guide-section--ink .partner-row a:hover,
#star-spangled .partner-row a:focus-visible,
.guide-section--ink .partner-row a:focus-visible {
  box-shadow: 8px 8px 0 rgba(248, 198, 79, 0.92);
}

#pocket-museum .partner-row a {
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
}

#pocket-museum .partner-row a:hover,
#pocket-museum .partner-row a:focus-visible {
  box-shadow: 8px 8px 0 rgba(239, 93, 80, 0.82);
}

.footer-guide {
  padding: 44px 0;
  background: #102436;
  color: #fff;
  text-align: center;
}

.footer-guide__inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.footer-guide__seal {
  width: 104px;
  height: 104px;
  margin-bottom: 8px;
  object-fit: contain;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.footer-guide p {
  margin: 0;
}

.footer-guide__title {
  font-weight: 900;
  font-size: 1.1rem;
}

.footer-guide a {
  color: #fff;
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (max-width: 920px) {
  .guide-section__head,
  .message-grid,
  .mayor-letter,
  .feature-band {
    grid-template-columns: 1fr;
  }

  .guide-card-grid,
  .park-grid,
  .detail-list,
  .weekly-card-grid,
  .schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-filterbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .guide-hero {
    min-height: 82vh;
  }

  .guide-section {
    padding: 50px 0;
  }

  .guide-nav__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
  }

  .guide-nav__bar strong {
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .guide-nav__inner {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 0 12px;
  }

  .guide-nav.is-open .guide-nav__inner {
    display: grid;
  }

  .guide-nav a {
    border: 2px solid var(--line);
    background: #fff;
    padding: 10px;
    text-align: center;
    white-space: normal;
  }

  .guide-card-grid,
  .park-grid,
  .detail-list,
  .weekly-card-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-card__date {
    min-height: 76px;
  }

  .guide-button {
    width: 100%;
  }

  .guide-filterbar {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
    align-items: end;
  }

  .guide-filterbar label {
    min-width: 0;
  }

  .guide-filterbar .guide-button {
    width: 100%;
  }

  .calendar-month h3 {
    font-size: 1.35rem;
  }

  .calendar-month__header {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .list-week__header {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .calendar-month__arrow {
    min-height: 36px;
  }

  .calendar-weekday {
    padding: 6px 2px;
    font-size: 0.62rem;
  }

  .calendar-day {
    min-height: 92px;
    padding: 5px 3px;
  }

  .calendar-day h4 {
    margin-bottom: 4px;
    font-size: 0.75rem;
  }

  .calendar-holiday {
    padding: 2px 3px;
    font-size: 0.5rem;
  }

  .calendar-event {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .calendar-event strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .calendar-event span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-event__location {
    display: none;
  }

  .calendar-popover {
    position: fixed;
    left: var(--popover-left, 10px);
    right: auto;
    top: var(--popover-top, 50%);
    width: min(300px, calc(100vw - 20px));
    max-height: min(70vh, 360px);
    overflow-y: auto;
  }

  .calendar-popover::before {
    display: none;
  }
}
