/*
 * main.css — Talbot County Tourism
 * Navy / Gold / Cream palette · Playfair Display + Jost
 */

/* ════════════════════════════════════════════════════
   TOKENS
════════════════════════════════════════════════════ */
:root {
  --navy:        #1a2d4a;
  --navy-dark:   #0f1e33;
  --navy-mid:    #243a5e;
  --gold:        #c9a96e;
  --gold-light:  #dfc49a;
  --gold-dark:   #a8844e;
  --cream:       #f5f2ec;
  --cream-dark:  #ede8df;
  --white:       #ffffff;
  --text:        #2c2c2c;
  --text-muted:  #666;
  --border:      #ddd;

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;

  --radius:   4px;
  --radius-lg: 8px;
  --shadow:   0 2px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.18);

  --panel-width: 540px;
  --container: 1200px;
  --content-width: 824px;
  --grid-gap: 24px;
}

/* ════════════════════════════════════════════════════
   RESET / BASE
════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

body.panel-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ════════════════════════════════════════════════════
   ARCHIVE HERO
════════════════════════════════════════════════════ */
.archive-hero {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 72px 24px 60px;
}

.archive-hero__eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.archive-hero__title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
}

/* ════════════════════════════════════════════════════
   FILTER BAR
════════════════════════════════════════════════════ */
.archive-filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.archive-filter-bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.archive-filter-bar__label {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--navy);
  white-space: nowrap;
}

.archive-filter-bar__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--navy);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  transition: background .18s, color .18s;
  text-decoration: none;
}
.filter-chip:hover,
.filter-chip--active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.archive-filter-bar__search {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.filter-search {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-family: var(--font-body);
  font-size: .85rem;
  width: 180px;
  background: transparent;
}

.filter-search__btn {
  background: transparent;
  border: none;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--navy);
  display: flex;
  align-items: center;
}

.archive-filter-bar__dates {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-date {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: .8rem;
  color: var(--text);
  width: 140px;
}

.filter-date__sep { color: var(--text-muted); font-size: .85rem; }

/* ════════════════════════════════════════════════════
   CARD GRID
════════════════════════════════════════════════════ */
.archive-grid-wrap { padding: 48px 24px 64px; max-width: var(--content-width); margin-left: auto; margin-right: auto; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

@media ( max-width: 1100px ) { .archive-grid { grid-template-columns: repeat(3, 1fr); } }
@media ( max-width: 768px )  { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media ( max-width: 480px )  { .archive-grid { grid-template-columns: 1fr; } }

/* ── Card ─────────────────────────────────────────── */
.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.listing-card--featured {
  border-top: 3px solid var(--gold);
}

/* Card image */
.listing-card__img-wrap {
  display: block;
  position: relative;
  width: 100%;
  padding-top: 66%;    /* 3:2 aspect */
  overflow: hidden;
  background: var(--cream-dark);
  border: none;
  cursor: pointer;
}

.listing-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.listing-card:hover .listing-card__img { transform: scale(1.04); }

.listing-card__img--placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.listing-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--navy-dark);
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}

/* Event date badge */
.event-date-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 6px 10px;
  text-align: center;
  line-height: 1.1;
}
.event-date-badge__month { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.event-date-badge__day   { display: block; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; }

/* Card body */
.listing-card__body {
  padding: 16px 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.listing-card__rating { display: flex; align-items: center; gap: 4px; }

.listing-card__title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
  flex: 1;
}

.listing-card__title-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.listing-card__title-btn:hover { color: var(--gold-dark); }

.listing-card__meta {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.listing-card__meta-sep { margin: 0 4px; }

.listing-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 10px 20px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--gold-dark); }

.btn--lg  { padding: 12px 24px; font-size: .75rem; }
.btn--sm  { padding: 7px 14px;  font-size: .72rem; }
.btn--xs  { padding: 4px 10px;  font-size: .68rem; }

/* ════════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════════ */
.archive-pagination {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.archive-pagination .page-numbers {
  list-style: none;
  display: flex;
  gap: 6px;
}

.archive-pagination .page-numbers li a,
.archive-pagination .page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--navy);
  transition: background .15s;
}

.archive-pagination .page-numbers li a:hover,
.archive-pagination .page-numbers li .current {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.archive-pagination__info {
  font-size: .8rem;
  color: var(--text-muted);
  margin-left: 12px;
}

/* ════════════════════════════════════════════════════
   STARS
════════════════════════════════════════════════════ */
.talbot-stars { display: inline-flex; gap: 2px; }
.star { font-size: .9rem; }
.star--full,
.star--half  { color: var(--gold); }
.star--empty { color: var(--cream-dark); }

/* ════════════════════════════════════════════════════
   DETAIL PANEL
════════════════════════════════════════════════════ */
.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-width);
  max-width: 100vw;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.22, .61, .36, 1);
  overscroll-behavior: contain;
}

.detail-panel--open { transform: translateX(0); }

.detail-panel__close {
  position: sticky;
  top: 0;
  float: right;
  margin: 16px 16px 0 0;
  z-index: 10;
  background: var(--cream);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  transition: background .15s;
}
.detail-panel__close:hover { background: var(--cream-dark); }

.detail-panel__inner { padding: 0 0 48px; clear: both; }

.detail-panel__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.detail-panel__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--cream-dark);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 51, .55);
  z-index: 190;
  backdrop-filter: blur(2px);
  cursor: pointer;
}

/* ════════════════════════════════════════════════════
   SINGLE / PANEL CONTENT
════════════════════════════════════════════════════ */

/* Status bar */
.single-status-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 0;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}
.status-badge--open    { background: #e6f4ea; color: #2e7d32; }
.status-badge--closed  { background: #fce8e8; color: #c62828; }
.status-badge--upcoming{ background: #e8eaf6; color: #3949ab; }
.status-badge--past    { background: #f5f5f5; color: #777; }
.status-badge--choice  { background: var(--cream-dark); color: var(--navy); }
.status-badge__dot     { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.single-rating { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.single-rating__value { font-weight: 700; color: var(--navy); }
.single-rating__count { color: var(--text-muted); font-size: .8rem; }

/* Gallery */
.single-gallery {
  position: relative;
  width: 100%;
  background: var(--navy-dark);
  margin-top: 16px;
}
.single-gallery__img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--navy);
  transition: background .15s;
}
.gallery-nav:hover { background: var(--white); }
.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }

/* Single header */
.single-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.single-title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  flex: 1;
}

/* Meta row */
.single-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 12px 24px;
  font-size: .82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--cream-dark);
}
.single-meta-item { color: var(--text-muted); }
.single-meta-item--phone:hover { color: var(--gold-dark); text-decoration: underline; }
.single-meta-sep { color: var(--border); }
.single-meta-item--hours {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--navy);
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

/* Description */
.single-description {
  padding: 20px 24px;
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text);
}
.single-description p + p { margin-top: 1em; }
.single-description a { color: var(--gold-dark); text-decoration: underline; }

/* Section dividers */
.section-divider { height: 1px; background: var(--cream-dark); margin: 0 24px; }

.section-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  padding: 18px 24px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-collapse-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--navy);
  line-height: 1;
  padding: 0 4px;
}

.single-section__toggle-header {
  padding: 0;
}
.section-collapse-btn--plus {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
}
.section-collapse-btn--plus:hover { color: var(--gold-dark); }

/* Hours grid */
.hours-grid { padding: 0 24px 16px; }
.hours-row  {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: .85rem;
  border-bottom: 1px solid var(--cream-dark);
}
.hours-row--today { font-weight: 700; color: var(--navy); }
.hours-row__day   { color: var(--text-muted); }

/* Amenities */
.amenities-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 24px 20px;
}
.amenity-chip {
  display: inline-block;
  border: 1.5px solid var(--cream-dark);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .78rem;
  color: var(--navy);
  background: var(--white);
}

/* Map */
.single-map {
  margin: 0 24px 20px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Nearby */
.nearby-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 24px 20px;
}
.nearby-card__img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.nearby-card__title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}
.nearby-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Google Reviews stub */
.google-reviews-stub {
  padding: 12px 24px 20px;
}
.google-reviews__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
}

/* Event-specific */
.event-datetime-card {
  margin: 16px 24px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.event-datetime-card__date,
.event-datetime-card__time,
.event-datetime-card__venue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: var(--navy);
}
.event-datetime-card__address {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.event-cta-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 24px 20px;
}

.single-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}
.category-tag {
  display: inline-block;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 4px 12px;
  font-size: .75rem;
  color: var(--text-muted);
}

/* Related cards */
.related-cards { display: flex; flex-direction: column; gap: 12px; padding: 0 24px 20px; }
.related-card  { display: flex; gap: 12px; align-items: flex-start; }
.related-card__img { width: 80px; height: 60px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.related-card__title { font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.related-card__address { font-size: .78rem; color: var(--text-muted); margin-bottom: 8px; }

/* ════════════════════════════════════════════════════
   EMPTY / ERROR
════════════════════════════════════════════════════ */
.archive-empty { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.panel-error   { padding: 32px 24px; color: #c62828; }

/* Panel content on full single pages (rendered via shortcode) */
.panel-content {
  max-width: 824px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* ════════════════════════════════════════════════════
   FULL-PAGE SINGLE (non-panel)
════════════════════════════════════════════════════ */
.talbot-single {
  max-width: 824px;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* ════════════════════════════════════════════════════
   CONTENT WIDTH CONSTRAINT
   Hero and filter bar stay full-width.
   Card grid, pagination, and single content max at 824px.
════════════════════════════════════════════════════ */
.archive-grid-wrap {
  max-width: 824px;
  margin-left: auto;
  margin-right: auto;
}

.archive-filter-bar__inner {
  max-width: 824px;
}

/* Single pages and panel content constrained to 824px */
.talbot-single,
.panel-content {
  max-width: 824px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 80px;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media ( max-width: 600px ) {
  .detail-panel { width: 100vw; }
  .single-header { flex-direction: column; }
  .nearby-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-filter-bar__inner { gap: 12px; }
  .filter-search { width: 130px; }
}