/* Christmas in Maryland (cim-home v1.1.5). Loaded only on the pages set in the cim_home_page_id and cim_media_page_id options. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.cim-home {
  margin: 0;
  background: #10201A;
  color: #1A1714;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.cim-home *, body.cim-home *::before, body.cim-home *::after { box-sizing: border-box; }
body.cim-home [hidden] { display: none !important; }

/* Keep the Elementor kit's global typography from leaking into the design. Inline styles still win. */
body.cim-home h1, body.cim-home h2, body.cim-home h3, body.cim-home p, body.cim-home figcaption, body.cim-home dd, body.cim-home dt, body.cim-home li {
  color: inherit; text-transform: none; letter-spacing: normal; font-family: inherit;
}
body.cim-home img { max-width: 100%; height: auto; }

body.cim-home a { color: #B3202C; }
body.cim-home a:hover { color: #7E141E; }
body.cim-home a:focus-visible,
body.cim-home button:focus-visible,
body.cim-home input:focus-visible { outline: 2px solid #E0A526; outline-offset: 3px; }

/* Header */
body.cim-home .cim-nav { display: flex; gap: 28px; align-items: center; }
body.cim-home .cim-nav a { color: #F6F1E7; text-decoration: none; font-size: 15px; font-weight: 500; }
body.cim-home .cim-nav a:hover { color: #E0A526; }
body.cim-home .cim-cta { display: inline-flex; }
body.cim-home .cim-cta:hover { background: #F2C14E !important; color: #10201A !important; }
body.cim-home .cim-menu { display: none; }
body.cim-home .cim-mobile-nav { display: flex; flex-direction: column; padding: 4px 24px 20px; border-top: 1px solid rgba(246, 241, 231, 0.12); }
body.cim-home .cim-mobile-nav a { display: flex; align-items: center; min-height: 48px; color: #F6F1E7; text-decoration: none; font-size: 18px; font-weight: 600; border-bottom: 1px solid rgba(246, 241, 231, 0.08); }
body.cim-home .cim-mobile-nav a:hover { color: #E0A526; }
@media (max-width: 900px) {
  body.cim-home .cim-nav, body.cim-home .cim-cta { display: none; }
  body.cim-home .cim-menu { display: inline-flex; }
}
@media (min-width: 901px) { body.cim-home .cim-mobile-nav { display: none !important; } }

body.cim-home .cim-ghost:hover { background: rgba(246, 241, 231, 0.08) !important; }

/* Player */
body.cim-home .cim-i-play, body.cim-home .cim-i-pause { display: block; }
body.cim-home .cim-seek {
  --p: 0%;
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 6px; margin: 22px 0 0; padding: 0;
  border-radius: 999px; cursor: pointer;
  background: linear-gradient(#E0A526, #E0A526) 0 0 / var(--p) 100% no-repeat, rgba(246, 241, 231, 0.15);
}
body.cim-home .cim-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #E0A526; border: 2px solid #10201A; }
body.cim-home .cim-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #E0A526; border: 2px solid #10201A; }
body.cim-home .cim-seek::-moz-range-track { background: transparent; }

/* Hour tabs */
body.cim-home .cim-hour-tab {
  min-height: 44px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(246, 241, 231, 0.3); background: transparent; color: #F6F1E7;
  font: 600 15px 'Figtree', system-ui, sans-serif; letter-spacing: normal; text-transform: none; box-shadow: none;
}
body.cim-home .cim-hour-tab:hover { background: rgba(246, 241, 231, 0.08); color: #F6F1E7; }
body.cim-home .cim-hour-tab[aria-pressed="true"],
body.cim-home .cim-hour-tab[aria-pressed="true"]:hover { border-color: #E0A526; background: #E0A526; color: #10201A; font-weight: 700; }

/* Footer */
body.cim-home .cim-foot a { color: #F6F1E7; text-decoration: none; }
body.cim-home .cim-foot a:hover { color: #E0A526; }

/* Phone spacing */
@media (max-width: 640px) {
  body.cim-home .cim-pad { padding-top: 64px !important; padding-bottom: 64px !important; padding-left: 20px !important; padding-right: 20px !important; }
  body.cim-home .cim-pad-hero { padding-top: 48px !important; padding-left: 20px !important; padding-right: 20px !important; gap: 36px !important; }
}
@media (max-width: 640px) {
  body.cim-home .cim-stop, body.cim-home .cim-tile { flex-basis: 140px !important; }
  body.cim-home .cim-stop > div:last-child { padding-right: 12px !important; }
  body.cim-home .cim-stop h3 { font-size: 20px !important; }
  body.cim-home .cim-stop p { font-size: 14px !important; }
  body.cim-home .cim-tile-title { font-size: 17px !important; }
}

/* v1.0.1 (from CC's live check): neutralize Hello Elementor reset.css leaks */
body.cim-home figcaption { font-style: normal; font-size: inherit; line-height: inherit; }
body.cim-home [data-cim-menu], body.cim-home [data-cim-play] { padding: 0; }
body.cim-home a { text-decoration: underline; }

/* ===== v1.1.0: Media page (body.cim-media) ===== */
body.cim-home .cim-filterbar { top: 0; }
body.admin-bar.cim-home .cim-filterbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar.cim-home .cim-filterbar { top: 46px; } }
body.cim-home article[id] { scroll-margin-top: 96px; }

body.cim-home .cim-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid #D8CCB6; background: #FFFDF8; color: #1A1714;
  font: 600 15px 'Figtree', system-ui, sans-serif; letter-spacing: normal; text-transform: none; white-space: nowrap; cursor: pointer; box-shadow: none;
}
body.cim-home .cim-chip span { font-family: 'IBM Plex Mono', monospace; font-size: 12px; opacity: 0.75; }
body.cim-home .cim-chip:hover { border-color: #10201A; background: #FFFFFF; color: #1A1714; }
body.cim-home .cim-chip[aria-pressed="true"], body.cim-home .cim-chip[aria-pressed="true"]:hover { border-color: #10201A; background: #10201A; color: #F6F1E7; }

body.cim-home .cim-seek-mini { height: 4px; margin: 8px 0 2px; }
body.cim-home .cim-seek-mini::-webkit-slider-thumb { width: 12px; height: 12px; }
body.cim-home .cim-seek-mini::-moz-range-thumb { width: 10px; height: 10px; }
body.cim-home [data-cim-mini-play] { padding: 0; }
body.cim-home [data-cim-gallery] { font-family: inherit; }
body.cim-home .cim-story-text p + p { margin-top: 12px !important; }
body.cim-home .cim-story-text a { color: #B3202C; }

/* Dialogs (lightbox + video) */
body.cim-home .cim-dialog {
  width: min(1100px, 100vw); max-width: 100vw; max-height: 100vh; margin: auto; padding: 0;
  border: 0; border-radius: 20px; background: #0B1712; color: #F6F1E7; overflow: hidden;
}
body.cim-home .cim-dialog::backdrop { background: rgba(6, 12, 9, 0.88); }
body.cim-home .cim-dialog-top { display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 22px; border-bottom: 1px solid rgba(246, 241, 231, 0.12); }
body.cim-home .cim-dialog-title { flex: 1 1 auto; min-width: 0; margin: 0; font-family: 'Bodoni Moda', serif; font-size: 22px; font-weight: 600; line-height: 1.2; color: #F6F1E7; }
body.cim-home .cim-dialog-count { flex: none; display: flex; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: #B9C4BC; }
body.cim-home .cim-dialog-close, body.cim-home .cim-lb-nav, body.cim-home .cim-vb-pick {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0;
  border-radius: 999px; border: 1px solid rgba(246, 241, 231, 0.25); background: transparent; color: #F6F1E7; cursor: pointer; box-shadow: none;
}
body.cim-home .cim-dialog-close:hover, body.cim-home .cim-lb-nav:hover, body.cim-home .cim-vb-pick:hover { background: rgba(246, 241, 231, 0.1); color: #F6F1E7; }
body.cim-home .cim-vb-pick { padding: 0 14px; font: 600 13px 'Figtree', system-ui, sans-serif; }
body.cim-home .cim-vb-pick[aria-pressed="true"] { background: #E0A526; border-color: #E0A526; color: #10201A; }
body.cim-home .cim-lightbox { position: fixed; }
body.cim-home .cim-lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; padding: 16px 72px 18px; }
body.cim-home .cim-lb-figure img { display: block; max-width: 100%; max-height: calc(100vh - 170px); width: auto; height: auto; object-fit: contain; border-radius: 10px; }
body.cim-home .cim-lb-figure figcaption { margin-top: 12px; font-size: 15px; color: #B9C4BC; text-align: center; }
body.cim-home .cim-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(11, 23, 18, 0.7); }
body.cim-home .cim-lb-prev { left: 14px; }
body.cim-home .cim-lb-next { right: 14px; }
body.cim-home .cim-vb-video { display: block; width: 100%; max-height: calc(100vh - 90px); background: #000; }

@media (max-width: 640px) {
  body.cim-home .cim-chips { flex-wrap: nowrap !important; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
  body.cim-home .cim-filterbar > div { padding: 12px 20px !important; }
  body.cim-home .cim-pad-list { padding: 20px 14px 56px !important; gap: 16px !important; }
  body.cim-home .cim-story-photo { min-height: 230px !important; }
  body.cim-home .cim-story-body { padding: 22px 20px 24px !important; }
  body.cim-home .cim-story-title { font-size: 26px !important; }
  body.cim-home .cim-dialog { width: 100vw; max-height: 100vh; border-radius: 0; }
  body.cim-home .cim-lb-figure { padding: 12px 8px 16px; }
  body.cim-home .cim-lb-nav { top: auto; bottom: 10px; transform: none; }
}
@media (max-width: 640px) {
  body.cim-home .cim-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.cim-home .cim-mosaic { display: none !important; }
}

/* v1.1.1 (CC live check): Hello reset.css sets button line-height 1.5; the photo badges expect the browser default. */
body.cim-home button[data-cim-gallery] { line-height: normal; }

/* v1.1.2 (CC live check): the filter bar has an inline top:0, so the admin-bar offsets need !important.
   WP fixes the admin bar at 32px (desktop) / 46px (<=782px); at <=600px it is position:absolute and scrolls away. */
body.admin-bar.cim-home .cim-filterbar { top: 32px !important; }
@media (max-width: 782px) { body.admin-bar.cim-home .cim-filterbar { top: 46px !important; } }
@media (max-width: 600px) { body.admin-bar.cim-home .cim-filterbar { top: 0 !important; } }

/* v1.1.3-1.1.5 (CC live check; !important because each article has an inline scroll-margin-top): the sticky bar is 77-161px tall depending on width (more under the admin bar); cim-home.js measures it into --cim-bar. */
body.cim-home article[id] { scroll-margin-top: calc(var(--cim-bar, 77px) + 19px) !important; }
