/*
Theme Name: Modern Blog
Theme URI: https://theadityashah.com/themes/modern-blog/
Author: Aditya Shah
Author URI: https://theadityashah.com
Copyright: (c) 2026 Aditya Shah
Description: A clean, fast editorial theme for news sites, blogs, and online magazines. Features a bold gradient header, magazine-style hero layout, card grid with hover animations, six built-in colour palette presets, breaking news ticker bar, and a responsive mobile navigation. Translation-ready and built on standard WordPress APIs.
Version: 1.1.2
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-blog
Tags: news, blog, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, sticky-post, translation-ready, block-styles, editor-style
*/

/* ─── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
  /* Default: Default Pink — override per palette */
  --accent: #E91E8C;
  --accent-dark: #C2185B;
  --accent-light: #FCE4F6;
  --bg-body: #F9F8FC;
  --bg-card: #FFFFFF;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --card-radius: 14px;
  --border: rgba(0, 0, 0, 0.07);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-md: 0 6px 30px rgba(0, 0, 0, .12);
  --shadow-hover: 0 14px 48px rgba(0, 0, 0, .18);
  --max-width: 1200px;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h: 64px;
  --transition: all 0.2s ease;
  --surface: #FFFFFF;
  /* Header gradient uses accent colors */
  --header-grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* ─── Palette Overrides (body class set by functions.php) ────────────────── */
body.palette-pink {
  --accent: #E91E8C;
  --accent-dark: #C2185B;
  --accent-light: #FCE4F6;
  --header-grad: linear-gradient(135deg, #E91E8C 0%, #9C27B0 100%);
}

body.palette-purple {
  --accent: #6B6EF9;
  --accent-dark: #4A4DD4;
  --accent-light: #EEF0FF;
  --header-grad: linear-gradient(135deg, #6B6EF9 0%, #9333EA 100%);
}

body.palette-emerald {
  --accent: #00897B;
  --accent-dark: #00695C;
  --accent-light: #E0F2F0;
  --header-grad: linear-gradient(135deg, #00897B 0%, #2E7D32 100%);
}

body.palette-crimson {
  --accent: #C62828;
  --accent-dark: #8E0000;
  --accent-light: #FFEBEE;
  --header-grad: linear-gradient(135deg, #C62828 0%, #6A1B1B 100%);
}

body.palette-midnight {
  --accent: #A78BFA;
  --accent-dark: #7C3AED;
  --accent-light: #2d2060;
  --bg-body: #0F0F1A;
  --bg-card: #1E1B4B;
  --text: #E5E7EB;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 30px rgba(0, 0, 0, .4);
  --shadow-hover: 0 14px 48px rgba(0, 0, 0, .5);
  --header-grad: linear-gradient(135deg, #1E1B4B 0%, #0F0F1A 100%);
}

body.palette-gold {
  --accent: #D97706;
  --accent-dark: #92400E;
  --accent-light: #FEF3C7;
  --header-grad: linear-gradient(135deg, #D97706 0%, #B45309 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

#main-content {
  min-height: 60vh;
}

/* ─── Site Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-grad);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .15);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-shrunk {
  padding-block: 4px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .25);
}

.header-inner {
  display: flex;
  align-items: stretch;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.3s ease;
}

.site-header.is-shrunk .header-inner {
  height: calc(var(--header-h) - 16px);
}

/* Brand */
.header-brand {
  align-self: center;
}

.header-brand a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
}

.site-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-tagline {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-brand .custom-logo-link img {
  max-height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Nav Tabs — underline tab style */
.nav-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  min-width: 0; /* allow flex to constrain nav — without this, nav expands to full content width */
  position: relative; /* positioning context for .nav-more-dropdown */
  /* overflow must stay visible so the "More" dropdown isn't clipped */
  overflow: visible;
  padding-block: 0;
}

.nav-tabs a,
.nav-tabs .page_item a {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  height: 100%;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-tabs a:hover,
.nav-tabs a.active {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.nav-tabs ul:not(.nav-more-dropdown) {
  display: flex;
  list-style: none;
  gap: 0;
  height: 100%;
}

.nav-tabs ul:not(.nav-more-dropdown) li a {
  height: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-search-btn,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.header-search-btn:hover,
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.menu-toggle {
  display: none;
}

/* ─── Category Nav Links — underline tab with per-category color accent ─── */
.nav-tabs .nav-cat-pill,
.nav-cat-pill {
  display: inline-flex !important;
  align-items: center;
  padding: 0 18px !important;
  height: 100%;
  border-radius: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: var(--transition);
  background: transparent !important;
  color: rgba(255, 255, 255, 0.82) !important;
  border: none !important;
  box-shadow: none !important;
  /* Bottom border uses the category color as the underline accent */
  border-bottom: 3px solid transparent !important;
  position: relative;
}

.nav-tabs .nav-cat-pill:hover,
.nav-cat-pill:hover {
  color: #fff !important;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1) !important;
  border-bottom-color: var(--cat-color, rgba(255, 255, 255, 0.6)) !important;
  transform: none;
}

.nav-tabs .nav-cat-pill.active,
.nav-cat-pill.active {
  color: #fff !important;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12) !important;
  border-bottom-color: var(--cat-color, #fff) !important;
  border-bottom-width: 3px !important;
}

/* WP nav menu current-page state maps to active pill style */
.nav-tabs li.current-menu-item > a.nav-cat-pill,
.nav-tabs li.current-menu-ancestor > a.nav-cat-pill {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-bottom-color: var(--cat-color, #fff) !important;
  border-bottom-width: 3px !important;
}

/* WP nav menu generates a <ul> — make it flex to match the tab bar */
.nav-tabs > ul.menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  flex: 0 0 auto; /* natural width so More button sits directly after last item */
  overflow: hidden;
}

.nav-tabs > ul.menu > li {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

.nav-tabs > ul.menu > li[hidden] {
  display: none !important;
}

/* ─── "More ▾" overflow dropdown ─────────────────────────────────────────── */
.nav-more {
  position: static; /* dropdown positions relative to .nav-tabs (full header height) */
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
}

.nav-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.nav-more-btn svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-more-dropdown {
  display: block;
  position: absolute;
  top: 100%; /* 100% of .nav-tabs = full header height, so dropdown starts below header */
  right: 0;
  min-width: 220px;
  height: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  z-index: 200;
  flex-direction: column; /* for when display:block !important is overridden by specificity edge cases */
}

.nav-more-dropdown[hidden] {
  display: none !important;
}

/* Dropdown items — no nav-cat-pill class (stripped by JS), so plain selectors work */
.nav-more-dropdown li {
  display: block;
  height: auto;
  flex-shrink: 0;
  background-color: white;
}

.nav-more-dropdown li a {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  color: #1a1a2e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-left: 3px solid var(--cat-color, #9C27B0);
  background: transparent;
  height: auto;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease;
  background-color: white;
}

.nav-more-dropdown li a:hover {
  background: #f5f5f8;
  color: var(--cat-color, #9C27B0);
}

.nav-more-dropdown li.current-menu-item > a {
  background: #f0f0f8;
  color: var(--cat-color, #9C27B0);
  font-weight: 800;
}

/* ─── Breaking Bar ───────────────────────────────────────────────────────── */
.breaking-bar {
  background: #111827;
  border-top: none;
  overflow: hidden;
}

.breaking-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 9px;
  white-space: nowrap;
  overflow: hidden;
}

.breaking-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--accent);
  color: #fff;
  padding: 4px 11px;
  border-radius: 4px;
  flex-shrink: 0;
}

.breaking-text {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  display: inline-block;
  animation: ticker 35s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  from {
    transform: translateX(60%);
  }

  to {
    transform: translateX(-100%);
  }
}

.breaking-text a {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.breaking-text a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ─── Mobile Nav ─────────────────────────────────────────────────────────── */
.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg-card);
  z-index: 201;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  animation: slideIn 0.25s ease;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.mobile-nav-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
  margin-bottom: 12px;
}

.mobile-nav-close:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* wp_nav_menu generates a <ul> inside mobile-nav-panel */
.mobile-nav-panel .mobile-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mobile-nav-panel .mobile-nav-menu li {
  display: block;
}

.mobile-nav-panel a {
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.mobile-nav-panel a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ─── Search Overlay ─────────────────────────────────────────────────────── */
.search-overlay[hidden] {
  display: none;
}

.search-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  animation: fadeIn 0.15s ease;
}

.search-overlay-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 301;
  padding: 32px clamp(16px, 5vw, 60px) 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.2s ease;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.search-overlay-form {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 40px;
  overflow: hidden;
  padding: 0 20px;
  max-width: 640px;
  margin: 0 auto;
}

.search-overlay-form input[type="search"] {
  flex: 1;
  padding: 14px 12px;
  font-size: 1.1rem;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
}

.search-overlay-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-overlay-form button {
  color: rgba(255, 255, 255, 0.8);
  padding: 4px;
  transition: var(--transition);
}

.search-overlay-form button:hover {
  color: #fff;
}

.search-overlay-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.search-overlay-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ─── Category Badge ─────────────────────────────────────────────────────── */
.cat-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
}

.cat-badge:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 45%;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  margin-block: 28px;
  min-height: 420px;
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  background: var(--bg-card);
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

.hero-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-meta .sep {
  opacity: 0.5;
}

.hero-meta a {
  color: var(--accent);
  font-weight: 500;
}

.hero-meta a:hover {
  text-decoration: underline;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: var(--transition);
  align-self: flex-start;
  margin-top: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  opacity: 0.95;
}

.hero-cta svg {
  transition: transform 0.2s ease;
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-section:hover .hero-image img {
  transform: scale(1.03);
}

/* Add a gradient overlay blending hero image into content */
.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg-card) 0%, transparent 30%);
  z-index: 1;
  pointer-events: none;
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: var(--accent-light);
}

/* ─── Homepage Layout ────────────────────────────────────────────────────── */
.home-layout {
  padding-bottom: 60px;
}

.home-content-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ─── Section Label ──────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  margin-bottom: 20px;
}

/* ─── Article Grid ───────────────────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(var(--cards-per-row, 3), 1fr);
  gap: 24px;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s ease both;
}

.card:nth-child(2) {
  animation-delay: 0.06s;
}

.card:nth-child(3) {
  animation-delay: 0.12s;
}

.card:nth-child(4) {
  animation-delay: 0.18s;
}

.card:nth-child(5) {
  animation-delay: 0.24s;
}

.card:nth-child(6) {
  animation-delay: 0.30s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--accent-light);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-thumb img {
  transform: scale(1.06);
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--accent);
  opacity: 0.4;
}

.card-thumb-placeholder svg {
  width: 48px;
  height: 48px;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

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

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}

.card-meta .sep {
  opacity: 0.5;
}

/* ─── Mini Card (sidebar) ─────────────────────────────────────────────────── */
.card-mini {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-block: 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
}

.card-mini:last-child {
  border-bottom: none;
}

.card-mini:hover {
  text-decoration: none;
}

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

.card-mini-thumb {
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--accent-light);
}

.card-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.card-mini-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0.4;
  color: var(--accent);
}

.card-mini-body {
  flex: 1;
  min-width: 0;
}

.card-mini-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.card-mini-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Related Articles (end of post — card grid) ─────────────────────────── */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.related-articles-heading {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.related-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--accent-light);
}

.related-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.related-card:hover .related-card-thumb img {
  transform: scale(1.06);
}

.related-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  color: var(--accent);
}

.related-card-body {
  flex: 1;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card-cat {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cat-color, var(--accent));
}

.related-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

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

.related-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 4px;
}

@media (max-width: 680px) {
  .related-articles-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Homepage Sidebar ───────────────────────────────────────────────────── */
.home-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.sidebar-widget-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 12px;
}

/* ─── Single Article ─────────────────────────────────────────────────────── */
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) 300px;
  gap: 40px;
  align-items: start;
  padding-block: 32px;
}

.single-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

/* Article Header */
.article-header {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.breadcrumb .sep {
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

.article-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.article-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 400;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-meta strong {
  color: var(--text);
  font-weight: 600;
}

.article-meta .sep {
  opacity: 0.4;
}

.article-meta a {
  color: var(--accent);
}

/* Source Attribution */
.source-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
  align-self: flex-start;
}

.source-line a {
  color: var(--accent);
  font-weight: 500;
}

.source-line a:hover {
  text-decoration: underline;
}

/* Featured Image */
.article-featured-image {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16/9;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pexels-credit {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

.pexels-credit a {
  color: var(--text-muted);
}

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

/* Article Body */
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font-head);
  color: var(--text);
  margin-block: 1.6em 0.6em;
  line-height: 1.2;
}

.article-body h2 {
  font-size: 1.5rem;
}

.article-body h3 {
  font-size: 1.25rem;
}

.article-body p {
  margin-bottom: 1.2em;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
}

.article-body a:hover {
  opacity: 0.8;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.article-body li {
  margin-bottom: 0.4em;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-body img {
  border-radius: 12px;
  margin-block: 1.5em;
  box-shadow: var(--shadow-sm);
}

.article-body strong {
  color: var(--text);
}

/* Article Footer */
.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.tag-chip:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ─── Archive / Search ───────────────────────────────────────────────────── */
.archive-header {
  padding-block: 32px 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 32px;
}

.archive-header .archive-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}

.archive-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}

.archive-header .archive-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 600px;
}

.archive-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0 20px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.pagination a {
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.pagination .current {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}

/* ─── 404 Page ───────────────────────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.error-page .error-code {
  font-family: var(--font-head);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  background: var(--header-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--text);
}

.error-page p {
  color: var(--text-muted);
  max-width: 400px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  text-decoration: none;
}

/* ─── Search Form ─────────────────────────────────────────────────────────── */
.search-form-wrap {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-width: 500px;
  margin: 20px auto;
}

.search-form-wrap input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: none;
  outline: none;
  font-family: var(--font-body);
  background: var(--bg-card);
  color: var(--text);
}

.search-form-wrap button {
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-form-wrap button:hover {
  opacity: 0.9;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
  margin-top: 60px;
}

body.palette-midnight .site-footer {
  background: #07070f;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.footer-brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  margin-top: 2px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  width: 100%;
  text-align: center;
}

/* ─── Theme Options Admin Page ───────────────────────────────────────────── */
.modern-blog-options-wrap {
  max-width: 900px;
  padding: 24px 0;
}

.modern-blog-options-wrap h1 {
  margin-bottom: 24px;
}

.modern-blog-options-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.modern-blog-options-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.palette-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.palette-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.palette-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
}

.palette-card.selected {
  border-color: var(--p-accent, #E91E8C);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.palette-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: block;
}

.palette-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
}

.palette-card label {
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: block;
}

.modern-blog-save-btn {
  background: #1d4ed8;
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.modern-blog-save-btn:hover {
  background: #1e40af;
}

.modern-blog-options-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}

.modern-blog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modern-blog-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}

.modern-blog-field input[type="text"],
.modern-blog-field input[type="color"],
.modern-blog-field select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.modern-blog-field input[type="color"] {
  padding: 4px;
  height: 38px;
  width: 80px;
}

.modern-blog-field input:focus,
.modern-blog-field select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.modern-blog-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modern-blog-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-tabs {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .home-content-row {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
  }

  .single-layout {
    grid-template-columns: 1fr;
  }

  .single-sidebar {
    position: static;
  }

  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
    height: 260px;
  }

  .hero-image::before {
    background: linear-gradient(to bottom, transparent 60%, var(--bg-card) 100%);
  }

  .hero-content {
    padding: 28px 24px;
  }
}

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

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

  .article-title {
    font-size: 1.6rem;
  }
}

/* ─── Category Sections (homepage) ──────────────────────────────────────── */
.category-sections {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.cat-section {}

.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 20px;
  background: var(--cat-section-color, var(--accent));
  position: relative;
  overflow: hidden;
}

.cat-section-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cat-section-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
}

.cat-section-see-all {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  transition: var(--transition);
  flex-shrink: 0;
}

.cat-section-see-all:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.cat-section-grid {
  display: grid;
  grid-template-columns: repeat(var(--cards-per-row, 3), 1fr);
  gap: 24px;
}

/* Category section card accent color matching */
.cat-section .card .cat-badge {
  background: var(--cat-section-color, var(--accent));
}

@media (max-width: 900px) {
  .cat-section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cat-section-grid {
    grid-template-columns: 1fr;
  }

  .cat-section-header {
    border-radius: 10px 10px 0 0;
  }
}

/* ─── Static Page Layout ─────────────────────────────────────────────────── */
.page-layout {
  max-width: 780px;
  margin: 0 auto;
  padding-block: 48px;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.page-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.page-content h2,
.page-content h3 {
  font-family: var(--font-head);
  margin-block: 1.5em 0.6em;
}

.page-content p {
  margin-bottom: 1.2em;
}

.page-content a {
  color: var(--accent);
}

/* ─── Archive Layout ─────────────────────────────────────────────────────── */
.archive-layout {
  padding-bottom: 60px;
}

/* ─── WP Alignment Classes ───────────────────────────────────────────────── */
.alignleft {
  float: left;
  margin: 0 1.5em 1em 0;
}

.alignright {
  float: right;
  margin: 0 0 1em 1.5em;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   REVIEWS — shared star styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* Theme fallback stars */
.star {
  font-size: 1rem;
  line-height: 1;
}

.star--filled {
  color: #f59e0b;
}

.star--half {
  color: #f59e0b;
  opacity: .5;
}

.star--empty {
  color: #d1d5db;
}

/* Plugin (cep_render_stars) star classes — used inside review components */
.cep-stars {
  display: inline-flex;
  gap: 1px;
}

.cep-star {
  font-size: 1rem;
  line-height: 1;
  color: #d1d5db;
}

.cep-star--filled {
  color: #f59e0b;
}

.cep-star--half {
  position: relative;
  color: #d1d5db;
}

.cep-star--half::before {
  content: '★';
  position: absolute;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: #f59e0b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE REVIEWS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.home-reviews-section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}

.home-reviews-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.home-reviews-section__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
}

.home-reviews-section__see-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 6px 14px;
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  transition: background .18s, color .18s;
}

.home-reviews-section__see-all:hover {
  background: var(--accent);
  color: #fff;
}

/* Grid */
.home-reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .home-reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .home-reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.home-reviews-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, transform .18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.home-reviews-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
  transform: translateY(-3px);
}

.home-reviews-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--border);
}

.home-reviews-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.home-reviews-card:hover .home-reviews-card__thumb img {
  transform: scale(1.04);
}

.home-reviews-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.home-reviews-card__badge--top {
  background: rgba(245, 158, 11, .9);
  color: #fff;
}

.home-reviews-card__badge--rec {
  background: rgba(34, 197, 94, .9);
  color: #fff;
}

.home-reviews-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.home-reviews-card__type {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}

.home-reviews-card__title {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-reviews-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-reviews-card__stars {
  display: flex;
  gap: 1px;
}

.home-reviews-card__score {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text);
}

.home-reviews-card__cta {
  margin-top: auto;
  padding-top: 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
}

/* No-thumbnail fallback: accent gradient top stripe */
.home-reviews-card:not(:has(.home-reviews-card__thumb)) .home-reviews-card__body {
  border-top: 4px solid var(--accent);
}

/* Wider support fallback using :first-child */
.home-reviews-card__body:first-child {
  border-top: 4px solid var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   REVIEWS ARCHIVE  (/reviews/)
   ═══════════════════════════════════════════════════════════════════════════ */

.reviews-archive-page {
  padding-bottom: 80px;
}

/* Hero */
.reviews-archive__hero {
  background: var(--header-grad);
  padding: 60px 0 52px;
  margin-bottom: 40px;
}

.reviews-archive__hero-inner {
  text-align: center;
}

.reviews-archive__hero-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
  margin: 0 0 10px;
}

.reviews-archive__hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -.03em;
}

.reviews-archive__hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, .8);
  margin: 0;
  max-width: 480px;
  margin-inline: auto;
}

/* Filter tabs */
.reviews-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.reviews-filter__tab {
  display: inline-block;
  padding: 7px 18px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface);
  transition: background .16s, border-color .16s, color .16s;
}

.reviews-filter__tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
}

.reviews-filter__tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Grid */
.reviews-archive__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .reviews-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .reviews-archive__grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.reviews-archive__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  transition: box-shadow .2s, transform .18s;
}

.reviews-archive__card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, .13);
  transform: translateY(-4px);
}

.reviews-archive__thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--border);
}

.reviews-archive__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .32s ease;
}

.reviews-archive__card:hover .reviews-archive__thumb img {
  transform: scale(1.05);
}

.reviews-archive__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.reviews-archive__badge--top {
  background: rgba(245, 158, 11, .92);
  color: #fff;
}

.reviews-archive__badge--rec {
  background: rgba(34, 197, 94, .92);
  color: #fff;
}

.reviews-archive__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.reviews-archive__type {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}

.reviews-archive__title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  color: var(--text);
}

.reviews-archive__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reviews-archive__stars {
  display: flex;
  gap: 1px;
}

.reviews-archive__stars .cep-stars {
  gap: 1px;
}

.reviews-archive__score {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}

.reviews-archive__price {
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: auto;
}

.reviews-archive__excerpt {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.reviews-archive__cta {
  margin-top: auto;
  padding-top: 10px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
}

.reviews-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE REVIEW  (/reviews/slug/)
   ═══════════════════════════════════════════════════════════════════════════ */

.single-review-page {
  padding-bottom: 80px;
}

/* Hero */
.single-review__hero {
  background: var(--header-grad);
  padding: 52px 0 44px;
  margin-bottom: 40px;
}

.single-review__hero-inner {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.single-review__type-pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .3);
  width: fit-content;
}

.single-review__title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0;
}

.single-review__hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.single-review__stars {
  display: flex;
  gap: 2px;
}

.single-review__stars .star {
  font-size: 1.1rem;
}

.single-review__score {
  font-size: .95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .95);
}

.single-review__price {
  font-size: .82rem;
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .9);
  padding: 3px 12px;
  border-radius: 20px;
  margin-left: 6px;
}

.single-review__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: rgba(255, 255, 255, .7);
  flex-wrap: wrap;
}

.single-review__meta .sep {
  opacity: .5;
}

.single-review__back-link {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  font-weight: 600;
}

.single-review__back-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Layout */
.single-review__body-wrap {
  padding-top: 4px;
}

.single-review__layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) {
  .single-review__layout {
    grid-template-columns: 1fr;
  }

  .single-review__sidebar {
    order: -1;
  }
}

/* Featured image */
.single-review__feat-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
}

.single-review__feat-image img {
  display: block;
  width: 100%;
  height: auto;
}

.single-review__feat-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: .75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.single-review__feat-badge--top {
  background: rgba(245, 158, 11, .92);
  color: #fff;
}

.single-review__feat-badge--rec {
  background: rgba(34, 197, 94, .92);
  color: #fff;
}

/* Verdict box */
.single-review__verdict-box {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, #fff) 0%, color-mix(in srgb, var(--accent) 4%, #fff) 100%);
  border: 1.5px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 28px;
}

@supports not (color: color-mix(in srgb, red 10%, transparent)) {
  .single-review__verdict-box {
    background: #fdf4ff;
    border-color: rgba(233, 30, 140, .2);
  }
}

.single-review__verdict-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.single-review__verdict-box p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  font-weight: 500;
}

/* Pros / Cons */
.single-review__proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 560px) {
  .single-review__proscons {
    grid-template-columns: 1fr;
  }
}

.single-review__pros,
.single-review__cons {
  border-radius: 12px;
  padding: 18px 20px;
}

.single-review__pros {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}

.single-review__cons {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
}

.single-review__pc-title {
  font-size: .85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.single-review__pc-title--pros {
  color: #16a34a;
}

.single-review__pc-title--cons {
  color: #dc2626;
}

.pc-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-style: normal;
  flex-shrink: 0;
}

.single-review__pros .pc-icon {
  background: #dcfce7;
  color: #16a34a;
}

.single-review__cons .pc-icon {
  background: #fee2e2;
  color: #dc2626;
}

.single-review__pros ul,
.single-review__cons ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.single-review__pros li,
.single-review__cons li {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text);
  padding-left: 18px;
  position: relative;
}

.single-review__pros li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}

.single-review__cons li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 700;
}

/* Content */
.single-review__content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.single-review__content h2,
.single-review__content h3 {
  font-family: var(--font-head);
  font-weight: 800;
  margin-block: 1.5em .6em;
}

.single-review__content p {
  margin-bottom: 1.2em;
}

.single-review__content a {
  color: var(--accent);
}

.single-review__content img {
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

/* CTA */
.single-review__cta-wrap {
  margin-top: 36px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.single-review__buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity .18s, transform .15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

.single-review__buy-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.single-review__disclaimer {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 10px 0 0;
}

/* Sidebar */
.single-review__sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.single-review__score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
  position: sticky;
  top: 24px;
}

.single-review__score-big {
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.single-review__score-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.single-review__stars--lg {
  justify-content: center;
  margin-bottom: 14px;
}

.single-review__stars--lg .star {
  font-size: 1.4rem;
}

.single-review__score-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.single-review__score-badge--top {
  background: #fef3c7;
  color: #92400e;
}

.single-review__score-badge--rec {
  background: #dcfce7;
  color: #166534;
}

.single-review__sidebar-price {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 500;
}

.single-review__sidebar-buy {
  display: block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity .18s;
}

.single-review__sidebar-buy:hover {
  opacity: .85;
}

/* Nav pill override for Reviews */
.nav-cat-pill--reviews {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff !important;
  border: none;
}

.nav-cat-pill--reviews:hover,
.nav-cat-pill--reviews.active {
  opacity: .88;
  color: #fff !important;
}

.mobile-nav-reviews-link {
  font-weight: 700;
  color: #7c3aed !important;
}

/* ── WordPress Recommended / Required Classes ─────────── */
.sticky {}
.gallery-caption {}
.bypostauthor {}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  -webkit-clip-path: none;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}
/* ─── Comments & Forms ───────────────────────────────────────────────────── */
.comments-area {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.comments-title,
.comment-reply-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}

.comment-reply-title small a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-left: 12px;
}

.comment-notes,
.logged-in-as {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.comment-form p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.comment-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-body);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  transition: var(--transition);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.comment-form-cookies-consent {
  flex-direction: row !important;
  align-items: center;
  gap: 12px !important;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.comment-form-cookies-consent label {
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
}

.form-submit {
  margin-top: 12px !important;
}

.comment-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  align-self: flex-start;
}

.comment-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.comment-list .comment {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.comment-list .comment:last-child {
  border-bottom: none;
}

.comment-body {
  display: flex;
  gap: 20px;
}

.comment-author .avatar {
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  width: 50px;
  height: 50px;
}

.comment-meta-wrap {
  flex: 1;
}

.comment-meta {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-meta .fn {
  font-weight: 700;
  font-size: 1.1rem;
  font-style: normal;
}

.comment-meta time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-content {
  color: var(--text);
  line-height: 1.6;
}

.comment-content p {
  margin-bottom: 12px;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.reply {
  margin-top: 12px;
}

.comment-reply-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-reply-link::before {
  content: "↳";
}

.comment-list .children {
  list-style: none;
  padding-left: 40px;
  margin-top: 32px;
  border-left: 2px solid var(--border);
}

@media (max-width: 600px) {
  .comment-list .children {
    padding-left: 20px;
  }
  .comment-body {
    flex-direction: column;
    gap: 12px;
  }
}
