/* ==========================================================================
   BizzPress — listing layer (assets/css/bp-listing.css)
   Category · tag · author · search · web-stories grid · static pages · 404 (docs/design-spec.md §7).
   Builds on the tokens and shared components in bizzpress.css (.bt-card, .bt-chip, .bt-list, .bt-lead,
   .bt-pager, .bt-empty, .bt-breadcrumb, .bt-input, .bt-btn …). Every rule here is scoped to .bt-listing,
   .bt-page or a class of its own, so this file never restyles the home or article layers.
   Only white / white-alpha / black-alpha values are written literally (text and scrims on dark story cards).
   ========================================================================== */

/* ---- 1. Page shell: breadcrumb strip + optional sub-category pills ---------------------------- */
.bt-listing { padding: 10px 0 0; }
.bt-listing > .bt-breadcrumb { margin-bottom: 4px; }
.bt-listing > .bt-layout { margin-top: 8px; }
.bt-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.bt-subnav a { display: inline-flex; align-items: center; padding: 6px 14px; background: var(--bt-surface); border: 1px solid var(--bt-line); border-radius: 4px; color: var(--bt-ink); font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; transition: background-color .15s, color .15s, border-color .15s; }
.bt-subnav a:hover { border-color: var(--bt-cyan); color: var(--bt-link); }
.bt-subnav a.active { background: var(--bt-cyan); border-color: var(--bt-cyan); color: #fff; }
@media (max-width: 760px) {
  .bt-subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .bt-subnav::-webkit-scrollbar { display: none; }
}

/* ---- 2. Chip rows: counts, wrapping user text, one <h1> per page ------------------------------ */
.bt-listing .bt-chip-row { flex-wrap: wrap; row-gap: 6px; }
.bt-listing .bt-count { font-size: 13px; font-weight: 500; color: var(--bt-muted); white-space: nowrap; }
.bt-listing .bt-chip--wrap { white-space: normal; line-height: 1.35; }
.bt-listing .bt-chip em { font-style: normal; text-transform: none; }          /* search query / tag name keep their case */
.bt-listing .bt-empty p { margin: 0; }
.bt-listing .bt-pager { margin: 18px 0 2px; }

/* ---- 3. "TOP NEWS" lead card (newest story, image right 300×200) ------------------------------ */
.bt-topnews .bt-lead--side { gap: 24px; }                                 /* columns (1fr 300px → 1 col ≤760px) come from bizzpress.css */
.bt-topnews .bt-lead__txt { min-width: 0; }
.bt-topnews .bt-lead h2 { margin: 8px 0 10px; font-size: 26px; line-height: 34px; }
.bt-topnews .bt-lead h2 a:hover { color: var(--bt-link); }
.bt-topnews .bt-lead .excerpt { font-size: 15px; line-height: 1.6; }
.bt-topnews .bt-lead .bt-media { aspect-ratio: 3 / 2; }
.bt-topnews .bt-lead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; }
.bt-topnews .bt-by svg { stroke-width: 1.8; }
@media (max-width: 760px) {
  .bt-topnews .bt-lead h2 { font-size: 22px; line-height: 30px; }
  .bt-topnews .bt-lead .bt-media { aspect-ratio: 16 / 9; }
}

/* ---- 4. Story list: two columns, 120×80 thumbs, red sub-label, 18px/700 titles --------------- */
.bt-listing .bt-list .thumb { position: relative; }
.bt-listing .bt-list .bt-play { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.bt-listing .bt-list .bt-play svg { width: 13px; height: 13px; }
.bt-listing .bt-list--lg h3 { font-size: 18px; font-weight: 700; line-height: 26px; }
.bt-listing .bt-list--lg .bt-cat { margin-bottom: 5px; }
.bt-listing .bt-list--2col { column-gap: 32px; }
@media (min-width: 761px) {
  /* even counts: the left column's last row has no hairline either */
  .bt-listing .bt-list--2col li:nth-last-child(2):nth-child(odd) { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 480px) {
  .bt-listing .bt-list--lg .thumb { width: 100px; height: 68px; }
  .bt-listing .bt-list--lg h3 { font-size: 16px; line-height: 24px; }
}

/* ---- 5. Author card ---------------------------------------------------------------------------- */
.bt-author-card { display: flex; gap: 24px; align-items: flex-start; }
.bt-author-card__av { display: grid; place-items: center; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--bt-cyan-soft-2); color: var(--bt-link); font-size: 40px; font-weight: 700; line-height: 1; }
.bt-author-card__av img { width: 100%; height: 100%; object-fit: cover; }
.bt-author-card__body { flex: 1; min-width: 0; }
.bt-author-card h1 { margin: 8px 0 4px; font-size: 24px; font-weight: 700; line-height: 1.25; }
.bt-author-card__desig { margin: 0 0 10px; font-size: 14px; font-weight: 500; color: var(--bt-muted); }
.bt-author-card__bio { margin: 0; font-size: 15px; line-height: 1.7; white-space: pre-line; }
.bt-author-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--bt-muted); }
.bt-author-card__meta b { color: var(--bt-ink); font-weight: 700; }
.bt-author-card .team-social { margin: 0; justify-content: flex-start; gap: 6px; }
.bt-author-card .team-social .ts { width: 32px; height: 32px; background: var(--bt-surface); border: 1px solid var(--bt-line); color: var(--bt-ink); }
.bt-author-card .team-social .ts:hover { background: var(--bt-cyan); border-color: var(--bt-cyan); color: #fff; transform: none; }
.bt-author-card .team-social .ts svg { width: 15px; height: 15px; }
@media (max-width: 600px) {
  .bt-author-card { flex-direction: column; align-items: center; text-align: center; }
  .bt-author-card__meta, .bt-author-card .team-social { justify-content: center; }
}

/* ---- 6. Search form (search page, 404 page) --------------------------------------------------- */
.bt-searchform { display: flex; gap: 8px; max-width: 640px; }
.bt-searchform .bt-input { flex: 1; min-width: 0; height: 46px; font-size: 16px; }
.bt-searchform .bt-btn { flex-shrink: 0; height: 46px; padding: 0 20px; }
.bt-searchform .bt-btn svg { width: 18px; height: 18px; }
.bt-searchform__hint { margin: 10px 0 0; font-size: 14px; color: var(--bt-muted); }
@media (max-width: 480px) {
  .bt-searchform { flex-wrap: wrap; }
  .bt-searchform .bt-btn { width: 100%; }
}

/* ---- 7. Web stories grid (moved here from web-stories.php) ------------------------------------ */
.wsx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.wsx-card { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; background: var(--bt-black); color: #fff; transition: transform .25s ease, box-shadow .25s ease; }
.wsx-card:hover, .wsx-card:focus-visible { color: #fff; transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .45); }
.wsx-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wsx-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .92) 6%, rgba(0, 0, 0, .28) 52%, rgba(0, 0, 0, .05)); }
.wsx-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 3px; background: var(--bt-cyan); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.wsx-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.wsx-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 13px 14px; }
.wsx-title { display: block; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; }
.wsx-sub { display: block; margin-top: 4px; color: rgba(255, 255, 255, .72); font-size: 11.5px; }
@media (max-width: 520px) {
  .wsx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .wsx-title { font-size: 14px; }
}

/* ---- 8. Static pages (.bt-card.bt-page): editor HTML from the pages table --------------------- */
.bt-page { padding: 24px 28px 32px; font-size: 17px; line-height: 1.75; color: var(--bt-ink); }
.bt-page::after { content: ""; display: block; clear: both; }                  /* contains floated figures */
.bt-page h1 { position: relative; margin: 0 0 26px; padding-bottom: 14px; font-size: 28px; font-weight: 700; line-height: 1.25; }
.bt-page h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--bt-cyan); }
.bt-page h2 { margin: 28px 0 10px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.bt-page h3 { margin: 24px 0 8px; font-size: 19px; font-weight: 700; line-height: 1.35; }
.bt-page h4 { margin: 20px 0 6px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.bt-page p { margin: 0 0 16px; }
.bt-page a { color: var(--bt-link); text-decoration: underline; text-underline-offset: 2px; }
.bt-page a:hover { color: var(--bt-cyan); }
.bt-page ul, .bt-page ol { margin: 0 0 18px 22px; padding: 0; }
.bt-page li { margin: 0 0 6px; }
.bt-page li::marker { color: var(--bt-cyan); }
.bt-page blockquote { margin: 20px 0; padding: 12px 18px; border-left: 4px solid var(--bt-cyan); background: var(--bt-cyan-soft); font-size: 17px; font-style: italic; }
.bt-page blockquote p:last-child { margin-bottom: 0; }
.bt-page hr { margin: 28px 0; border: 0; border-top: 1px solid var(--bt-line); }
.bt-page img { max-width: 100%; height: auto; }
.bt-page figure { margin: 22px 0; }
.bt-page figure.image { display: table; margin: 22px auto; }
.bt-page figure.image img { display: block; }
.bt-page figcaption { margin-top: 7px; font-size: 13px; color: var(--bt-grey); text-align: center; }
.bt-page figure.image-style-side, .bt-page figure.image-style-align-right { float: right; max-width: 46%; margin: .3em 0 1.1em 1.6em; }
.bt-page figure.image-style-align-left { float: left; max-width: 46%; margin: .3em 1.6em 1.1em 0; }
.bt-page figure.image-style-block, .bt-page figure.image-style-align-center { margin-left: auto; margin-right: auto; }
.bt-page .image_resized { max-width: 100%; }
.bt-page .image_resized img { width: 100%; }
.bt-page table { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 15px; }
.bt-page th, .bt-page td { padding: 9px 12px; border: 1px solid var(--bt-line); text-align: left; vertical-align: top; }
.bt-page th { background: var(--bt-cyan-soft-2); font-weight: 600; }
@media (max-width: 760px) {
  .bt-page { padding: 18px 16px 24px; font-size: 16px; }
  .bt-page h1 { font-size: 24px; }
  .bt-page h2 { font-size: 20px; }
  .bt-page figure.image-style-side, .bt-page figure.image-style-align-left, .bt-page figure.image-style-align-right { float: none; max-width: 100%; margin: 1.2em auto; }
}

/* ---- 9. Editorial team card (about-us.php; team-card.php markup, legacy .team-* restyled) ----- */
.bt-team__intro { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--bt-muted); }
.bt-team .team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.bt-team .team-card { --team-accent: var(--bt-link); padding: 22px 16px 20px; border-radius: 4px; background: var(--bt-surface); border: 1px solid var(--bt-line); box-shadow: none; transition: border-color .15s; }
.bt-team .team-card::before { display: none; }
.bt-team .team-card:hover { transform: none; box-shadow: none; border-color: var(--bt-cyan); }
.bt-team .team-av { width: 110px; height: 110px; margin-bottom: 16px; border: 0; border-radius: 50%; background: var(--bt-cyan-soft-2); box-shadow: none; }
.bt-team .team-av span { color: var(--bt-link); font-size: 40px; }
.bt-team .team-card:hover .team-av, .bt-team .team-card:hover .team-av img { transform: none; }
.bt-team .team-name { margin-bottom: 6px; color: var(--bt-ink); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.bt-team .team-name a:hover { color: var(--bt-link); }
.bt-team .team-name::after { background: var(--bt-cyan); }
.bt-team .team-desig { margin-top: 8px; font-size: 13px; color: var(--bt-muted); }
.bt-team .team-social .ts { background: var(--bt-surface); border: 1px solid var(--bt-line); color: var(--bt-ink); }
.bt-team .team-social .ts:hover { background: var(--bt-cyan); border-color: var(--bt-cyan); color: #fff; transform: none; }
@media (max-width: 560px) { .bt-team .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- 10. Contact page: detail tiles + form --------------------------------------------------- */
.bt-page .bt-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 8px; padding: 0; list-style: none; }
.bt-page .bt-contact li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px; background: var(--bt-cyan-soft-2); border-radius: 4px; font-size: 15px; line-height: 1.5; }
.bt-page .bt-contact .bt-ic { flex-shrink: 0; background: var(--bt-surface); }
.bt-page .bt-contact b { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bt-muted); }
.bt-page .bt-contact div { min-width: 0; overflow-wrap: anywhere; }
.bt-page .bt-contact small { display: block; margin-top: 4px; font-size: 13px; color: var(--bt-muted); }
.bt-form { margin-top: 4px; }
.bt-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.bt-form label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.bt-form .bt-input { height: 44px; margin-bottom: 14px; }
.bt-form textarea.bt-input { height: auto; min-height: 150px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.bt-form__honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bt-form .bt-btn { margin-top: 2px; }
.bt-notice { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--bt-line); border-radius: 4px; font-size: 14px; line-height: 1.5; }
.bt-notice--ok { background: var(--bt-up-bg); border-color: var(--bt-up); color: var(--bt-up); }
.bt-notice--err { background: var(--bt-down-bg); border-color: var(--bt-down-line); color: var(--bt-down); }
@media (max-width: 600px) {
  .bt-page .bt-contact, .bt-form__row { grid-template-columns: minmax(0, 1fr); }
}

/* ---- 11. 404 page ----------------------------------------------------------------------------- */
.bt-errpage { padding: 48px 24px 52px; text-align: center; }
.bt-errpage .bt-errpage__code { margin: 0; font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--bt-link); }
.bt-errpage h1 { margin: 12px 0 8px; font-size: 24px; font-weight: 700; line-height: 1.3; }
.bt-errpage p { max-width: 480px; margin: 0 auto 22px; font-size: 16px; line-height: 1.6; color: var(--bt-muted); }
.bt-errpage__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bt-errpage .bt-searchform { margin: 26px auto 0; max-width: 480px; }
@media (max-width: 480px) {
  .bt-errpage { padding: 36px 16px 40px; }
  .bt-errpage .bt-errpage__code { font-size: 60px; }
}

/* ---- 12. Motion preferences ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .wsx-card, .bt-subnav a, .bt-team .team-card { transition: none; }
  .wsx-card:hover { transform: none; }
}
