/* ==========================================================================
   DagenhamTV — Shared public layout (header nav + footer + page shell)
   Used by every public page so they all share one consistent look that
   matches the channel page (banner + left side panel + right content area).
   Colours and fonts come from CSS variables set by site-layout.js from the
   admin theme settings.
   ========================================================================== */

:root {
  --bg:#0b0c10; --panel:#12141a; --panel2:#0f1116; --text:#e7e8ee;
  --muted:#a9adbb; --line:#272a36; --accent:#7c8cf8; --accent2:#cfd2dc;
  --danger:#fb7185; --radius:12px; --shadow:0 4px 20px rgba(0,0,0,.45);
  --font-head: system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-body: system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-head-size: 18px; --font-body-size: 14px;
  --font-head-weight: 700; --font-body-weight: 400;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  overflow-x: hidden;
  display: flex; flex-direction: column; min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: var(--font-head-weight); }
a { color: inherit; }

/* ── Header navigation ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--panel); border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.site-header-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 0 50px; height: 60px; max-width: 100%;
}
.site-header-inner.nav-left { justify-content:flex-start; }
.site-header-inner.nav-center { justify-content:center; }
.site-header-inner.nav-center .site-nav { justify-content:center; flex:0 1 auto; }
.site-mini-logo { width:42px; height:42px; border-radius:50%; overflow:hidden; display:flex; align-items:center; justify-content:center; flex:0 0 42px; text-decoration:none; border:2px solid var(--accent); background:var(--panel2); box-shadow:0 2px 8px rgba(0,0,0,.35); }
.site-mini-logo img { width:100%; height:100%; object-fit:cover; display:block; }
.site-mini-logo i { color:var(--text); font-size:16px; }
.site-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
  color: var(--text); text-decoration: none; white-space: nowrap;
  letter-spacing: .3px;
}
.site-brand .brand-logo {
  height: 34px; width: auto; display: block; border-radius: 6px;
}
.site-brand .brand-dot { color: var(--accent); }
.site-nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1; flex-wrap: wrap; justify-content:flex-start;
}
.site-nav a {
  padding: 8px 14px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; transition: background .15s, color .15s;
  font-family: var(--font-head);
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.site-nav a.active { color: #fff; background: var(--accent); }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--text); width: 40px; height: 40px; border-radius: 9px;
  cursor: pointer; font-size: 18px; align-items: center; justify-content: center;
  margin-left: auto;
}

/* ── Page shell (matches channel layout: banner + left panel + right) ── */
.page-shell { flex: 1; display: flex; flex-direction: column; }
.page-banner {
  width: 100%; height: 190px; position: relative; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg,#1a1d2e 0%,#0d0f18 100%);
}
.page-banner img { width:100%; height:100%; object-fit:cover; display:block; }
.page-body {
  display: flex; flex: 1; align-items: flex-start;
  width: 100%; padding: 0 50px 60px; gap: 32px;
}
/* Left side panel — same proportions as channel page */
.page-left {
  width: 390px; flex-shrink: 0;
  position: sticky; top: 24px;
  margin-top: -80px; z-index: 10;
}
.side-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.side-card-head {
  padding: 16px 18px 12px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.side-card-head h3 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent2);
}
.side-card-body { padding: 14px 18px 18px; }
.side-links { display: flex; flex-direction: column; gap: 2px; }
.side-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600;
  transition: background .15s, color .15s;
}
.side-links a i { width: 18px; text-align: center; color: var(--muted); }
.side-links a:hover { background: rgba(255,255,255,.05); }
.side-links a.active { background: var(--accent); color: #fff; }
.side-links a.active i { color: #fff; }


/* Channel-style left panel content (replaces old directory navigation panel) */
.side-card { background:transparent; border:0; box-shadow:none; border-radius:0; overflow:visible; }
.side-card-head { display:none; }
.side-card-body { padding:0; }
.side-links { display:block; }
.ch-avatar-block { display:flex; flex-direction:column; align-items:center; padding:20px 20px 16px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius) var(--radius) 0 0; border-bottom:none; }
.ch-avatar,.ch-avatar-placeholder { width:144px; height:144px; border-radius:50%; margin-bottom:14px; background:var(--panel2); }
.ch-avatar { object-fit:cover; border:3px solid var(--accent); box-shadow:0 4px 16px rgba(0,0,0,.5); }
.ch-avatar-placeholder { border:3px solid var(--line); display:flex; align-items:center; justify-content:center; }
.ch-avatar-placeholder i { font-size:57px; color:var(--muted); opacity:.3; }
.ch-name { font-family:var(--font-head); font-size:18px; font-weight:700; text-align:center; line-height:1.2; margin-bottom:4px; }
.ch-bio { font-size:12px; color:var(--muted); text-align:center; line-height:1.5; }
.ch-socials-block,.ch-home-block,.ch-info-block,.ch-panel-cap { background:var(--panel); border-left:1px solid var(--line); border-right:1px solid var(--line); }
.ch-socials-block { padding:14px 20px; border-top:1px solid rgba(255,255,255,.05); display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.ch-socials-block a { width:34px; height:34px; display:flex; align-items:center; justify-content:center; border-radius:8px; background:var(--panel2); color:var(--text); text-decoration:none; border:1px solid rgba(255,255,255,.04); }
.ch-socials-block a:hover { border-color:var(--accent2); color:#fff; }
.ch-empty { color:var(--muted); font-size:12px; opacity:.65; }
.ch-home-block { padding:0 20px 14px; display:flex; justify-content:center; }
.ch-home-btn { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:10px; text-decoration:none; border:1px solid rgba(255,255,255,.08); }
.ch-info-block { padding:16px 20px 20px; border-top:1px solid rgba(255,255,255,.05); }
.ch-location { display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; color:var(--muted); margin-bottom:10px; }
.ch-location i { color:var(--accent2); }
.ch-description { font-size:12px; color:var(--muted); line-height:1.55; text-align:center; }
.ch-panel-cap { height:0; border-bottom:1px solid var(--line); border-radius:0 0 var(--radius) var(--radius); box-shadow:var(--shadow); }

/* Right content column */
.page-right { flex: 1; min-width: 0; padding-top: 28px; }
.page-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.page-title-row h1 {
  font-size: var(--page-heading-size, 24px); font-weight: var(--page-heading-weight, 800); line-height: 1.2; color: var(--page-heading-color, var(--text));
}
.content-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 30px;
}
.content-card.rich :is(p,ul,ol,h2,h3,h4,blockquote,table) { margin-bottom: 14px; }
.content-card.rich :is(h2,h3,h4) { margin-top: 22px; }
.content-card.rich a { color: var(--accent); }
.content-card.rich ul, .content-card.rich ol { padding-left: 22px; }
.content-card.rich img { max-width:100%; height:auto; border-radius:8px; }

/* ── Footer ── */
.site-footer {
  background: var(--panel); border-top: 1px solid var(--line);
  margin-top: auto; padding: 26px 50px 30px;
}
.site-footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-nav a {
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 6px 10px; border-radius: 8px; transition: color .15s, background .15s;
}
.footer-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.footer-copy,.footer-copy a { color: var(--muted); font-size: 12.5px; text-decoration:none; }
.footer-copy a:hover { color: var(--text); text-decoration:underline; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .site-header-inner { padding: 0 28px; }
  .page-body { padding: 0 28px 44px; gap: 22px; }
  .page-left { width: 300px; }
  .ch-avatar,.ch-avatar-placeholder { width:116px; height:116px; }
  .site-footer { padding: 24px 28px; }
}
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .page-body { flex-direction: column; padding: 0 16px 36px; }
  .page-left {
    width: 100%; position: static; margin-top: -40px;
    margin-bottom: 8px;
  }
  .page-right { width: 100%; padding-top: 8px; }
  .page-banner { height: 120px; }
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .content-card { padding: 20px 18px; }
  .page-title-row h1 { font-size: 21px; }
}
@media (max-width: 480px) {
  .site-header-inner { padding: 0 14px; gap: 10px; }
  .site-brand { font-size: 16px; }
  .ch-avatar,.ch-avatar-placeholder { width:96px; height:96px; }
}
