/* Blog: listing filters and article layout. Builds on new.css / events.css tokens. */

/* ---------- Article hero ---------- */
.bp-hero { min-height: 52vh; padding-top: 7rem; }
.bp-hero .event-hero-bg { filter: none; opacity: 1; overflow: hidden; }
.bp-hero .event-hero-bg img { filter: blur(28px) brightness(0.5) saturate(1.1); transform: scale(1.15); }
.bp-hero .event-hero-overlay { background: linear-gradient(to bottom, rgba(8, 8, 8, 0.35), rgba(8, 8, 8, 0.96)); }
.bp-hero .event-hero-title { font-size: clamp(1.9rem, 4.2vw, 3.1rem); max-width: 22ch; line-height: 1.12; letter-spacing: -0.02em; }
.bp-hero .event-hero-description { max-width: 62ch; }
.bp-hero .hero-stat time, .bp-hero .hero-stat span { font-size: 0.95rem; }

.bp-breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.bp-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.bp-breadcrumb a:hover { color: var(--primary); }

/* ---------- Article layout ---------- */
.bp-section { padding-top: 3rem; }
.bp-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.bp-aside { position: sticky; top: 6.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.bp-back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; }
.bp-back:hover { color: var(--primary); }
.bp-toc { border-left: 1px solid var(--border-color); padding-left: 1rem; }
.bp-toc-title { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.bp-toc ol { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.bp-toc a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; line-height: 1.4; display: block; }
.bp-toc a:hover, .bp-toc a.is-active { color: var(--primary); }

.bp-article { max-width: 760px; min-width: 0; }
.bp-cover { margin: 0 0 2.5rem; border-radius: 1.25rem; overflow: hidden; border: 1px solid var(--border-color); }
.bp-cover img { display: block; width: 100%; height: auto; }

/* ---------- Article typography ---------- */
.bp-content, .bp-faq, .bp-sources { color: #b5b5b5; font-size: 1.0625rem; line-height: 1.8; }
.bp-content > * + * { margin-top: 1.15rem; }
.bp-content h2, .bp-faq > h2, .bp-sources > h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; margin-top: 2.75rem; scroll-margin-top: 6.5rem; }
.bp-content h3 { color: #fff; font-size: 1.2rem; margin-top: 2rem; scroll-margin-top: 6.5rem; }
.bp-content strong { color: #fff; font-weight: 600; }
.bp-content a, .bp-faq a, .bp-sources a { color: #fb923c; text-decoration: underline; text-decoration-color: rgba(251, 146, 60, 0.4); text-underline-offset: 3px; }
.bp-content a:hover, .bp-faq a:hover, .bp-sources a:hover { color: #fbbf24; text-decoration-color: currentColor; }
.bp-content ul, .bp-content ol { padding-left: 1.4rem; }
.bp-content li + li { margin-top: 0.5rem; }
.bp-content li::marker { color: var(--primary); font-weight: 600; }
.bp-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border-color); padding: 0.1em 0.4em; border-radius: 6px; color: #fde68a; }
.bp-content blockquote { border-left: 3px solid var(--primary); background: rgba(249, 115, 22, 0.06); padding: 1rem 1.25rem; border-radius: 0 0.75rem 0.75rem 0; color: #d4d4d4; }
.bp-content blockquote p { margin: 0; }

.bp-table { overflow-x: auto; border: 1px solid var(--border-color); border-radius: 0.9rem; }
.bp-table table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.95rem; line-height: 1.55; }
.bp-table th { text-align: left; color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.04); padding: 0.8rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.bp-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.bp-table tr:last-child td { border-bottom: 0; }
.bp-table td:first-child { color: #fff; font-weight: 500; }

/* ---------- FAQ ---------- */
.bp-faq { margin-top: 3rem; }
.bp-faq > h2 { margin-bottom: 1.25rem; }
.bp-faq-item { border: 1px solid var(--border-color); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.02); margin-top: 0.75rem; transition: border-color 0.2s; }
.bp-faq-item[open] { border-color: rgba(249, 115, 22, 0.35); }
.bp-faq-item summary { list-style: none; cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.25rem; position: relative; }
.bp-faq-item summary::-webkit-details-marker { display: none; }
.bp-faq-item summary::after { content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 1.4rem; line-height: 1; transition: transform 0.2s; }
.bp-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.bp-faq-item summary h3 { color: #fff; font-size: 1.05rem; font-weight: 600; margin: 0; line-height: 1.45; }
.bp-faq-answer { padding: 0 1.25rem 1.1rem; }
.bp-faq-answer p + p { margin-top: 0.75rem; }

/* ---------- CTA + sources ---------- */
.bp-cta { margin-top: 3rem; position: relative; overflow: hidden; border-radius: 1.5rem; padding: 2.5rem 2rem; text-align: center; }
.bp-cta-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.bp-cta-eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: #fb923c; }
.bp-cta .cta-title { font-size: clamp(1.35rem, 3vw, 1.85rem); color: #fff; max-width: 26ch; }

.bp-sources { margin-top: 3rem; font-size: 0.9rem; }
.bp-sources ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.bp-sources a { word-break: break-word; }

.bp-related { padding-top: 2rem; }

/* ---------- Listing page ---------- */
.bp-card .event-card-image { display: block; height: auto; aspect-ratio: 1200 / 630; }
.bp-card .event-card-image img { width: 100%; height: 100%; object-fit: cover; }
.bp-card .event-card-content { display: flex; flex-direction: column; }
.bp-card .event-card-title a { color: inherit; text-decoration: none; }
.bp-card .event-card-title a:hover { color: var(--primary); }
.bp-card-area { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #fb923c; margin-bottom: 0.5rem; }
.bp-card .event-card-meta { align-items: center; margin-top: auto; }
.bp-card .event-card-meta .about-button { margin-left: auto; }
.bp-card[hidden] { display: none !important; }

.bp-toolbar { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2.5rem; }
.bp-search { position: relative; max-width: 480px; }
.bp-search input { width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); color: #fff; border-radius: 9999px; padding: 0.8rem 1.1rem 0.8rem 2.75rem; font: inherit; font-size: 0.95rem; }
.bp-search input:focus { outline: none; border-color: rgba(249, 115, 22, 0.6); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
.bp-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bp-chip { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); color: var(--text-secondary); border-radius: 9999px; padding: 0.45rem 0.95rem; font: inherit; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.bp-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.bp-chip[aria-pressed="true"] { background: hsla(24, 100%, 50%, 0.14); border-color: hsla(24, 100%, 50%, 0.5); color: #fb923c; }
.bp-empty { color: var(--text-secondary); text-align: center; padding: 3rem 0; }
.bp-more { display: flex; justify-content: center; margin-top: 2.5rem; }

@media (max-width: 1024px) {
  .bp-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .bp-aside { position: static; }
  .bp-toc { display: none; }
  .bp-article { max-width: none; }
}
@media (max-width: 640px) {
  .bp-hero { min-height: auto; padding-top: 6.5rem; }
  .bp-content, .bp-faq { font-size: 1rem; }
  .bp-cta { padding: 2rem 1.25rem; }
}

/* Date badge sits top-right so it never covers the cover headline */
.bp-card .event-card-date { left: auto; right: 1rem; }
#blogMore[hidden], .bp-empty[hidden] { display: none !important; }

/* Phone: topic chips become one swipeable row instead of a full-screen block */
@media (max-width: 640px) {
  .bp-toolbar { margin-bottom: 1.75rem; gap: 1rem; }
  .bp-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 -1.5rem; padding: 0.25rem 1.5rem; scroll-padding-inline: 1.5rem;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 2rem), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 2rem), transparent 100%); }
  .bp-chips::-webkit-scrollbar { display: none; }
  .bp-chip { flex: 0 0 auto; white-space: nowrap; }
  .bp-search { max-width: none; }
}

/* Phone: listing hero stats in one row */
@media (max-width: 640px) {
  #blogsSection { padding-top: 3rem; }
  .events-hero .events-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; width: 100%; }
  .events-hero .events-hero-stats .stat { min-width: 0; width: auto; }
  .events-hero .events-hero-stats .stat-num { font-size: 1.9rem; }
}

/* Tables: keep inline code intact; sticky first column + swipe hint on phones */
.bp-table code { white-space: nowrap; }
.bp-table-hint { display: none; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem !important; }
@media (max-width: 760px) {
  .bp-table td:first-child, .bp-table th:first-child { position: sticky; left: 0; z-index: 1; background: #101010; box-shadow: 1px 0 0 var(--border-color); }
  .bp-table th:first-child { background: #171717; }
  .bp-table table { min-width: 520px; }
  .bp-table-hint { display: block; }
}
.bp-cta-sub { color: var(--text-secondary); max-width: 46ch; margin: -0.25rem auto 0; }
.bp-chip-count { opacity: 0.55; font-size: 0.75rem; margin-left: 0.15rem; }
