/* =============================================================================
   Breckenridge Recreation Portal — theme styles
   Navy & gold design system (matches the published article template).
   Brand colors are injected as CSS variables in document_head.hbs from the
   theme Settings panel, with fallbacks below.
   ============================================================================= */

:root {
  --brand: #112453;
  --brand-dark: #0d1c40;
  --accent: #b3953d;
  --link: #0066cd;
  --text: #333333;
  --tint: #eef1f7;
  --muted: #6a7080;
  --border: #dcdfe6;
  --white: #ffffff;
  --alt-row: #f4f6fa;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(17, 36, 83, 0.08);
  --shadow-hover: 0 8px 24px rgba(17, 36, 83, 0.16);
  --max: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--brand-dark); line-height: 1.25; font-weight: 700; }

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

.main { flex: 1 0 auto; padding: 40px 0 64px; }

/* Accessibility: visible focus + skip link */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.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;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: var(--accent); color: var(--brand-dark); }
.btn-gold:hover { background: #c8a94d; }
.btn-navy { background: var(--brand); color: #fff; }
.btn-navy:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline-navy { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-outline-navy:hover { background: var(--tint); }

/* ---- Announcement banner ------------------------------------------------- */
.announcement {
  background: var(--accent); color: var(--brand-dark);
  font-weight: 600; text-align: center; padding: 10px 44px 10px 16px; position: relative;
}
.announcement a { color: var(--brand-dark); text-decoration: underline; }
.announcement .close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--brand-dark);
}

/* ---- Header -------------------------------------------------------------- */
.site-header { background: #fff; }

/* Top bar: logo | search | utility links */
.header-top { border-bottom: 1px solid #e5e7eb; }
.header-top-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; padding: 14px 24px;
}
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { max-height: 72px; width: auto; display: block; }
.site-logo:hover { opacity: 0.9; text-decoration: none; }

.header-search { width: 100%; }
.header-search form {
  display: flex; background: #fff; border-radius: 6px;
  border: 2px solid #dde1e8; overflow: hidden;
}
.header-search input[type="search"] {
  flex: 1; border: 0; padding: 10px 16px; font-size: 15px;
  color: var(--text); outline: none; background: #fff;
}
.header-search button {
  border: 0; background: #B8960C; color: #fff;
  padding: 0 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.header-search button:hover { background: #a07d08; }

.header-util-links { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.header-util-links a { font-size: 13px; color: #333; font-weight: 500; }
.header-util-links a:hover { color: var(--brand); text-decoration: none; }
.util-translate {
  background: #cc0000; color: #fff !important;
  padding: 5px 11px; border-radius: 4px;
}
.util-translate:hover { background: #aa0000; text-decoration: none; color: #fff !important; }
.utility-account-link { font-size: 13px; color: #555; font-weight: 500; }
.utility-account-link:hover { color: var(--brand); text-decoration: none; }

/* Primary nav bar */
.header-nav-bar { background: #1a3453; }
.header-nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: stretch; padding: 0 24px;
}
.tob-primary-nav { display: flex; align-items: stretch; }
.tob-nav-link {
  display: flex; align-items: center; padding: 18px 28px;
  color: #fff; font-weight: 700; font-size: 16px; white-space: nowrap;
  transition: background 150ms;
}
.tob-nav-link:hover { background: rgba(255,255,255,.1); text-decoration: none; }

.nav-toggle {
  display: none; margin-left: auto; align-self: center;
  background: none; border: 2px solid rgba(255,255,255,.5); color: #fff;
  border-radius: 6px; padding: 6px 12px; font-size: 15px; cursor: pointer;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; padding: 72px 0 64px; position: relative; text-align: center;
  background-size: cover; background-position: center;
}
.hero.has-image::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,28,64,.72), rgba(13,28,64,.82));
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; }
.hero p.sub { color: rgba(255,255,255,.9); font-size: clamp(16px, 2vw, 20px); margin: 0 auto 28px; max-width: 640px; }

/* two-column CTA */
.hc-columns {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  max-width: 860px;
  margin: 0 auto;
}
.hc-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.hc-col-divider {
  width: 1px;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.hc-col-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
}
.hc-col-body {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
  margin: 0;
  flex: 1;
  text-align: left;
}

.hc-btn {
  display: inline-block;
  padding: 12px 26px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 150ms, color 150ms, border-color 150ms;
  text-align: center;
  align-self: center;
}
.hc-btn-chat {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hc-btn-chat:hover {
  background: #9c7f33;
  border-color: #9c7f33;
  color: #fff;
  text-decoration: none;
}

.hc-btn-ticket {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hc-btn-ticket:hover {
  background: #9c7f33;
  border-color: #9c7f33;
  color: #fff;
  text-decoration: none;
}

/* quick actions */
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* ---- Section headings ---------------------------------------------------- */
.section-block { margin: 56px 0; }
.section-title { font-size: 26px; margin: 0 0 6px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); display: inline-block; }
.section-lead { color: var(--muted); margin: 0 0 24px; }

/* ---- Card grids ---------------------------------------------------------- */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); transition: all .15s ease; display: block; color: var(--text);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); text-decoration: none; border-color: var(--accent); }
.card h3 { margin: 0 0 8px; font-size: 19px; color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px;
}
.card .count { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 700; }

/* facility cards: 5 across on desktop, compact, navy CTA strip pinned to the bottom
   so every "View facility info" sits on the same horizontal line */
.facility-grid { display: grid; gap: 16px; grid-template-columns: repeat(5, 1fr); }
.facility-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.facility-photo {
  display: block; height: 96px; flex: 0 0 auto;
  background-size: cover; background-position: center; background-color: var(--tint);
}
.facility-card .facility-body { padding: 14px 16px; flex: 1 1 auto; }
.facility-card h3 { font-size: 16px; margin: 0; }
.facility-card .card-icon { width: 38px; height: 38px; font-size: 18px; margin-bottom: 10px; border-radius: 10px; }
.facility-card .card-icon svg { width: 20px; height: 20px; }
.facility-card .facility-cta { background: var(--brand); color: #fff; padding: 10px 16px; font-weight: 600; font-size: 13px; margin-top: auto; }

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

/* popular list */
.popular-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.popular-item {
  display: flex; gap: 12px; align-items: center; padding: 16px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; transition: all .15s ease; color: var(--text);
}
.popular-item:hover { background: var(--tint); border-color: var(--accent); text-decoration: none; }
.popular-item .dot { color: var(--accent); font-weight: 700; }

/* ---- Search results (Google-style: path › title › snippet) --------------- */
.results-count { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

.search-results-list { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.search-result { padding: 0 0 26px; }

.result-path { font-size: 13px; color: var(--muted); line-height: 1.4; }
.result-path a { color: var(--muted); }
.result-path a:hover { text-decoration: underline; }
.result-crumb { display: inline; }
.result-crumb + .result-crumb::before { content: "\203A"; margin: 0 6px; color: var(--muted); }

.result-title { display: inline-block; font-size: 19px; font-weight: 600; color: var(--link); margin: 2px 0; line-height: 1.3; }
.result-title:hover { text-decoration: underline; }

.result-snippet { margin: 2px 0 0; color: var(--text); font-size: 14.5px; line-height: 1.55; }
.result-snippet em { font-style: normal; font-weight: 700; color: var(--brand-dark); }

/* ---- Breadcrumbs --------------------------------------------------------- */
.breadcrumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--link); }

/* ---- Content layout (article / lists) ------------------------------------ */
.content-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.sidebar-nav { background: var(--tint); border-radius: var(--radius); padding: 20px; }
.sidebar-nav h2 { font-size: 16px; margin: 0 0 12px; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li { margin-bottom: 6px; }
.sidebar-nav a { color: var(--brand); font-size: 14px; }
.sidebar-nav a.current { font-weight: 700; color: var(--accent); }

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: clamp(26px, 3vw, 36px); margin: 0 0 8px; }
.page-header .desc { color: var(--muted); font-size: 17px; }

/* article body */
.article-body { font-size: 17px; line-height: 1.7; }
.article-body h2 { border-bottom: 3px solid var(--accent); padding-bottom: 6px; margin-top: 36px; }
.article-body img { border-radius: 8px; }
.article-body table { border-collapse: collapse; width: 100%; margin: 20px 0; }
.article-body th { background: var(--brand); color: #fff; text-align: left; padding: 10px 14px; }
.article-body td { padding: 10px 14px; border: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--alt-row); }

.article-meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.article-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

/* generic list of links (sections/articles) */
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--border); }
.link-list li a { display: block; padding: 14px 4px; color: var(--brand); font-weight: 600; }
.link-list li a:hover { color: var(--accent); text-decoration: none; padding-left: 10px; transition: padding .15s ease; }

/* ---- Forms (request, search) --------------------------------------------- */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brand-dark); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; font-family: inherit;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(17,36,83,.12); }

/* ---- Vote / feedback ----------------------------------------------------- */
.article-votes { display: inline-flex; gap: 10px; align-items: center; margin-top: 8px; }
.article-votes button, .article-votes .vote {
  background: var(--tint); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; color: var(--brand);
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer { flex-shrink: 0; background: #0d3d50; color: rgba(255,255,255,.9); margin-top: 0; }
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr 1fr 1fr;
  gap: 40px; padding: 48px 24px; align-items: start;
}
.footer-logo-img { max-height: 130px; width: auto; display: block; }
.footer-col-address { font-size: 14px; line-height: 1.8; color: rgba(255,255,255,.85); }
.footer-col-address p { margin: 0 0 16px; }
.footer-col-address a { color: rgba(255,255,255,.85); }
.footer-col-address a:hover { color: #B8A050; text-decoration: none; }
.footer-col h3 { color: #B8A050; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col li a { color: rgba(255,255,255,.85); font-size: 14px; }
.footer-col li a:hover { color: #B8A050; text-decoration: none; }
.footer-soc-icons { display: flex; gap: 10px; margin-bottom: 20px; }
.f-soc-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.9); transition: border-color 150ms;
}
.f-soc-btn:hover { border-color: #fff; color: #fff; text-decoration: none; }
.btn-enotify {
  display: inline-block; background: #fff; color: #1a1a1a;
  border-radius: 999px; padding: 10px 24px; font-weight: 600; font-size: 14px;
}
.btn-enotify:hover { background: rgba(255,255,255,.9); color: #1a1a1a; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding: 16px 24px;
  text-align: center; font-size: 13px; color: rgba(255,255,255,.6);
  max-width: 100%;
}
.footer-bottom a { color: rgba(255,255,255,.75); }
.footer-bottom a:hover { color: #B8A050; }

/* ---- Quick Answers ------------------------------------------------------- */
.qa-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 3.5rem;
}
.qa-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #B0A06E;
  margin-bottom: 0.375rem;
}
.qa-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #06478B;
  margin-bottom: 1.375rem;
}
/* carousel wrapper */
.qa-carousel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.qa-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #06478B;
  background: #fff;
  color: #06478B;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, color 150ms;
}
.qa-btn:hover:not(:disabled) { background: #06478B; color: #fff; }
.qa-btn:disabled { opacity: 0.25; cursor: default; }
.qa-track-wrap {
  flex: 1;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.qa-track-wrap::-webkit-scrollbar { display: none; }
.qa-grid {
  display: flex;
  gap: 0.875rem;
}
.qa-card {
  flex: 0 0 calc(25% - 0.66rem);
  scroll-snap-align: start;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1rem 1.125rem 1.125rem;
  background: #fff;
  border: 1px solid #dde1e8;
  border-radius: 8px;
  color: #1a1a1a;
  transition: border-color 150ms, box-shadow 150ms;
}
.qa-card:hover {
  border-color: #06478B;
  box-shadow: 0 2px 14px rgba(6,71,139,0.1);
  text-decoration: none;
  color: #1a1a1a;
}
.qa-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #edf2f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06478B;
}
.qa-body { flex: 1; min-width: 0; }
.qa-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #06478B;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.qa-card-desc {
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.45;
}
.qa-arrow {
  flex-shrink: 0;
  align-self: center;
  color: #B0A06E;
  font-size: 1.0625rem;
  margin-left: 0.25rem;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  /* QA: show 2 cards on tablet */
  .qa-card { flex: 0 0 calc(50% - 0.44rem); }
}

@media (max-width: 768px) {
  /* Header */
  .nav-toggle { display: flex; }
  .header-nav-bar { position: relative; }
  .tob-primary-nav {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #1a3453; z-index: 100;
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
  }
  .tob-primary-nav.open { display: flex; }
  .tob-nav-link { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .header-top-inner { grid-template-columns: auto auto; }
  .header-search { display: none; }
  .header-util-links { gap: 10px; }
  /* Hero */
  .hero { padding: 48px 0 44px; }
  .hc-search button { padding: 0 18px; }
  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  /* QA */
  .qa-card { flex: 0 0 85%; }
  .qa-btn { display: none; }
}
