/* ============================================================
   WahahStore — Topic landing pages (category "bubble" pages)
   Self-contained; uses the storefront design tokens.
   ============================================================ */

/* ---------- Hero banner ---------- */
.tpc-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    color: #fff;
    isolation: isolate;
    box-shadow: 0 30px 60px -30px rgba(16, 24, 40, .45);
}
.tpc-hero__bg { position: absolute; inset: 0; z-index: 0; }
.tpc-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* When a banner image is set, shape the hero like a wide banner (~2.6:1, matching the
   uploaded artwork) so `cover` shows the whole image instead of cropping the title off
   the top. The min-height floor keeps the overlaid text from cramping on small phones;
   object-position keeps the top of the artwork (where titles usually sit) in view. */
.tpc-hero--img { aspect-ratio: 16 / 6.1; min-height: 300px; }
.tpc-hero--img .tpc-hero__photo { object-position: center top; }
.tpc-hero__shade {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(100deg, rgba(7, 14, 28, .84) 16%, rgba(7, 14, 28, .5) 54%, rgba(7, 14, 28, .28));
}
[dir="rtl"] .tpc-hero__shade {
    background: linear-gradient(-100deg, rgba(7, 14, 28, .84) 16%, rgba(7, 14, 28, .5) 54%, rgba(7, 14, 28, .28));
}
.tpc-hero__inner {
    position: relative; z-index: 3;
    padding: clamp(36px, 6vw, 76px) clamp(24px, 5vw, 64px);
    max-width: 760px;
}
.tpc-crumbs { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: rgba(255, 255, 255, .82); margin-bottom: 18px; flex-wrap: wrap; }
.tpc-crumbs a { color: #fff; font-weight: 600; }
.tpc-crumbs a:hover { text-decoration: underline; }
.tpc-crumbs__sep { font-size: 1.05rem; opacity: .7; }
.tpc-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.12; margin: 0; max-width: 20ch; }
.tpc-hero__sub { color: rgba(255, 255, 255, .92); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.6; margin: 14px 0 0; max-width: 52ch; }
.tpc-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Hero/CTA buttons (on dark backgrounds) */
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.tpc-btn-light { background: #fff; color: var(--primary); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.tpc-btn-light:hover { transform: translateY(-2px) scale(1.02); }
.tpc-btn-outline { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); backdrop-filter: blur(4px); }
.tpc-btn-outline:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }

/* ---------- Body + sidebar ---------- */
.tpc-layout { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: start; }
@media (min-width: 960px) { .tpc-layout { grid-template-columns: 1fr 300px; } }
.tpc-main { min-width: 0; }

.tpc-rich { line-height: 1.85; color: var(--on-surface-variant); font-size: 1.02rem; }
.tpc-rich p { margin-bottom: 16px; }
.tpc-rich h2, .tpc-rich h3 { color: var(--on-surface); margin: 26px 0 12px; font-weight: 700; }
.tpc-rich ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.tpc-rich li { position: relative; padding-inline-start: 30px; color: var(--on-surface); }
.tpc-rich li::before {
    content: ""; position: absolute; inset-inline-start: 0; top: .3em;
    width: 18px; height: 18px; border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 16%, transparent);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 55%, transparent);
}
.tpc-rich li::after {
    content: ""; position: absolute; inset-inline-start: 6px; top: .55em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}

/* Film panel (first self-hosted video) */
.tpc-film { margin: 26px 0 0; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: 0 20px 44px -22px rgba(16, 24, 40, .5); }
.tpc-film video, .tpc-film iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.tpc-film figcaption { padding: 10px 14px; font-size: .9rem; color: var(--on-surface-variant); background: var(--surface); }

/* Sidebar list of all topics */
.tpc-aside__title { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; color: var(--on-surface); }
.tpc-side-list { display: flex; flex-direction: column; gap: 10px; }
.tpc-side-list a {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px;
    border: 1px solid var(--outline-variant); border-radius: var(--radius); background: var(--surface);
    transition: border-color .15s, background .15s, transform .15s;
}
.tpc-side-list a:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: var(--surface-low); transform: translateY(-1px); }
.tpc-side-list a.is-active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.tpc-side-list b { font-size: .92rem; font-weight: 600; color: var(--on-surface); }
.tpc-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.tpc-ic .material-symbols-outlined { font-size: 1.25rem; }

/* ---------- Media gallery ---------- */
.tpc-media-head { text-align: center; margin-bottom: 22px; }
.tpc-media-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--on-surface); }
.tpc-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tpc-media-grid figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-low); box-shadow: 0 14px 34px -20px rgba(16, 24, 40, .4); }
.tpc-media-frame { position: relative; }
.tpc-media-grid img { width: 100%; height: 220px; object-fit: cover; display: block; }
.tpc-media-grid.is-video, .tpc-media-grid figure.is-video .tpc-media-frame { aspect-ratio: 16 / 9; background: #000; }
.tpc-media-grid figure.is-video video, .tpc-media-grid figure.is-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.tpc-media-grid figcaption { padding: 10px 14px; font-size: .9rem; color: var(--on-surface-variant); }

/* ---------- CTA band ---------- */
.tpc-cta { border-radius: var(--radius-2xl); padding: clamp(30px, 5vw, 54px); text-align: center; color: #fff; }
.tpc-cta h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.tpc-cta p { color: rgba(255, 255, 255, .92); max-width: 52ch; margin: 12px auto 22px; }
.tpc-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- About / Contact: clean light hero (no coloured background) ---------- */
.abt-hero{ color:var(--on-surface); box-shadow:none; border-radius:0; overflow:visible; }
.abt-hero .tpc-hero__bg{ display:none; }
.abt-hero .tpc-hero__inner{ padding:30px 0 6px; max-width:820px; }
.abt-hero .tpc-crumbs{ color:var(--on-surface-variant); }
.abt-hero .tpc-crumbs a{ color:var(--on-surface); }
.abt-hero .tpc-crumbs a:hover{ color:var(--primary); }
.abt-hero h1{ color:var(--on-surface); }
.abt-hero .tpc-hero__sub{ color:var(--on-surface-variant); }
.abt-btn-outline{ background:transparent; color:var(--on-surface); border:1.5px solid var(--outline-variant); }
.abt-btn-outline:hover{ border-color:var(--primary); color:var(--primary); transform:translateY(-2px); }

/* About CTA band — neutral, no blue */
.abt-cta{ background:var(--surface-low) !important; color:var(--on-surface); border:1px solid var(--outline-variant); }
.abt-cta h2{ color:var(--on-surface); }
.abt-cta p{ color:var(--on-surface-variant); }

/* About / Contact pages use a calm teal accent instead of the brand blue
   (scoped remap — buttons, eyebrows, icon tints, focus rings all follow). */
.abt-page{ --primary:#0ea5a0; --primary-rgb:14,165,160; --shadow-primary:0 16px 40px rgba(14,165,160,.22);
    display:flex; flex-direction:column; gap:var(--section-gap); }
