/* ============================================================
   pttradio.co.uk — Shared visual system
   Hub bar + design tokens + card media for a coherent site
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #070b12;
  --bg-elevated: #0d1420;
  --bg-card: #121a28;
  --text: #eef2f7;
  --text-muted: #8b9cb3;
  --text-dim: #5c6b80;
  --accent: #00e5b0;
  --accent-dim: #00b88c;
  --accent-glow: rgba(0, 229, 176, 0.25);
  --blue: #3b82f6;
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);
  --warning: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --hub-h: 42px;
}

.site-hub {
  background: linear-gradient(180deg, #05080f 0%, #070b12 100%);
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  font-size: 0.8rem;
  position: relative;
  z-index: 300;
}
.site-hub-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-height: var(--hub-h);
}
.site-hub-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.site-hub-brand:hover { color: var(--accent); text-decoration: none; }
.site-hub-brand img {
  height: 28px;
  width: 28px;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(0, 229, 176, 0.35), 0 2px 8px rgba(0,0,0,0.35);
}
.site-hub-brand span {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.95rem;
}
.site-hub-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.site-hub-nav::-webkit-scrollbar { display: none; }
.site-hub-nav a {
  color: var(--text-muted);
  padding: 0.32rem 0.55rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.site-hub-nav a:hover,
.site-hub-nav a.active {
  background: rgba(0, 229, 176, 0.12);
  color: var(--accent);
  text-decoration: none;
}
.site-hub-nav .hub-sep {
  width: 1px;
  height: 14px;
  background: var(--border-strong);
  margin: 0 0.25rem;
}

@media (max-width: 720px) {
  .site-hub-inner { padding: 0.35rem 0.75rem; gap: 0.5rem; }
  .site-hub-brand span { font-size: 0.82rem; }
  .site-hub-brand img { height: 24px; width: 24px; }
  .site-hub-nav a { padding: 0.28rem 0.45rem; font-size: 0.75rem; }
  .site-hub-nav .hub-sep { display: none; }
}

.card-media {
  display: block;
  margin: -1.5rem -1.5rem 0.85rem;
  height: 72px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.card:hover .card-media img {
  transform: scale(1.04);
}
.card-media.logo-media {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0a1220, #0d1a14);
  padding: 0.5rem;
}
.card-media.logo-media img {
  width: auto;
  height: 40px;
  max-width: 70%;
  object-fit: contain;
}
.card-media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}
.card-media.logo-media::after { display: none; }

.hub-section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 229, 176, 0.1);
  border: 1px solid rgba(0, 229, 176, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.hero-band {
  max-width: 480px;
  margin: 0.75rem auto 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.hero-band img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
@media (max-width: 600px) {
  .hero-band { max-width: 100%; margin: 0.5rem 1rem 0; }
  .hero-band img { height: 64px; }
}
@media (max-width: 400px) {
  .hero-band { display: none; }
}

.site-footer-bar {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.25rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: var(--bg);
  font-family: var(--font);
}
.site-footer-bar a {
  color: var(--text-muted);
  margin: 0 0.4rem;
  text-decoration: none;
}
.site-footer-bar a:hover { color: var(--accent); }

.section-logo {
  display: block;
  margin: 0 auto 0.75rem;
  max-height: 40px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 229, 176, 0.2), 0 2px 10px rgba(0,0,0,0.3);
}

/* ---- Page photo headers (Fylde, Yorkshire, archive, etc.) ---- */
.page-photo-header {
  text-align: center;
  padding: 1.25rem 1rem 0.75rem;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.page-photo-header img.brand-banner,
.page-photo-header .brand-banner {
  max-width: min(420px, 88vw);
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 0 1px rgba(0, 229, 176, 0.15),
    0 12px 40px rgba(0,0,0,0.45),
    0 0 48px rgba(0, 229, 176, 0.08);
  display: block;
  margin: 0 auto;
}
.page-photo-header .tagline {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.page-photo-header .section-logo {
  margin-bottom: 0.35rem;
}

/* Cover strip for magazine / multi-image headers */
.cover-strip {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem 1rem 0.25rem;
  max-width: 960px;
  margin: 0 auto;
}
.cover-strip img {
  width: 110px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cover-strip img:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 28px rgba(0, 229, 176, 0.15);
}

@media (max-width: 600px) {
  .cover-strip img { width: 88px; height: 120px; }
}

/* ---- Site search ---- */
.site-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 0.35rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.site-search-btn:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 176, 0.4);
  background: rgba(0, 229, 176, 0.1);
}
.site-search-panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 2rem;
}
.site-search-panel[hidden] { display: none !important; }
.site-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}
.site-search-dialog {
  position: relative;
  width: min(560px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(0, 229, 176, 0.08);
  overflow: hidden;
  font-family: var(--font);
}
.site-search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.site-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
}
.site-search-bar input::placeholder { color: var(--text-dim); }
.site-search-kbd {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-family: var(--mono);
}
.site-search-results {
  max-height: min(50vh, 420px);
  overflow-y: auto;
  padding: 0.5rem;
}
.site-search-hint {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.site-search-hint strong { color: var(--accent); font-weight: 600; }
.site-search-hit {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.site-search-hit:hover {
  background: rgba(0, 229, 176, 0.1);
  text-decoration: none;
}
.site-search-section {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.site-search-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.site-search-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* ---- Unified top nav (one block, two tidy rows) ---- */
.site-hub-unified {
  position: sticky;
  top: 0;
  z-index: 400;
  background: rgba(5, 8, 15, 0.92);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.site-hub-unified .site-hub-inner {
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  min-height: 48px;
}
.site-hub-unified .site-hub-nav {
  flex: 1;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-hub-unified .site-hub-nav::-webkit-scrollbar { display: none; }
.site-hub-unified .site-hub-nav a {
  padding: 0.4rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 550;
  white-space: nowrap;
}
.site-hub-sub {
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 18, 0.6);
}
.site-hub-sub nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.35rem 1.25rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-hub-sub nav::-webkit-scrollbar { display: none; }
.site-hub-sub a {
  color: var(--text-dim);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.site-hub-sub a:hover,
.site-hub-sub a.active {
  color: var(--accent);
  background: rgba(0, 229, 176, 0.08);
  text-decoration: none;
}

@media (max-width: 720px) {
  .site-hub-unified .site-hub-inner {
    flex-wrap: wrap;
    padding: 0.4rem 0.75rem;
  }
  .site-hub-unified .site-hub-nav {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 0.15rem;
  }
  .site-hub-sub nav {
    padding: 0.3rem 0.75rem;
  }
  .site-hub-unified .site-hub-nav a {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }
}

/* Hide old second header when unified hub is present */
body:has(.site-hub-unified) > header.nav-legacy,
.site-hub-unified + header {
  display: none !important;
}
