/* Event Planner FAQ — public site styles.
   Colours, font and radius come from index.php?/theme.css (Admin > Branding). */

:root {
  --c-primary: #1f4e8c; --c-primary-dark: #193f72; --c-primary-soft: #e9eef4;
  --c-secondary: #e8792b; --c-secondary-soft: #fcefe5;
  --c-header-bg: #1f4e8c; --c-header-text: #fff;
  --c-bg: #f5f6f8; --c-text: #1d2433;
  --c-surface: #fff; --c-muted: #5b6577; --c-border: #e1e5ec;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px; --logo-h: 48px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--c-text); background: var(--c-bg);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1 0 auto; }
a { color: var(--c-primary); text-underline-offset: 2px; }
a:hover { color: var(--c-primary-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--c-secondary); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.page { padding-top: 24px; padding-bottom: 56px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--c-header-bg); color: var(--c-header-text); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 650; font-size: 1.1rem; min-width: 0; }
.brand:hover { color: inherit; }
.brand-logo { height: var(--logo-h); width: auto; display: block; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.16); }
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-search { margin-left: auto; display: flex; width: min(360px, 45vw); }
.header-search input { flex: 1; min-width: 0; border: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 9px 12px; font: inherit; font-size: .95rem; }
.header-search button { border: 0; border-radius: 0 var(--radius) var(--radius) 0; padding: 0 12px; background: var(--c-secondary); color: #fff; cursor: pointer; display: grid; place-items: center; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--c-header-bg) 0%, var(--c-primary-dark) 100%); color: var(--c-header-text); padding: 40px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; }
.hero-tagline { margin: 0 auto 22px; max-width: 620px; opacity: .88; }
.hero-search { display: flex; max-width: 640px; margin: 0 auto; box-shadow: 0 8px 24px rgba(0,0,0,.18); border-radius: var(--radius); }
.hero-search input { flex: 1; min-width: 0; border: 0; padding: 15px 18px; font: inherit; font-size: 1.05rem; border-radius: var(--radius) 0 0 var(--radius); }
.hero-search button { border: 0; padding: 0 26px; font: inherit; font-weight: 600; background: var(--c-secondary); color: #fff; cursor: pointer; border-radius: 0 var(--radius) var(--radius) 0; }
.hero-search button:hover { filter: brightness(.95); }
.hero-search.inline { box-shadow: var(--shadow); margin: 0 0 32px; max-width: none; border: 1px solid var(--c-border); }
.hero-tags { margin: 18px auto 0; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.hero-tags span { opacity: .8; }
.hero-tags a { color: inherit; background: rgba(255,255,255,.14); padding: 2px 10px; border-radius: 999px; text-decoration: none; }
.hero-tags a:hover { background: rgba(255,255,255,.26); }

/* Sections */
.section-title { font-size: 1.15rem; margin: 8px 0 14px; color: var(--c-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.home-intro { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 36px; align-items: start; }
.category-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border-top: 3px solid var(--c-primary); }
.category-card h3 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.category-card h3 a { text-decoration: none; color: var(--c-text); }
.category-card h3 a:hover { color: var(--c-primary); }
.count { font-size: .78rem; font-weight: 600; color: var(--c-primary); background: var(--c-primary-soft); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.subcats { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.subcats li { padding: 2px 0; }
.subcats a { color: var(--c-muted); text-decoration: none; }
.subcats a:hover { color: var(--c-primary); text-decoration: underline; }
.card-desc { margin: 0; color: var(--c-muted); font-size: .93rem; }

.home-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel-title { font-size: 1rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); display: inline-block; }
.dot-secondary { background: var(--c-secondary); }
.ranked { margin: 0; padding-left: 1.4em; }
.ranked li { padding: 5px 0; border-bottom: 1px solid var(--c-border); }
.ranked li:last-child { border-bottom: 0; }
.ranked li::marker { color: var(--c-muted); font-weight: 600; font-size: .85em; }
.ranked a, .panel .article-link { text-decoration: none; }
.ranked a:hover, .panel .article-link:hover { text-decoration: underline; }

/* Lists */
.article-list { list-style: none; margin: 0; padding: 0; }
.page > .article-list, .page > .result-count + .article-list { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.article-item { padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
.article-item:last-child { border-bottom: 0; }
.panel .article-item { padding: 6px 0; }
.article-link { font-weight: 600; font-size: 1.02rem; }
.panel .article-link { font-weight: 500; font-size: .97rem; }
.article-excerpt { margin: 4px 0 0; color: var(--c-muted); font-size: .94rem; }
.article-meta { margin: 4px 0 0; color: var(--c-muted); font-size: .8rem; }
.is-featured { background: linear-gradient(90deg, var(--c-secondary-soft), transparent 60%); }
.badge { display: inline-block; margin-left: 8px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-secondary); border: 1px solid var(--c-secondary); padding: 0 6px; border-radius: 4px; vertical-align: 2px; }
.plain-list { margin: 0; padding-left: 1.1em; }
.plain-list li { padding: 3px 0; }

/* Page heads, crumbs */
.crumbs { font-size: .88rem; color: var(--c-muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumbs a { color: var(--c-muted); }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.lede { color: var(--c-muted); margin: 0; font-size: 1.05rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.tag { font-size: .82rem; background: var(--c-primary-soft); color: var(--c-primary-dark); padding: 2px 10px; border-radius: 999px; text-decoration: none; }
.tag:hover { background: var(--c-primary); color: #fff; }
.result-count { color: var(--c-muted); font-size: .9rem; margin: 0 0 10px; }
.empty { color: var(--c-muted); background: var(--c-surface); border: 1px dashed var(--c-border); border-radius: var(--radius); padding: 24px; text-align: center; }
.notice { background: var(--c-secondary-soft); border: 1px solid var(--c-secondary); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }

.subcat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 24px; }
.subcat-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--c-surface); border: 1px solid var(--c-border); border-left: 3px solid var(--c-secondary); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--c-text); font-weight: 600; box-shadow: var(--shadow); }
.subcat-card:hover { border-color: var(--c-primary); color: var(--c-primary); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; align-items: center; }
.pager a, .pager span { padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--c-border); background: var(--c-surface); text-decoration: none; font-size: .92rem; }
.pager .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* Article */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.article { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; min-width: 0; }
.article-head h1 { font-size: clamp(1.45rem, 3vw, 1.95rem); }
.article-info { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--c-muted); font-size: .86rem; margin: 0; align-items: center; }
.article-info .code { font-family: ui-monospace, Consolas, monospace; background: var(--c-bg); padding: 0 6px; border-radius: 4px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--c-primary); cursor: pointer; text-decoration: underline; }
.article-head { border-bottom: 1px solid var(--c-border); padding-bottom: 16px; margin-bottom: 20px; }
.article-aside .panel { padding: 16px 18px; }

.article-body { overflow-wrap: anywhere; }
.article-body img { height: auto !important; max-width: 100% !important; }
.article-body iframe { max-width: 100%; border: 0; }
.article-body iframe[src*="youtube"], .article-body iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.article-body video { max-width: 100%; height: auto; border-radius: var(--radius); }
.article-body table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.article-body td, .article-body th { border: 1px solid var(--c-border); padding: 6px 10px; vertical-align: top; }
.article-body figure { margin: 1em 0; }
.article-body figure.image { display: table; clear: both; text-align: center; margin: 1em auto; }
.article-body figure.image img { display: block; margin: 0 auto; }
.article-body figure.image-style-side, .article-body figure.image-style-align-right { float: right; margin-left: 1.5em; max-width: 50%; }
.article-body figure.image-style-align-left { float: left; margin-right: 1.5em; max-width: 50%; }
.article-body figcaption { display: table-caption; caption-side: bottom; font-size: .85rem; color: var(--c-muted); padding: 6px 0; }
.article-body figure.table { display: table; margin: 1em auto; }
.article-body blockquote { border-left: 4px solid var(--c-primary-soft); margin: 1em 0; padding: .2em 1em; color: var(--c-muted); }
.article-body pre, .article-body code { font-family: ui-monospace, Consolas, monospace; background: var(--c-bg); border-radius: 4px; }
.article-body pre { padding: 12px 14px; overflow-x: auto; }
.article-body::after { content: ""; display: table; clear: both; }

.helpful { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.helpful-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.helpful-form span { font-weight: 600; }
.helpful-form button { font: inherit; padding: 6px 18px; border-radius: var(--radius); border: 1px solid var(--c-border); background: var(--c-surface); cursor: pointer; }
.helpful-form button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.helpful-done { color: var(--c-primary); font-weight: 600; margin: 0; }

/* Search */
.search-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.grow { flex: 1 1 260px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--c-muted); }
.field input, .field select { font: inherit; padding: 9px 10px; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; min-width: 0; }
.btn { font: inherit; font-weight: 600; padding: 9px 20px; border: 0; border-radius: var(--radius); background: var(--c-primary); color: #fff; cursor: pointer; }
.btn:hover { background: var(--c-primary-dark); }

/* Footer */
.site-footer { background: var(--c-surface); border-top: 1px solid var(--c-border); padding: 22px 0; font-size: .88rem; color: var(--c-muted); }
.footer-meta { margin: 0; }
.footer-custom { margin-bottom: 10px; }

@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article { padding: 20px 18px; }
}
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .header-search { width: 100%; }
  .hero { padding: 28px 0 32px; }
  .hero-search button { padding: 0 16px; }
  .home-columns { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .hero, .crumbs, .article-aside, .helpful, .link-btn, .skip-link { display: none !important; }
  body { background: #fff; }
  .article { border: 0; box-shadow: none; padding: 0; }
  .article-layout { display: block; }
  .article-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
