/*
Theme Name: TV Radar UK
Theme URI: https://tvradar.uk
Author: TV Radar
Author URI: https://tvradar.uk
Description: A modern streaming-style dark theme for UK TV guides. Netflix/iPlayer inspired with purple accents.
Version: 1.5.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tvradar
Tags: dark-mode, entertainment, tv-guide, streaming, grid-layout, custom-colors

TV Radar UK - Your Complete UK TV Guide
*/

/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */

:root {
  /* Colors - Navy Blue & Coral Theme (matching tvradar.co.uk) */
  --color-bg-primary: #0f1c2e;
  --color-bg-secondary: #152238;
  --color-bg-card: #1e3a5f;
  --color-bg-hover: #2d4a6f;
  --color-bg-elevated: #345580;

  --color-accent: #ef4444;
  --color-accent-light: #f87171;
  --color-accent-dark: #dc2626;

  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;

  --color-border: #2d4a6f;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Channel Colors */
  --color-bbc: #ff4444;
  --color-itv: #0099ff;
  --color-ch4: #00cc00;
  --color-ch5: #ff9900;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-primary);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --container-max: 1400px;
  --header-height: 72px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global SVG constraint - prevent any SVG from being huge */
svg {
  max-width: 100%;
  height: auto;
}

/* Specifically constrain header/footer logo SVGs */
.site-header svg,
.site-footer svg,
.site-branding svg,
.site-title svg,
.logo-icon svg,
.footer-logo svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.site-main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: var(--space-2xl) 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, var(--color-bg-primary), rgba(10, 10, 15, 0.95));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: transform var(--transition-normal);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header.is-scrolled {
  background: rgba(10, 10, 15, 0.98);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  gap: var(--space-xl);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
}

.site-title:hover {
  color: var(--color-accent-light);
}

.logo-text {
  white-space: nowrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.logo-icon {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border-radius: var(--radius-md);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-icon svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  color: var(--color-text-primary);
}

.site-logo:hover {
  color: var(--color-accent-light);
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
}

.nav-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--color-text-primary);
  background-color: var(--color-bg-hover);
}

/* Primary Menu */
.primary-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
}

.primary-menu li {
  margin: 0;
}

.primary-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: var(--color-text-primary);
  background-color: var(--color-bg-hover);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.mobile-menu-toggle:hover {
  background: var(--color-bg-hover);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 1px;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Search Toggle */
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.search-toggle:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.search-toggle svg {
  width: 20px;
  height: 20px;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-overlay-content {
  width: 100%;
  max-width: 600px;
  padding: var(--space-xl);
  position: relative;
}

.search-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.search-close:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-hover);
}

.search-close svg {
  width: 24px;
  height: 24px;
}

/* Search Form */
.search-form {
  display: flex;
  width: 100%;
}

.search-input-wrapper {
  display: flex;
  width: 100%;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.search-input-wrapper:focus-within {
  border-color: var(--color-accent);
}

.search-input {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-accent);
  border: none;
  color: white;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-submit:hover {
  background: var(--color-accent-light);
}

.search-submit svg {
  width: 20px;
  height: 20px;
}

/* Mobile Navigation */
.mobile-navigation {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 72px);
  background: #12121a !important;
  z-index: 10000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.mobile-navigation.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-close {
  display: block;
  width: 100%;
  padding: 16px;
  margin-bottom: 20px;
  background: #e53e3e;
  border: none;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 8px;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu li {
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu a {
  display: block;
  padding: var(--space-md) 0;
  color: var(--color-text-primary);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .main-navigation {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-navigation {
    display: none !important;
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero,
.hero-section {
  position: relative;
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
  overflow: hidden;
}

.hero::before,
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--color-text-primary), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hero-cta svg {
  width: 20px;
  height: 20px;
}

.hero h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--color-text-primary), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   Front Page Sections
   ========================================================================== */

.front-page section {
  padding: var(--space-2xl) 0;
}

.featured-section,
.channels-section,
.latest-section {
  padding: var(--space-2xl) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.section-link:hover {
  color: var(--color-accent-light);
}

.section-link svg {
  width: 16px;
  height: 16px;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
}

.featured-grid .post-card-featured {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

@media (max-width: 992px) {
  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-grid .post-card-featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 576px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

/* Channel Grid */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}

.channel-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.channel-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.channel-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.channel-bbc {
  border-left: 3px solid var(--color-bbc);
}

.channel-bbc:hover {
  border-color: var(--color-bbc);
  box-shadow: 0 4px 20px rgba(187, 31, 41, 0.2);
}

.channel-itv {
  border-left: 3px solid var(--color-itv);
}

.channel-itv:hover {
  border-color: var(--color-itv);
  box-shadow: 0 4px 20px rgba(255, 209, 0, 0.2);
}

.channel-ch4 {
  border-left: 3px solid var(--color-ch4);
}

.channel-ch4:hover {
  border-color: var(--color-ch4);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.channel-ch5 {
  border-left: 3px solid var(--color-ch5);
}

.channel-ch5:hover {
  border-color: var(--color-ch5);
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.2);
}

/* ==========================================================================
   404 Error Page
   ========================================================================== */

.error-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) 0;
}

.error-content {
  max-width: 500px;
}

.error-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-xl);
  color: var(--color-accent);
}

.error-icon svg {
  width: 100%;
  height: 100%;
}

.error-title {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.3;
  margin-bottom: var(--space-md);
}

.error-message {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.error-actions {
  margin-bottom: var(--space-xl);
}

.error-search p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Cards - TV Show/Article Cards
   ========================================================================== */

/* Posts Grid (used in templates) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.posts-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
  .posts-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .posts-grid,
  .posts-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Post Card (used in template-parts) */
.post-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid var(--color-border);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--color-accent);
}

/* Today's card - red glow */
.post-card.card-today {
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
}

.post-card.card-today:hover {
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.6), var(--shadow-lg);
}

/* Tomorrow's card - subtle accent border */
.post-card.card-tomorrow {
  border-color: var(--color-accent);
}

/* Day tag badge */
.card-day-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  z-index: 10;
}

.card-day-today {
  background: #ef4444;
  color: #fff;
  animation: pulse-tag 1.5s ease-in-out infinite;
}

.card-day-tomorrow {
  background: var(--color-accent);
  color: #fff;
}

.card-day-past {
  background: #64748b;
  color: #fff;
}

.post-card.card-past {
  opacity: 0.75;
}

/* Pulsing glow on TODAY card */
.post-card.card-today {
  animation: pulse-card 2s ease-in-out infinite;
}

.post-card.card-today .card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid #ef4444;
  border-radius: var(--radius-lg);
  animation: pulse-border 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-tag {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 12px 4px rgba(239, 68, 68, 0.5);
  }
}

@keyframes pulse-card {
  0%, 100% {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 20px 5px rgba(239, 68, 68, 0.3);
  }
}

@keyframes pulse-border {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.post-card .card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card .card-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.post-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .card-image img {
  transform: scale(1.05);
}

.post-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  pointer-events: none;
}

.post-card .card-content {
  padding: var(--space-lg);
}

.post-card .card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.post-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.post-card .card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.post-card .card-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Featured Post Card */
.post-card-featured {
  grid-row: span 2;
}

.post-card-featured .card-image {
  aspect-ratio: 4/3;
}

.post-card-featured .card-title {
  font-size: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--color-accent);
}

.card-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-elevated);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

.card-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  opacity: 0.5;
}

.card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.card-time {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.card-content {
  padding: var(--space-lg);
}

.card-channel {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.card-channel.bbc { background: var(--color-bbc); color: white; }
.card-channel.itv { background: var(--color-itv); color: white; }
.card-channel.ch4 { background: var(--color-ch4); color: white; }
.card-channel.ch5 { background: var(--color-ch5); color: white; }

.card-title {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--color-accent-light);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Single Post/Article
   ========================================================================== */

.single-post {
  /* Remove max-width constraint - let hero be full width */
}

/* Post Hero - Full Width Featured Image */
.post-hero {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 450px;
  max-height: 550px;
  overflow: hidden;
  margin-bottom: var(--space-xl);
  margin-top: calc(-1 * var(--space-2xl)); /* Offset the site-main padding */
}

.post-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.post-hero-image img,
.post-hero-image .wp-post-image,
.post-hero-image .attachment-tvradar-hero,
.post-hero-image img.wp-post-image {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

.post-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 15, 0.3) 0%,
    rgba(10, 10, 15, 0.5) 50%,
    rgba(10, 10, 15, 0.9) 100%
  );
}

.post-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 150px;
  padding-bottom: var(--space-xl);
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.category-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.category-badge:hover {
  background: var(--color-accent-light);
  color: white;
}

.post-hero .post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
  max-width: 800px;
}

.post-hero .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.post-hero .post-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.post-hero .post-meta svg {
  width: 16px;
  height: 16px;
}

/* Post Header (without hero image) */
.post-header {
  margin-bottom: var(--space-2xl);
  max-width: 800px;
}

.post-category {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.post-meta .author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.post-meta svg {
  width: 16px;
  height: 16px;
}

/* Post Content Wrapper */
.post-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.post-featured-image {
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: auto;
}

/* Article Content */
.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.post-content h2 {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.post-content h3 {
  margin-top: var(--space-xl);
  color: var(--color-accent-light);
}

.post-content ul, .post-content ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.post-content li {
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
}

.post-content blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.post-content table {
  width: 100%;
  margin: var(--space-xl) 0;
  border-collapse: collapse;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.post-content th {
  background: var(--color-bg-elevated);
  font-weight: 600;
  color: var(--color-text-primary);
}

.post-content tr:hover td {
  background: var(--color-bg-hover);
}

/* ==========================================================================
   TV Guide Navigation (Prev/Next Day)
   ========================================================================== */

.tv-guide-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.guide-nav-prev,
.guide-nav-next {
  flex: 1;
}

.guide-nav-next {
  text-align: right;
}

.tv-guide-nav a {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
}

.tv-guide-nav a:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-elevated);
  transform: translateY(-2px);
}

.tv-guide-nav .nav-label {
  display: block;
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.9rem;
}

.tv-guide-nav .nav-date {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* See Also Links (inline) */
.see-also-box {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-elevated));
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
}

.see-also-box strong {
  color: var(--color-accent);
}

.see-also-box a {
  color: var(--color-accent-light);
  text-decoration: none;
  font-weight: 500;
}

.see-also-box a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .tv-guide-nav {
    flex-direction: column;
  }

  .guide-nav-next {
    text-align: left;
  }

  .tv-guide-nav a {
    display: block;
    width: 100%;
  }
}

/* ==========================================================================
   Day Guide Links (Mon-Sun navigation)
   ========================================================================== */

.day-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-lg);
}

.day-guide-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  padding: var(--space-sm) var(--space-lg);
  background: #1e3a5f;
  border: 1px solid #2d4a6f;
  border-radius: var(--radius-md);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-base);
  min-width: 90px;
}

.day-guide-link .day-name {
  font-weight: 600;
}

.day-guide-link .day-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.day-guide-link:hover {
  border-color: #ef4444;
  background: #2d4a6f;
  color: #fff;
}

.day-guide-link:hover .day-date {
  color: rgba(255, 255, 255, 0.8);
}

.day-guide-link.current {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.day-guide-link.current .day-date {
  color: rgba(255, 255, 255, 0.9);
}

/* Today's pulsing indicator */
.day-guide-link.is-today {
  border-color: #ef4444;
}

.today-pulse {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.day-guide-link.current .today-pulse {
  background: #fff;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.no-guide-message {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.no-guide-message h1 {
  margin-bottom: var(--space-lg);
}

.no-guide-message p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.no-guide-message a {
  color: var(--color-accent);
}

/* ==========================================================================
   TV Schedule Table
   ========================================================================== */

.tv-schedule {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-xl) 0;
}

.tv-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

.tv-schedule-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.schedule-row {
  display: grid;
  grid-template-columns: 100px 120px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  transition: background var(--transition-fast);
}

.schedule-row:hover {
  background: var(--color-bg-hover);
}

.schedule-time {
  font-weight: 600;
  color: var(--color-accent-light);
}

.schedule-channel {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.schedule-program {
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--space-sm);
}

.footer-section a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--color-accent-light);
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 992px) {
  .footer-widgets {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

.footer-widget-area h4 {
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

.footer-brand {
  margin-bottom: var(--space-lg);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: var(--space-md);
}

.footer-logo:hover {
  color: var(--color-accent-light);
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: var(--space-sm);
}

.footer-menu a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-menu a:hover {
  color: var(--color-accent-light);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-accent);
  color: white;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: white;
}

.btn-secondary {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-elevated);
  border-color: var(--color-accent);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent-light); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --container-max: 100%;
  }

  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; }
  .post-title { font-size: 2rem; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .post-title { font-size: 1.75rem; }

  /* Post Hero Mobile */
  .post-hero {
    min-height: 300px;
    max-height: 450px;
  }

  .post-hero-content {
    padding-top: 100px;
  }

  .post-hero .post-title {
    font-size: 1.75rem;
  }

  .post-hero .post-meta {
    font-size: 0.8rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .schedule-row {
    grid-template-columns: 80px 1fr;
  }

  .schedule-channel {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Post Content Mobile */
  .post-content-wrapper {
    padding: 0;
  }

  .post-content {
    font-size: 1rem;
  }

  .post-content h2 {
    font-size: 1.5rem;
  }

  .post-content h3 {
    font-size: 1.25rem;
  }

  /* Tables Mobile */
  .post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .post-content th,
  .post-content td {
    padding: var(--space-sm);
    font-size: 0.875rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Post Hero Small Mobile */
  .post-hero {
    min-height: 250px;
    max-height: 350px;
  }

  .post-hero-content {
    padding-top: 80px;
  }

  .post-hero .post-title {
    font-size: 1.5rem;
  }

  .category-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* Calendar Buttons Mobile - keep horizontal in tables */
  .tvradar-calendar-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px;
  }

  .tvradar-calendar-btn {
    font-size: 9px;
    padding: 2px 4px;
  }

  .tvradar-calendar-btn span {
    display: none;
  }

  .tvradar-calendar-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* ==========================================================================
   Sticky TOC - Left Side Panel Style
   ========================================================================== */

.tvradar-sticky-toc {
  position: fixed;
  top: 100px;
  left: 0;
  z-index: 1000;
  width: 0;
  height: 0;
  overflow: visible;
}

.tvradar-sticky-toc:not(.is-visible) {
  display: none;
}

/* Tab button on the left edge */
.sticky-toc-tab {
  position: absolute;
  pointer-events: auto;
  left: 100%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.sticky-toc-tab:hover {
  background: #dc2626;
}

.sticky-toc-tab svg {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}

.sticky-toc-tab span {
  letter-spacing: 1px;
}

/* Hide tab when panel is open */
.tvradar-sticky-toc.is-open .sticky-toc-tab {
  opacity: 0;
  pointer-events: none;
}

/* Panel */
.sticky-toc-panel {
  background: white;
  color: #1a1a1a;
  min-width: 350px;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
  pointer-events: none;
}

.tvradar-sticky-toc.is-open .sticky-toc-panel {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Header */
.sticky-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ef4444;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.sticky-toc-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.sticky-toc-close:hover {
  opacity: 1;
}

/* Content */
.sticky-toc-content {
  padding: 12px 0;
  overflow-y: auto;
  flex: 1;
}

.sticky-toc-content .toc-list,
.sticky-toc-content .toc-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sticky-toc-content .toc-h2 {
  margin: 0;
}

.sticky-toc-content .toc-h2 > a {
  display: block;
  padding: 10px 20px;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.sticky-toc-content .toc-sublist {
  margin-left: 0;
}

.sticky-toc-content .toc-h3 {
  margin: 0;
}

.sticky-toc-content .toc-h3 > a {
  display: block;
  padding: 6px 20px 6px 32px;
  color: #666;
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.sticky-toc-content a:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

.sticky-toc-content a.is-active {
  background: #fef2f2;
  color: #ef4444;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .tvradar-sticky-toc {
    top: 80px;
  }

  .tvradar-sticky-toc.is-open {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
  }

  .sticky-toc-panel {
    min-width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .sticky-toc-tab {
    padding: 8px 5px;
    font-size: 0.65rem;
  }

  .sticky-toc-tab svg {
    width: 14px;
    height: 14px;
  }

}

/* ==========================================================================
   Author Box
   ========================================================================== */

.author-box {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.author-box-avatar {
  flex-shrink: 0;
}

.author-box-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
}

.author-box-content {
  flex: 1;
  min-width: 0;
}

.author-box-name {
  margin: 0 0 var(--space-sm) 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.author-box-name a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.author-box-name a:hover {
  color: var(--color-accent);
}

.author-box-bio {
  margin: 0 0 var(--space-md) 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.author-box-social {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.author-box-social .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.author-box-social .social-link:hover {
  transform: translateY(-2px);
}

.author-box-social .social-link svg {
  width: 18px;
  height: 18px;
}

/* Social brand colors on hover */
.author-box-social .social-twitter:hover {
  background: #000;
  color: #fff;
}

.author-box-social .social-linkedin:hover {
  background: #0A66C2;
  color: #fff;
}

.author-box-social .social-instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}

.author-box-social .social-facebook:hover {
  background: #1877F2;
  color: #fff;
}

.author-box-social .social-website:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-box-social {
    justify-content: center;
  }
}
