/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Heraldic rather than horticultural. This site was forked from
     gemshowdirectory and inherited its forest-green palette wholesale, which
     left two sites in the same portfolio looking like one template — weak
     branding, and a footprint worth not having. Burgundy, antique gold and
     parchment are period-appropriate and share nothing with the sister site. */
  --brand: #7c2334;
  --brand-dark: #5c1826;
  --brand-amber: #b8892b;
  --gold: #c9a227;
  --bg: #f6f1e6;
  --surface: #fffdf8;
  --text: #221b18;
  --muted: #6d625a;
  --border: #e3d9c6;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(60,40,20,0.10);
  /* A serif display face is the other half of the separation: the sister site
     is sans-everything, and nothing changes a page's character faster. System
     stack only — no webfont request. */
  --display: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --wordmark: "Cinzel", "Trajan Pro", "EB Garamond", Georgia, serif;
}
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
/* Garamond runs small and light for its point size, so headings get a nudge up
   in size and weight to hold the same presence as the sans they replaced. */
h1, h2, h3, .hero h1, .guide-hero h1, .event-title, .nearby-card h3 {
  font-family: var(--display); font-weight: 700; letter-spacing: 0.005em; }
h1, .hero h1 { font-size: 2.7rem; }
h2 { font-size: 1.65rem; }
.logo-text { font-family: var(--wordmark); font-weight: 700; letter-spacing: 0.04em; font-size: 1.15rem; }
/* Body stays sans: this is a directory people scan for dates and towns, and a
   serif body would cost more in scanning speed than it returns in character. */
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ── */
.site-header { background: #35121d; color: #fff; padding: 1rem 0; position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--gold); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; text-decoration: none; }
.logo:hover { text-decoration: none; color: var(--gold); }
.logo-crest { font-size: 1.5rem; flex-shrink: 0; }
.logo-text { line-height: 1; white-space: nowrap; }
.site-header nav { display: flex; gap: 1.5rem; align-items: center; margin-left: auto; }
.site-header nav a { color: #e3cfc4; font-size: 0.95rem; }
.site-header nav a:hover { color: #fff; text-decoration: none; }
.btn-submit { background: var(--brand-amber); color: #2a1a10 !important; padding: 0.5rem 1.2rem; border-radius: var(--radius); font-weight: 600; }
.btn-submit:hover { background: var(--gold) !important; }
.site-header nav a { white-space: nowrap; }
/* Phones: logo on its own line, nav wraps underneath. Without this the nav
   overflowed the viewport (610px on a 390px phone) and Safari zoomed the
   whole page out to fit it — header stopped at 70% width, nav hung off the edge. */
@media (max-width: 768px) {
  .site-header { padding: 0.6rem 0; position: static; } /* two rows on a phone — do not pin it */
  /* Row 1: wordmark and the submit button. Row 2: the nav, spread full width.
     Ordering is explicit so the button cannot drift onto a row of its own. */
  .site-header .container { flex-wrap: wrap; row-gap: 0.6rem; column-gap: 0.75rem; }
  /* flex:0 1 auto, NOT 1 1 auto — with grow the logo took the whole 342px row
     for 185px of text and pushed the button onto its own line. */
  .logo { order: 1; flex: 0 1 auto; min-width: 0; }
  .btn-submit { order: 2; flex: 0 0 auto; margin-left: auto; padding: 0.4rem 0.85rem; font-size: 0.88rem; }
  .site-header nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap;
    justify-content: space-between; gap: 0.35rem 0.75rem; }
  .site-header nav a { font-size: 0.9rem; }
}

/* Cinzel caps are wider than the sans they replaced: at 390px the wordmark and
   the button together needed ~370px of a 342px row, so both step down rather
   than the button wrapping. */
@media (max-width: 480px) {
  .logo-crest { font-size: 1.25rem; }
  .logo-text { font-size: 0.84rem; letter-spacing: 0.02em; }
  .btn-submit { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
  .site-header .container { column-gap: 0.5rem; padding: 0 1rem; }
}
html, body { overflow-x: hidden; }

/* ── Hero ── */
.hero { background: linear-gradient(150deg, #35121d 0%, #6d1f31 55%, #43141f 100%); color: #fff;
  padding: 4rem 0 3rem; text-align: center; border-bottom: 3px solid var(--gold); }
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 0.75rem; }
.hero p { font-size: 1.1rem; color: #e8cfae; margin-bottom: 2rem; }

/* ── Search Pill ── */
.search-bar { max-width: 960px; margin: 0 auto; }
/* nowrap on desktop: the fields flex-grow to fill the row, so any width the
   border takes pushes the Search button onto a line of its own. Let the fields
   shrink instead. The mobile rule below switches to a column, where wrapping
   is moot. */
.search-pill { display: flex; align-items: center; background: var(--surface); border-radius: 8px;
  border: 2px solid var(--gold); box-shadow: 0 6px 22px rgba(0,0,0,0.28); overflow: visible;
  flex-wrap: nowrap; padding: 0; }
.sp-field { display: flex; align-items: center; gap: 0.4rem; padding: 0 1rem; flex: 1; min-width: 0; position: relative; }
.sp-field--keyword { flex: 2; min-width: 160px; }
.sp-field--location { flex: 1.5; min-width: 140px; }
.sp-field--select { flex: 0 0 auto; padding: 0 0.5rem; }
.sp-field--category { flex: 0 0 auto; min-width: 140px; }
.sp-field--daterange { flex: 0 0 auto; min-width: 200px; }
.sp-icon { width: 16px !important; height: 16px !important; max-width: 16px; max-height: 16px; color: #9ca3af; flex-shrink: 0; display: block; }
.sp-field input { border: none; outline: none; background: transparent; font-size: 0.9rem; color: var(--text); width: 100%; padding: 0.9rem 0; line-height: 1; }
.sp-field input::placeholder { color: #9ca3af; }
.sp-field select { border: none; outline: none; background: transparent; font-size: 0.88rem; color: var(--text); cursor: pointer; padding: 0.9rem 0.25rem; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 20px; }
.sp-field select:focus { outline: none; }
.sp-divider { width: 1px; height: 28px; background: #e5e7eb; flex-shrink: 0; }
.sp-btn { background: var(--brand); color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 5px; font-size: 0.95rem; font-weight: 600; cursor: pointer; white-space: nowrap; margin: 5px 5px 5px 0; flex-shrink: 0; }
.sp-btn:hover { background: var(--brand-dark); }
.sp-error { font-size: 0.72rem; color: #c00; position: absolute; bottom: 2px; left: 2.2rem; white-space: nowrap; }

/* ── Events Grid ── */
.events-section { padding: 2.5rem 0; }
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.event-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; color: var(--text);
  border: 1px solid var(--border); border-top: 3px solid var(--brand); }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.11); text-decoration: none; }
.event-img-wrap { position: relative; height: 210px; overflow: hidden; flex-shrink: 0; }
.event-img { width: 100%; height: 100%; object-fit: contain; background: #f1ede6; display: block; }
.event-img-placeholder { height: 210px; flex-shrink: 0; background: linear-gradient(140deg, #35121d, #6d1f31); display: flex; align-items: center; justify-content: center; }
.faire-icon { display: flex; align-items: center; justify-content: center;
  /* Sized as a share of the tile so it always reads as ~45% of the green box,
     whatever the card width. A fixed rem looked like a stray character. */
  height: 46%; aspect-ratio: 1 / 1; border-radius: 50%;
  font-size: clamp(2.6rem, 3.4vw, 4.2rem); line-height: 1;
  background: radial-gradient(circle at 50% 42%, rgba(255,252,240,0.97) 0%, rgba(238,232,214,0.93) 62%, rgba(212,203,180,0.9) 100%);
  box-shadow: inset 0 0 0 3px rgba(201,162,39,0.75), 0 4px 14px rgba(0,0,0,0.35); }
.faire-icon--sm { height: 60%; font-size: clamp(1.7rem, 2.2vw, 2.4rem); box-shadow: inset 0 0 0 2px rgba(201,130,30,0.5), 0 2px 8px rgba(0,0,0,0.25); }
.detail-hero-placeholder { height: clamp(200px, 32vw, 340px); background: linear-gradient(140deg, #35121d, #6d1f31);
  border-radius: 12px; margin: 1.25rem 0 2rem; display: flex; align-items: center; justify-content: center; }
/* The hero disc is ~156px against the card's ~96px, so the glyph needs its
   own scale or it sits marooned in the middle of it. */
.detail-hero-placeholder .faire-icon { font-size: clamp(3.6rem, 6.5vw, 6.2rem); }
.img-fit-cover { object-fit: cover !important; padding: 0 !important; }
.img-fit-contain { object-fit: contain !important; }
.detail-hero-img { width: 100%; height: clamp(200px, 32vw, 340px); object-fit: contain; background: #f1ede6; border-radius: 12px; margin: 1.25rem 0 2rem; display: block; padding: 0.75rem; }
.event-info { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.event-category--alt { opacity: 0.72; margin-left: 0.4rem; }
.event-category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--brand); letter-spacing: 0.5px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.event-tag { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 3px; padding: 2px 6px; }
.event-tag--past { background: #6b7280; color: #fff; opacity: 0.85; }
.event-info h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.event-date, .event-location { font-size: 0.875rem; color: var(--muted); }
.event-distance { font-size: 0.8rem; color: #c9821e; font-weight: 600; }
.badge-free { display: inline-block; background: #d1fae5; color: #065f46; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; margin-top: auto; }
.badge-paid { display: inline-block; background: #fef3c7; color: #92400e; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 99px; margin-top: auto; }

/* ── Pagination ── */
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 2.5rem; }
.pagination a { background: var(--surface); border: 1px solid var(--border); padding: 0.5rem 1.2rem; border-radius: var(--radius); }
.pagination span { color: var(--muted); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 4rem 0; color: var(--muted); font-size: 1.1rem; }

/* ── Event Detail ── */
.detail-meta { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.detail-row { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.95rem; }
.detail-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.detail-desc { line-height: 1.8; color: var(--text); background: var(--bg); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; border: 1px solid var(--border); }
.report-section { font-size: 0.9rem; }

/* ── Buttons ── */
.btn-primary { display: inline-block; background: var(--brand); color: #fff; padding: 0.75rem 1.75rem; border-radius: var(--radius); font-weight: 600; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn-secondary { display: inline-block; background: var(--surface); color: var(--text); padding: 0.75rem 1.75rem; border-radius: var(--radius); font-weight: 600; border: 1px solid var(--border); cursor: pointer; font-size: 1rem; }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }

/* ── Footer ── */
.site-footer { background: #35121d; color: #b99a86; border-top: 3px solid var(--gold); text-align: center; padding: 1.5rem 0; font-size: 0.875rem; margin-top: 3rem; }
.site-footer a { color: var(--gold); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .events-grid { grid-template-columns: 1fr; }
  .search-pill { border-radius: var(--radius); flex-direction: column; align-items: stretch; padding: 0.5rem; gap: 0; }
  .sp-field { border-bottom: 1px solid #f3f4f6; padding: 0 0.75rem; }
  .sp-field:last-of-type { border-bottom: none; }
  .sp-field--select, .sp-field--category, .sp-field--daterange { flex: 1; min-width: unset; }
  .sp-divider { display: none; }
  .sp-btn { margin: 0.5rem 0 0; border-radius: var(--radius); width: 100%; padding: 0.75rem; }
}

/* ── Guide pages ── */
.guide-hero {
  background: linear-gradient(150deg, #35121d 0%, #6d1f31 55%, #43141f 100%);
  color: #fff;
  padding: 3.5rem 0 2.5rem;
}
.guide-breadcrumb { font-size: 0.82rem; color: #e8cfae; margin-bottom: 0.75rem; }
.guide-breadcrumb a { color: var(--gold); text-decoration: none; }
.guide-breadcrumb a:hover { color: #fff; }
.guide-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.25; }
.guide-subtitle { font-size: 1.05rem; color: #b8d4b5; }
.guide-body { display: grid; grid-template-columns: 1fr 260px; gap: 3rem; max-width: 1000px; margin: 0 auto; padding: 3rem 1.5rem 5rem; align-items: start; }
.guide-intro { font-size: 1.08rem; line-height: 1.85; color: var(--text); margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.guide-content h2 { font-size: 1.35rem; font-weight: 800; margin: 2.25rem 0 0.75rem; color: var(--text); }
.guide-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--text); }
.guide-content p { font-size: 0.98rem; line-height: 1.85; color: var(--text); margin-bottom: 1rem; }
.guide-content ul, .guide-content ol { padding-left: 1.4rem; margin: 0.5rem 0 1.25rem; }
.guide-content li { font-size: 0.97rem; line-height: 1.75; color: var(--text); margin-bottom: 0.5rem; }
.guide-content ul.checklist { list-style: none; padding-left: 0; }
.guide-content ul.checklist li { padding-left: 1.75rem; position: relative; }
.guide-content ul.checklist li::before { content: '☐'; position: absolute; left: 0; color: var(--brand); font-size: 1rem; }
.guide-sidebar { position: sticky; top: 80px; }
.guide-tip-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.guide-tip-box h3 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); margin-bottom: 0.75rem; }
.guide-tip-box ul { padding-left: 1.25rem; margin: 0; }
.guide-tip-box li { font-size: 0.88rem; line-height: 1.6; color: var(--text); margin-bottom: 0.3rem; }
.guide-cta { display: block; background: var(--brand); color: #fff; text-align: center; padding: 0.85rem 1rem; border-radius: var(--radius); font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.guide-cta:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.guide-tip-box a { color: var(--brand); text-decoration: underline; }
@media (max-width: 768px) {
  .guide-body { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .guide-hero h1 { font-size: 1.6rem; }
}

/* ── Ad slots (manual AdSense units; see templates/public/_ad.html) ── */
.ad-slot { margin: 2rem auto; max-width: 100%; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
