/*
Theme Name: Berita
Theme URI: https://example.com/berita
Author: Berita Team
Author URI: https://example.com
Description: Template WordPress berita yang ringan, responsif, dan siap AdSense. Optimasi Core Web Vitals dengan struktur semantik dan Schema.org NewsArticle.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: berita
Tags: news, blog, adsense-ready, responsive, seo-friendly, fast-loading
*/


/* =============================
   CSS VARIABLES & RESET
   ============================= */
:root {
  --color-primary: #4F46E5;
  --color-primary-hover: #4338CA;
  --color-dark: #0F172A;
  --color-text: #334155;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-bg: #F8FAFC;
  --color-bg-alt: #FFFFFF;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --max-width: 1200px;
  --content-width: 760px;
  --sidebar-width: 320px;
  --gap: 32px;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  word-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =============================
   LAYOUT
   ============================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--gap);
  }
}

/* Support hidden attribute cross-browser */
[hidden] {
  display: none !important;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  padding: var(--gap) 0;
}

.content-area {
  width: 100%;
}

.has-sidebar .content-area {
  max-width: var(--content-width);
}

.sidebar {
  width: 100%;
  margin-top: var(--gap);
}

@media (min-width: 1024px) {
  .site-main {
    display: flex;
    gap: var(--gap);
    justify-content: space-between;
  }

  .has-sidebar .content-area {
    flex: 1;
    max-width: calc(var(--max-width) - var(--sidebar-width) - var(--gap));
  }

  .sidebar {
    width: var(--sidebar-width);
    margin-top: 0;
  }
}

/* =============================
   TOP BAR
   ============================= */
.top-bar {
  background: linear-gradient(135deg, var(--color-dark) 0%, #1E293B 100%);
  color: #fff;
  font-size: 0.8125rem;
  overflow: hidden;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 36px;
}

.top-bar-date {
  display: none;
  white-space: nowrap;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .top-bar-date {
    display: block;
  }
}

.breaking-news {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.breaking-label {
  display: inline-block;
  background: linear-gradient(135deg, #4F46E5 0%, #EC4899 100%);
  box-shadow: 0 2px 4px rgba(236,72,153,0.3);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.breaking-ticker {
  flex: 1;
  height: 22px;
  overflow: hidden;
  position: relative;
}

.breaking-list {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
  transition: transform 0.5s ease;
}

.breaking-list li {
  height: 22px;
  display: block;
  align-items: center;
  list-style: none !important;
}

.breaking-list a {
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.breaking-list a:hover {
  color: #fff;
  text-decoration: underline;
}

/* =============================
   HEADER
   ============================= */
.site-header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  transition: height 0.25s ease;
}

.site-header.is-scrolled .header-inner {
  height: 52px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-branding .custom-logo {
  max-height: 40px;
  width: auto;
  transition: max-height 0.25s ease;
}

.site-header.is-scrolled .site-branding .custom-logo {
  max-height: 32px;
}

.site-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-dark);
  transition: font-size 0.25s ease;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .site-title {
    font-size: 1.5rem;
    max-width: none;
  }
}

.site-header.is-scrolled .site-title {
  font-size: 1.25rem;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-description {
  display: none;
  font-size: 0.875rem;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .site-description {
    display: block;
  }
}

/* =============================
   HEADER TOOLS
   ============================= */
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-toggle,
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-dark);
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.search-toggle:hover,
.menu-toggle:hover {
  background: var(--color-bg-alt);
}

.search-toggle svg,
.menu-toggle span {
  display: block;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-dark);
  margin: 3px 0;
  transition: 0.3s;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* =============================
   SEARCH OVERLAY
   ============================= */
.search-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.search-overlay .container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-overlay .search-form {
  flex: 1;
  margin-bottom: 0;
}

.search-overlay .search-form input[type="search"] {
  font-size: 1.125rem;
  padding: 14px 18px;
}

.search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  flex-shrink: 0;
}

.search-close:hover {
  color: var(--color-dark);
}

/* =============================
   NAVIGATION
   ============================= */
.main-navigation {
  display: none;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

.main-navigation a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-dark);
  padding: 8px 0;
  display: block;
  position: relative;
}

.main-navigation a::after {
  content: \'\';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary), #EC4899);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.main-navigation .menu-setup-link {
  color: var(--color-primary) !important;
  border: 1px dashed var(--color-primary);
  padding: 4px 12px !important;
  border-radius: 4px;
  font-size: 0.8125rem !important;
}

.main-navigation .menu-setup-link::after {
  display: none !important;
}

.main-navigation .menu-setup-link:hover {
  background: var(--color-primary);
  color: #fff !important;
}

.main-navigation a:hover::after {
  width: 100%;
}

.main-navigation.toggled {
  display: block;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 16px var(--gap);
}

.main-navigation.toggled ul {
  flex-direction: column;
  gap: 0;
}

.main-navigation.toggled a {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.main-navigation.toggled a::after {
  display: none;
}

@media (min-width: 768px) {
  .main-navigation {
    display: block;
  }

  .main-navigation.toggled {
    position: static;
    background: transparent;
    border: none;
    padding: 0;
  }

  .main-navigation.toggled ul {
    flex-direction: row;
    gap: 28px;
  }

  .main-navigation.toggled a {
    border-bottom: none;
    padding: 8px 0;
  }

  .main-navigation.toggled a::after {
    display: block;
  }
}

/* =============================
   TRENDING BAR
   ============================= */
.trending-bar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  display: none;
}

@media (min-width: 768px) {
  .trending-bar {
    display: block;
  }
}

.trending-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  overflow: hidden;
}

.trending-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  flex-shrink: 0;
}

.trending-tags {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.trending-tags::-webkit-scrollbar {
  display: none;
}

.trending-tag {
  font-size: 0.8125rem;
  color: var(--color-muted);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}

.trending-tag:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* =============================
   AD SLOTS
   ============================= */
.ad-slot {
  text-align: center;
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  color: var(--color-muted);
  font-size: 0.75rem;
  padding: 8px;
}

.ad-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.ad-slot-header {
  margin: 16px 0;
}

.ad-slot-inarticle {
  margin: 24px 0;
}

.ad-slot-sidebar {
  margin-bottom: var(--gap);
  min-height: 250px;
}

.ad-slot-sidebar-footer {
  margin-bottom: var(--gap);
  min-height: 250px;
}

.ad-slot-footer {
  margin: 24px 0;
}

/* =============================
   HOMEPAGE / ARCHIVE
   ============================= */
.page-header {
  margin-bottom: var(--gap);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-dark);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
}

.posts-grid {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-card .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card .post-body {
  padding: 16px;
}

.post-card .post-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.post-card .post-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.post-card .post-title a {
  color: inherit;
}

.post-card .post-meta {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.post-card .post-excerpt {
  font-size: 0.9375rem;
  color: var(--color-text);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================
   SINGLE POST (MAGAZINE)
   ============================= */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 1001;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-primary), #4285f4);
  transition: width 0.1s linear;
}

/* Single content area override (full-width, no sidebar) */
.single-content-area {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Hero with featured image background */
.single-hero {
  position: relative;
  margin-bottom: 40px;
  background: var(--color-dark);
  overflow: hidden;
}

.single-hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.single-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 25, 55, 0.35) 0%, rgba(10, 25, 55, 0.7) 55%, rgba(8, 18, 40, 0.92) 100%),
    linear-gradient(135deg, rgba(26, 115, 232, 0.25) 0%, rgba(26, 115, 232, 0) 60%);
}

.single-hero-content {
  position: relative;
  z-index: 2;
  padding: 80px var(--gap) 48px;
  color: #fff;
  max-width: 860px;
}

@media (min-width: 768px) {
  .single-hero-content {
    padding: 140px var(--gap) 64px;
  }
}

.single-hero-content .breadcrumb {
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
  font-size: 0.8125rem;
}

.single-hero-content .breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.single-hero-content .breadcrumb a:hover {
  text-decoration: underline;
}

.single-hero-category {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-bottom: 16px;
}

.single-hero-category:hover {
  background: #1557b0;
  color: #fff;
}

.single-hero-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 16px;
}

@media (min-width: 768px) {
  .single-hero-title {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .single-hero-title {
    font-size: 3rem;
  }
}

.single-hero-excerpt {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  margin: 0 0 24px;
  max-width: 720px;
}

.single-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
}

.single-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.single-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}

.single-author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.single-author-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
}

.single-author-name a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.single-author-name a:hover {
  text-decoration: underline;
}

.single-meta-divider {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.3);
}

.single-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.single-meta-item svg {
  opacity: 0.85;
}

/* Plain header (no thumbnail) */
.entry-header-plain {
  padding-top: 32px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.entry-header-plain .breadcrumb {
  margin-bottom: 16px;
}

.entry-category-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-bottom: 12px;
}

.entry-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 16px 0;
}

/* Single body grid: share rail + content */
.single-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gap) 40px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 1024px) {
  .single-body {
    grid-template-columns: 60px 1fr;
    gap: 40px;
  }
}

/* Share rail (sticky vertical, desktop only) */
.share-rail {
  display: none;
}

@media (min-width: 1024px) {
  .share-rail {
    display: block;
    position: sticky;
    top: 100px;
    align-self: start;
    height: fit-content;
  }
}

.share-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 0;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn.share-facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.share-twitter:hover  { background: #000; color: #fff; border-color: #000; }
.share-btn.share-whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.share-telegram:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.share-btn.share-copy:hover     { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.share-btn.share-copy.copied    { background: #16a34a; color: #fff; border-color: #16a34a; }

/* Inline share at bottom */
.share-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0;
  margin: 32px 0 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.share-inline-label {
  font-weight: 600;
  color: var(--color-dark);
  font-size: 0.9375rem;
}

/* Entry content (article body) */
.single-entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text);
  max-width: 720px;
}

@media (min-width: 768px) {
  .single-entry-content {
    font-size: 1.125rem;
  }
}

/* Drop cap on first paragraph */
.single-entry-content > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  float: left;
  font-size: 4rem;
  line-height: 0.9;
  font-weight: 800;
  color: var(--color-primary);
  margin: 6px 12px 0 0;
}

.single-entry-content h2,
.single-entry-content h3,
.single-entry-content h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.single-entry-content h2 { font-size: 1.625rem; }
.single-entry-content h3 { font-size: 1.375rem; }
.single-entry-content h4 { font-size: 1.125rem; }

.single-entry-content p {
  margin-bottom: 24px;
}

.single-entry-content img,
.single-entry-content figure {
  border-radius: var(--radius);
  margin: 32px 0;
  max-width: 100%;
  height: auto;
}

.single-entry-content figure img {
  margin: 0;
}

.single-entry-content figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.single-entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--color-dark);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.single-entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-entry-content ul,
.single-entry-content ol {
  margin: 0 0 24px 24px;
}

.single-entry-content li {
  margin-bottom: 8px;
}

.single-entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-entry-content a:hover {
  text-decoration-thickness: 2px;
}

.single-entry-content code {
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--color-border);
}

.single-entry-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
}

.single-entry-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* Tags below content */
.post-tags {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-tags-label {
  font-weight: 600;
  color: var(--color-dark);
  margin-right: 4px;
}

.post-tags a {
  display: inline-block;
  font-size: 0.8125rem;
  padding: 5px 12px;
  background: var(--color-bg-alt);
  border-radius: 20px;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
}

.post-tags a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Author Box */
.author-box {
  max-width: 1100px;
  margin: 40px auto;
  padding: 28px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  text-align: center;
}

@media (min-width: 600px) {
  .author-box {
    grid-template-columns: auto 1fr;
    text-align: left;
    gap: 24px;
  }
}

.author-box {
  margin-left: var(--gap);
  margin-right: var(--gap);
}

@media (min-width: 1132px) {
  .author-box {
    margin-left: auto;
    margin-right: auto;
  }
}

.author-box-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
}

.author-box-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.author-box-name {
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.author-box-name a {
  color: var(--color-dark);
  text-decoration: none;
}

.author-box-name a:hover {
  color: var(--color-primary);
}

.author-box-bio {
  margin: 0 0 12px;
  color: var(--color-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.author-box-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.author-box-link:hover {
  text-decoration: underline;
}

/* Related Posts */
.related-posts {
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 0 var(--gap);
}

.related-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.related-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-card {
  display: block;
  text-decoration: none;
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.related-thumb {
  overflow: hidden;
}

.related-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-thumb img {
  transform: scale(1.05);
}

.related-thumb-placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
}

.related-body {
  padding: 16px;
}

.related-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.related-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-dark);
  margin: 0 0 8px;
}

.related-card:hover .related-card-title {
  color: var(--color-primary);
}

.related-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* Single post navigation */
.single-post-magazine + .post-navigation,
.single-post .post-navigation {
  max-width: 1100px;
  margin: 40px auto 60px;
  padding: 0 var(--gap);
}

/* Stub kept for backward compat; full styles re-defined above */
.single-post .entry-header {
  margin-bottom: 0;
}

.single-post .entry-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-dark);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .single-post .entry-title {
    font-size: 2.5rem;
  }
}

.single-post .entry-meta {
  font-size: 0.875rem;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.single-post .entry-meta .author-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.single-post .post-thumbnail {
  margin-bottom: 24px;
}

.single-post .post-thumbnail img {
  width: 100%;
  border-radius: var(--radius);
}

.single-post .entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin: 32px 0 16px;
}

.single-post .entry-content p {
  margin-bottom: 20px;
}

.single-post .entry-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

.single-post .entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--color-muted);
}

.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 0 0 20px 24px;
}

.single-post .entry-content a {
  text-decoration: underline;
}

/* =============================
   TAGS / CATEGORIES
   ============================= */
.post-tags {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.post-tags a {
  display: inline-block;
  font-size: 0.8125rem;
  padding: 6px 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin: 0 8px 8px 0;
  color: var(--color-text);
}

.post-tags a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  text-decoration: none;
}

/* =============================
   POST NAVIGATION
   ============================= */
.post-navigation {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .post-navigation .nav-links {
    grid-template-columns: 1fr 1fr;
  }
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  padding: 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

.post-navigation .nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.post-navigation .nav-title {
  font-weight: 600;
  color: var(--color-dark);
}

/* =============================
   COMMENTS
   ============================= */
.comments-area {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--color-dark);
}

.comments-title {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.comment-list {
  list-style: none;
}

.comment {
  margin-bottom: 24px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-metadata {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.comment-content {
  padding-left: 52px;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.comment-form .form-submit input {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
}

.comment-form .form-submit input:hover {
  background: #1557b0;
}

/* =============================
   SIDEBAR WIDGETS
   ============================= */
.widget {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: var(--gap);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-dark);
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.widget li:last-child {
  border-bottom: none;
}

/* =============================
   PAGINATION
   ============================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination a,
.pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* =============================
   BREADCRUMB
   ============================= */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--color-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  margin: 0 8px;
}

/* =============================
   SIDEBAR
   ============================= */
.sidebar {
  width: 100%;
  margin-top: var(--gap);
}

@media (min-width: 1024px) {
  .sidebar {
    width: var(--sidebar-width);
    margin-top: 0;
    flex-shrink: 0;
  }

  .sidebar-sticky {
    position: sticky;
    top: 76px;
  }
}

.sidebar-ad-top,
.sidebar-ad-bottom {
  margin-bottom: var(--gap);
}

.sidebar-widgets .widget {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: var(--gap);
  transition: box-shadow 0.2s ease;
}

.sidebar-widgets .widget:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sidebar-widgets .widget-title {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-dark);
  position: relative;
}

.sidebar-widgets .widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--color-primary);
}

/* Sidebar lists (Recent Posts, Categories, Archives) */
.sidebar-widgets .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-widgets .widget ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
  transition: all 0.15s ease;
}

.sidebar-widgets .widget ul li:last-child {
  border-bottom: none;
}

.sidebar-widgets .widget ul li a {
  color: var(--color-text);
  text-decoration: none;
  display: block;
}

.sidebar-widgets .widget ul li a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.sidebar-widgets .widget ul li .post-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 2px;
}

/* Sidebar tag cloud */
.tagcloud a,
.wp-block-tag-cloud a {
  display: inline-block;
  font-size: 0.8125rem !important;
  padding: 6px 12px;
  margin: 4px 4px 4px 0;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.15s ease;
}

.tagcloud a:hover,
.wp-block-tag-cloud a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Sidebar search widget */
.sidebar-widgets .search-form {
  margin-bottom: 0;
}

.sidebar-widgets .search-form input[type="search"] {
  font-size: 0.9375rem;
}

/* Sidebar calendar */
.sidebar-widgets .wp-calendar-table {
  width: 100%;
  font-size: 0.875rem;
  text-align: center;
}

.sidebar-widgets .wp-calendar-table caption {
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar-widgets .wp-calendar-table th,
.sidebar-widgets .wp-calendar-table td {
  padding: 6px;
}

.sidebar-widgets .wp-calendar-table td a {
  font-weight: 600;
  color: var(--color-primary);
}

/* =============================
   SEARCH
   ============================= */
.search-form {
  display: flex;
  gap: 0;
  margin-bottom: var(--gap);
}

.search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem;
}

.search-form button {
  padding: 10px 18px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
}

/* =============================
   FOOTER
   ============================= */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-widgets {
  display: grid;
  gap: var(--gap);
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .footer-widgets {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-widget {
  font-size: 0.9375rem;
}

.footer-widget .widget-title {
  border-bottom-color: var(--color-border);
  text-transform: none;
}

.site-info {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* =============================
   404 / NO RESULTS
   ============================= */
.error-404,
.no-results {
  text-align: center;
  padding: 64px 0;
}

.error-404 .page-title,
.no-results .page-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

/* =============================
   ACCESSIBILITY
   ============================= */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-dark);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* =============================
   HOMEPAGE HERO
   ============================= */
.hero-post {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: calc(var(--gap) * 1.5);
  background: var(--color-dark);
}

.hero-thumbnail {
  display: block;
  position: relative;
}

.hero-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(32,33,36,0.85) 0%, rgba(32,33,36,0.3) 50%, rgba(32,33,36,0.1) 100%);
}

.hero-thumbnail img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.hero-post:hover .hero-thumbnail img {
  transform: scale(1.03);
}

/* Hero without featured image */
.hero-thumbnail-placeholder {
  aspect-ratio: 21 / 9;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-thumbnail-placeholder::after {
  display: none;
}

.hero-placeholder-icon {
  color: rgba(255,255,255,0.5);
}

.hero-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  color: #fff;
}

.hero-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-primary);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero-title a {
  color: #fff;
  text-decoration: none;
}

.hero-title a:hover {
  text-decoration: underline;
}

.hero-meta {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 12px;
}

.hero-meta .sep {
  margin: 0 8px;
}

.hero-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-excerpt {
    max-width: 70%;
    -webkit-line-clamp: 3;
  }
}

/* =============================
   SECTION HEADING
   ============================= */
.section-heading-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-dark);
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
}

.section-more:hover {
  text-decoration: underline;
}

/* =============================
   POSTS GRID (REDESIGN)
   ============================= */
.posts-grid {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.post-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.post-card .post-thumbnail {
  display: block;
  overflow: hidden;
}

.post-card .post-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

/* Post card placeholder when no featured image */
.post-thumbnail-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-placeholder-icon {
  color: var(--color-muted);
  opacity: 0.5;
}

.post-card .post-body {
  padding: 20px;
}

.post-card .post-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.post-card .post-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--color-dark);
}

.post-card .post-title a {
  color: inherit;
  text-decoration: none;
}

.post-card .post-title a:hover {
  color: var(--color-primary);
}

.post-card .post-meta {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.post-card .post-meta .sep {
  margin: 0 6px;
}

.post-card .post-excerpt {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================
   FEATURED SECTION (Hero + Secondary)
   ============================= */
.featured-section {
  display: grid;
  gap: var(--gap);
  margin-bottom: calc(var(--gap) * 1.5);
}

@media (min-width: 768px) {
  .featured-section {
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
  }

  .featured-section .hero-post {
    margin-bottom: 0;
  }
}

.featured-secondary {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 768px) {
  .featured-secondary {
    grid-template-columns: 1fr;
  }
}

.secondary-post {
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.secondary-post:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.secondary-thumb {
  display: block;
  overflow: hidden;
}

.secondary-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.secondary-post:hover .secondary-thumb img {
  transform: scale(1.05);
}

.secondary-body {
  padding: 14px;
  flex: 1;
}

.secondary-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.secondary-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.secondary-title a {
  color: var(--color-dark);
  text-decoration: none;
}

.secondary-title a:hover {
  color: var(--color-primary);
}

.secondary-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* Hero adjustments inside featured-section */
.featured-section .hero-thumbnail img,
.featured-section .hero-thumbnail-placeholder {
  aspect-ratio: 16 / 10;
}

@media (min-width: 768px) {
  .featured-section .hero-body {
    padding: 24px;
  }

  .featured-section .hero-title {
    font-size: 1.625rem;
  }
}

/* =============================
   POSTS LIST (Homepage)
   ============================= */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.post-list-item {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  padding-bottom: var(--gap);
  border-bottom: 1px solid var(--color-border);
}

.post-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

@media (min-width: 600px) {
  .post-list-item {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }
}

.post-list-thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
}

.post-list-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-list-item:hover .post-list-thumb img {
  transform: scale(1.04);
}

.post-list-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-list-body .post-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 8px;
  text-decoration: none;
  align-self: flex-start;
}

.post-list-body .post-category:hover {
  text-decoration: underline;
}

.post-list-body .post-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.post-list-body .post-title a {
  color: var(--color-dark);
  text-decoration: none;
}

.post-list-body .post-title a:hover {
  color: var(--color-primary);
}

.post-list-body .post-excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-list-body .post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.post-list-body .post-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--color-text);
}

.post-list-body .post-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

/* =============================
   NEWSLETTER CTA
   ============================= */
.newsletter-cta {
  margin-top: calc(var(--gap) * 1.5);
  padding: 32px 24px;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  border-radius: var(--radius);
  color: #fff;
  text-align: center;
}

.newsletter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  margin-bottom: 16px;
  color: #fff;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.newsletter-subtitle {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .newsletter-cta {
    padding: 40px 32px;
  }

  .newsletter-title {
    font-size: 1.625rem;
  }
}

/* =============================
   CATEGORY SECTION
   ============================= */
.category-section {
  margin-top: calc(var(--gap) * 1.5);
}

.category-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.category-card:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(26,115,232,0.25);
}

.category-card:hover .category-name,
.category-card:hover .category-count {
  color: #fff;
}

.category-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.category-count {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* =============================
   PAGINATION (REDESIGN)
   ============================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.pagination a:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  font-weight: 600;
}

/* =============================
   NO RESULTS / GETTING STARTED
   ============================= */
.no-results {
  text-align: center;
  padding: 64px 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
}

.no-results .page-title {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.no-results p {
  color: var(--color-muted);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.getting-started-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #1557b0;
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-dark);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}

/* =============================
   PRINT STYLES
   ============================= */
@media print {
  .site-header,
  .sidebar,
  .ad-slot,
  .comments-area,
  .post-navigation,
  .site-footer {
    display: none !important;
  }

  .entry-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.875rem;
    color: var(--color-muted);
  }
}

/* =============================
   PREMIUM AESTHETICS & ANIMATIONS
   ============================= */
h1, h2, h3, h4, h5, h6, .site-title, .page-title, .post-title, .hero-title, .secondary-title, .section-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.section-heading-wrap {
  border-bottom: 2px solid var(--color-border);
  position: relative;
  margin-bottom: var(--gap);
}

.section-heading {
  display: inline-block;
  padding-bottom: 12px;
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #4F46E5, #EC4899);
  border-radius: 3px;
}

.hero-thumbnail img, .secondary-thumb img, .post-list-thumb img, .post-thumbnail img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-post:hover .hero-thumbnail img, 
.secondary-post:hover .secondary-thumb img, 
.post-list-item:hover .post-list-thumb img,
.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.hero-post, .secondary-post, .post-list-item {
  border: 1px solid var(--glass-border);
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-post:hover, .secondary-post:hover, .post-list-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-body, .secondary-body, .post-list-body {
  padding: 24px;
}

/* Gradients on categories */
.hero-category, .secondary-category, .post-category {
  background: linear-gradient(135deg, rgba(79,70,229,0.1) 0%, rgba(236,72,153,0.1) 100%);
  color: #4F46E5;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-block;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.hero-category:hover, .secondary-category:hover, .post-category:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #EC4899 100%);
  color: #fff;
  text-decoration: none;
}

.btn-primary, .button, input[type="submit"] {
  background: linear-gradient(135deg, var(--color-primary) 0%, #4338CA 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
  transition: all 0.3s ease;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
}

.btn-primary:hover, .button:hover, input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
}

/* Animations */
@keyframes fadeInSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-card, .hero-post, .secondary-post, .post-list-item {
  animation: fadeInSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.post-card:nth-child(1), .secondary-post:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2), .secondary-post:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3), .post-list-item:nth-child(1) { animation-delay: 0.3s; }
.post-card:nth-child(4), .post-list-item:nth-child(2) { animation-delay: 0.4s; }
.post-card:nth-child(5), .post-list-item:nth-child(3) { animation-delay: 0.5s; }

/* Newsletter CTA Premium */
.newsletter-cta {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 48px 0;
}

.newsletter-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.newsletter-icon {
  color: #EC4899;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* ============================================================
   HOMEPAGE PREMIUM REDESIGN
   ============================================================ */

/* ── Topline Intro ─────────────────────────────────────────── */
.hp-topline {
  margin: 10px 0 24px;
  border: 1px solid rgba(79,70,229,0.14);
  border-radius: 18px;
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(79,70,229,0.12) 0%, transparent 52%),
    radial-gradient(120% 140% at 100% 0%, rgba(236,72,153,0.11) 0%, transparent 58%),
    linear-gradient(135deg, #FFFFFF 0%, #F8FAFF 100%);
  box-shadow: 0 12px 28px rgba(15,23,42,0.06);
  padding: 22px;
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .hp-topline {
    padding: 28px 32px;
  }
}

.hp-topline-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(79,70,229,0.1);
  color: #4338CA;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.hp-topline-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #0F172A;
}

.hp-topline-sub {
  margin: 10px 0 0;
  color: #475569;
  line-height: 1.6;
  font-size: 0.9rem;
}

.hp-topline-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hp-stat-item {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.78);
  padding: 12px 10px;
  text-align: center;
}

.hp-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.2;
}

.hp-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Breaking Strip ────────────────────────────────────────── */
.hp-breaking-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 24px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-alt);
  padding: 8px 10px;
  overflow: hidden;
}

.hp-breaking-label {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #EF4444, #F97316);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.hp-breaking-track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
}

.hp-breaking-link {
  flex-shrink: 0;
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--color-text);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.hp-breaking-link:hover {
  border-color: rgba(79,70,229,0.25);
  background: rgba(79,70,229,0.06);
  color: #4338CA;
  text-decoration: none;
}

/* ── Section Heading ───────────────────────────────────────── */
.hp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 48px 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}

.hp-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.03em;
}

.hp-title-bar {
  display: inline-block;
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, #4F46E5, #EC4899);
  flex-shrink: 0;
}

.hp-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: gap 0.2s ease;
  white-space: nowrap;
}

.hp-view-all:hover {
  gap: 10px;
  text-decoration: none;
}

/* ── Editor Picks ──────────────────────────────────────────── */
.hp-editor-section {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #F9FAFB 100%);
}

.hp-editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hp-editor-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.hp-editor-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.hp-editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 860px) {
  .hp-editor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hp-editor-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  align-items: stretch;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hp-editor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hp-editor-thumb {
  border-radius: 10px;
  overflow: hidden;
  display: block;
  background: var(--color-bg);
}

.hp-editor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hp-editor-placeholder {
  width: 100%;
  height: 100%;
  min-height: 90px;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
}

.hp-editor-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hp-editor-card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.hp-editor-card-title a {
  color: var(--color-dark);
  text-decoration: none;
}

.hp-editor-card-title a:hover {
  color: var(--color-primary);
}

.hp-editor-excerpt {
  margin: 8px 0 10px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-editor-meta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--color-muted);
}

@media (max-width: 520px) {
  .hp-topline-stats {
    grid-template-columns: 1fr;
  }

  .hp-editor-card {
    grid-template-columns: 1fr;
  }
}

/* ── Common Utilities ──────────────────────────────────────── */
.hp-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-muted);
  opacity: 0.6;
  flex-shrink: 0;
}

.hp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.hp-badge:hover { opacity: 0.85; text-decoration: none; }

.hp-badge-hot {
  background: linear-gradient(135deg, #EF4444, #F97316);
}

.hp-cat-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(79, 70, 229, 0.08);
  color: #4F46E5;
  text-decoration: none;
  margin-bottom: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hp-cat-pill:hover {
  background: #4F46E5;
  color: #fff;
  text-decoration: none;
}

.hp-read-time,
.hp-read-time-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Hero Section ──────────────────────────────────────────── */
.hp-hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .hp-hero-section {
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .hp-hero-section {
    grid-template-columns: 1fr 380px;
    gap: 28px;
  }
}

/* Hero Post Card */
.hp-hero-post {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-dark);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .hp-hero-post {
    min-height: 480px;
  }
}

.hp-hero-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
}

.hp-hero-media {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
}

.hp-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-hero-post:hover .hp-hero-media img {
  transform: scale(1.06);
}

.hp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 15, 40, 0.95) 0%,
    rgba(8, 15, 40, 0.65) 45%,
    rgba(8, 15, 40, 0.15) 100%
  );
}

.hp-hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  color: rgba(255,255,255,0.15);
}

.hp-hero-body {
  position: relative;
  z-index: 2;
  padding: 28px 28px 32px;
  color: #fff;
}

.hp-hero-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hp-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.hp-hero-title a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.hp-hero-title a:hover { opacity: 0.85; }

.hp-hero-excerpt {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-hero-meta-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.75);
}

.hp-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hp-author img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: cover;
}

/* ── Hero Aside Cards ──────────────────────────────────────── */
.hp-hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hp-aside-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.hp-aside-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hp-aside-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  background: var(--color-bg-alt);
}

.hp-aside-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.hp-aside-card:hover .hp-aside-thumb img {
  transform: scale(1.08);
}

.hp-aside-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
  color: #94A3B8;
}

.hp-aside-body {
  flex: 1;
  min-width: 0;
}

.hp-aside-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-dark);
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-aside-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.hp-aside-title a:hover { color: var(--color-primary); }

.hp-aside-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-muted);
  flex-wrap: wrap;
}

/* ── Category Cards Grid ───────────────────────────────────── */
.hp-cats-section {
  margin-bottom: 0;
}

.hp-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .hp-cats-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.hp-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px;
  border-radius: 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  text-decoration: none;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hp-cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,70,229,0.04), rgba(236,72,153,0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hp-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79,70,229,0.2);
  text-decoration: none;
}

.hp-cat-card:hover::before { opacity: 1; }

.hp-cat-icon {
  font-size: 1.75rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.hp-cat-card:hover .hp-cat-icon { transform: scale(1.15); }

.hp-cat-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-dark);
  text-transform: capitalize;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hp-cat-count {
  font-size: 0.6875rem;
  color: var(--color-muted);
}

/* ── Post Card Grid ────────────────────────────────────────── */
.hp-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .hp-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hp-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hp-post-card {
  background: var(--color-bg-alt);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  animation: hpFadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.hp-post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.1);
}

.hp-posts-grid .hp-post-card:nth-child(1) { animation-delay: 0.05s; }
.hp-posts-grid .hp-post-card:nth-child(2) { animation-delay: 0.12s; }
.hp-posts-grid .hp-post-card:nth-child(3) { animation-delay: 0.19s; }
.hp-posts-grid .hp-post-card:nth-child(4) { animation-delay: 0.26s; }
.hp-posts-grid .hp-post-card:nth-child(5) { animation-delay: 0.33s; }
.hp-posts-grid .hp-post-card:nth-child(6) { animation-delay: 0.40s; }

@keyframes hpFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-card-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-bg);
  position: relative;
}

.hp-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-post-card:hover .hp-card-thumb img { transform: scale(1.06); }

.hp-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.15), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hp-post-card:hover .hp-card-thumb-overlay { opacity: 1; }

.hp-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
  color: #94A3B8;
}

.hp-card-body {
  padding: 20px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hp-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-dark);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.hp-card-title a:hover { color: var(--color-primary); }

.hp-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.hp-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.hp-card-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-card-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

/* ── Pagination ────────────────────────────────────────────── */
.hp-pagination {
  margin: 48px 0 0;
}

.hp-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all 0.2s ease;
}

.hp-pagination .page-numbers:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  text-decoration: none;
}

.hp-pagination .page-numbers.current {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* ── Newsletter CTA ────────────────────────────────────────── */
.hp-newsletter {
  margin: 56px 0 32px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  padding: 56px 32px;
  text-align: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  box-shadow: 0 24px 48px rgba(15,23,42,0.2);
}

.hp-newsletter-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(79,70,229,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 50%, rgba(236,72,153,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hp-newsletter-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
}

.hp-newsletter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #a78bfa;
  margin: 0 auto 24px;
  animation: float 3s ease-in-out infinite;
}

.hp-newsletter-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.hp-newsletter-sub {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin: 0 0 32px;
}

.hp-newsletter-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79,70,229,0.45);
  text-decoration: none;
  color: #fff;
}

.hp-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.25s ease;
  background: rgba(255,255,255,0.05);
}

.hp-btn-outline:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   HOMEPAGE — MODERN REFRESH (overrides for a sleeker look)
   ============================================================ */

/* Topline: glassmorphism + animated aurora */
.hp-topline {
  position: relative;
  margin: 16px 0 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.85), rgba(248,250,255,0.7));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 18px 48px rgba(15, 23, 42, 0.10);
  padding: 28px;
  overflow: hidden;
}

.hp-topline::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 320px;
  background:
    radial-gradient(closest-side at 20% 40%, rgba(99, 102, 241, 0.28), transparent 70%),
    radial-gradient(closest-side at 80% 30%, rgba(236, 72, 153, 0.22), transparent 70%);
  filter: blur(8px);
  opacity: 0.9;
  pointer-events: none;
  animation: hpAurora 14s ease-in-out infinite alternate;
}

@keyframes hpAurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, 24px, 0) scale(1.08); }
}

.hp-topline > * { position: relative; z-index: 1; }

.hp-topline-kicker {
  background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(236,72,153,0.16));
  color: #4338CA;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}

.hp-topline-title {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  background: linear-gradient(120deg, #0F172A 0%, #312E81 55%, #6D28D9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hp-stat-item {
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hp-stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15,23,42,0.10);
}

.hp-stat-value {
  background: linear-gradient(135deg, #4F46E5, #EC4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Breaking strip: live dot + smoother pills */
.hp-breaking-strip {
  border-color: rgba(148,163,184,0.2);
  background: linear-gradient(90deg, rgba(239,68,68,0.06), rgba(255,255,255,0.6) 30%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hp-breaking-label {
  position: relative;
  padding-left: 26px;
}

.hp-breaking-label::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.8);
  animation: hpPulse 1.6s infinite;
}

@keyframes hpPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Hero: deeper cinematic gradient + glass meta */
.hp-hero-post {
  border-radius: 26px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.hp-hero-overlay {
  background: linear-gradient(
    to top,
    rgba(2, 6, 23, 0.96) 0%,
    rgba(2, 6, 23, 0.72) 38%,
    rgba(2, 6, 23, 0.20) 72%,
    rgba(2, 6, 23, 0.05) 100%
  );
}

.hp-hero-title {
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  letter-spacing: -0.035em;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

.hp-hero-meta-bottom {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
}

/* Hero CTA button */
.hp-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  box-shadow: 0 10px 24px rgba(79,70,229,0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, gap 0.25s ease;
}

.hp-hero-cta svg {
  transition: transform 0.25s ease;
}

.hp-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(79,70,229,0.5);
  color: #fff;
  text-decoration: none;
  gap: 12px;
}

.hp-hero-cta:hover svg { transform: translateX(2px); }

/* Aside cards: cleaner, modern radius */
.hp-aside-card {
  border-radius: 18px;
  border-color: rgba(148,163,184,0.18);
}

.hp-aside-card:hover {
  border-color: rgba(99,102,241,0.28);
}

/* Category cards: soft tinted surface */
.hp-cat-card {
  border-radius: 18px;
  border-color: rgba(148,163,184,0.18);
}

.hp-cat-card:hover .hp-cat-icon { transform: scale(1.2) rotate(-4deg); }

/* Featured categories section */
.hp-featured-cats {
  margin: 48px 0 24px;
}

.hp-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .hp-featured-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hp-featured-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.hp-featured-cat::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hp-featured-cat:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.hp-featured-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.hp-featured-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hp-featured-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.2;
}

.hp-featured-count {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 3px;
}

/* Post cards: modern radius, gradient hairline on hover */
.hp-post-card {
  border-radius: 20px;
  border-color: rgba(148,163,184,0.18);
  position: relative;
}

.hp-post-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.6), rgba(236,72,153,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hp-post-card:hover::after { opacity: 1; }

.hp-card-thumb { aspect-ratio: 16 / 10; }

.hp-cat-pill {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(236,72,153,0.12));
}

/* Editor section: modern surface */
.hp-editor-section {
  border-radius: 22px;
  border-color: rgba(148,163,184,0.18);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(236,72,153,0.06), transparent 55%),
    linear-gradient(180deg, #fff 0%, #F8FAFF 100%);
}

.hp-editor-card { border-radius: 16px; border-color: rgba(148,163,184,0.18); }

/* Section heading: gradient accent bar */
.hp-title-bar {
  width: 6px;
  height: 26px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

/* Newsletter: richer aurora */
.hp-newsletter {
  border-radius: 28px;
}

.hp-newsletter-bg {
  background:
    radial-gradient(ellipse 60% 60% at 18% 40%, rgba(99,102,241,0.32) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 82% 60%, rgba(236,72,153,0.24) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 0%, rgba(56,189,248,0.14) 0%, transparent 60%);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hp-topline::before,
  .hp-breaking-label::before,
  .hp-newsletter-icon { animation: none !important; }
}

/* ── Empty State ───────────────────────────────────────────── */
.hp-empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--color-muted);
}

.hp-empty-icon {
  margin: 0 auto 24px;
  color: var(--color-border);
}

.hp-empty-state h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.hp-empty-state p { max-width: 400px; margin: 0 auto 28px; }

.hp-empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Override old homepage classes (if any remaining) ──────── */
.featured-section, .posts-list, .section-heading-wrap, .newsletter-cta { display: none !important; }

/* ============================================================
   SINGLE POST – PREMIUM REDESIGN (sp-*)
   ============================================================ */

/* Reading Progress Bar */
.sp-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 9999; pointer-events: none;
  background: transparent;
}
.sp-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #4F46E5, #EC4899);
  transition: width 0.1s linear;
  border-radius: 0 3px 3px 0;
}

/* ── HERO ─────────────────────────────────────────────────── */
.sp-hero { position: relative; background: var(--color-dark); }

.sp-hero-has-image { min-height: 520px; display: flex; align-items: flex-end; }
@media (min-width: 768px) { .sp-hero-has-image { min-height: 640px; } }

.sp-hero-media {
  position: absolute; inset: 0; overflow: hidden;
}
.sp-hero-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform-origin: center; transition: transform 8s ease;
}
.sp-article:hover .sp-hero-media img { transform: scale(1.04); }

.sp-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,15,40,0.97) 0%,
    rgba(8,15,40,0.7) 40%,
    rgba(8,15,40,0.25) 75%,
    rgba(8,15,40,0.1) 100%
  );
}

.sp-hero-plain {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  padding: 48px 0 40px;
}
@media (min-width: 768px) { .sp-hero-plain { padding: 64px 0 48px; } }

.sp-hero-inner {
  position: relative; z-index: 2;
  padding-top: 32px; padding-bottom: 48px;
  max-width: 860px;
}
.sp-hero-has-image .sp-hero-inner { color: #fff; }
.sp-hero-plain .sp-hero-inner { color: var(--color-dark); }

/* Breadcrumb */
.sp-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; font-size: 0.8125rem;
  margin-bottom: 20px;
  opacity: 0.8;
}
.sp-hero-has-image .sp-breadcrumb { color: rgba(255,255,255,0.8); }
.sp-hero-plain .sp-breadcrumb { color: var(--color-muted); }
.sp-breadcrumb a {
  text-decoration: none; transition: opacity 0.2s;
}
.sp-hero-has-image .sp-breadcrumb a { color: rgba(255,255,255,0.9); }
.sp-hero-plain .sp-breadcrumb a { color: var(--color-primary); }
.sp-breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.sp-breadcrumb svg { opacity: 0.5; flex-shrink: 0; }

/* Category badge */
.sp-cat-badge {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: 99px;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff; text-decoration: none;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
  transition: opacity 0.2s, transform 0.2s;
}
.sp-cat-badge:hover { opacity: 0.9; transform: translateY(-1px); text-decoration: none; color: #fff; }

/* Title */
.sp-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}
.sp-hero-has-image .sp-title { color: #fff; }
.sp-hero-plain .sp-title { color: var(--color-dark); }

/* Lead */
.sp-lead {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  line-height: 1.65; margin: 0 0 24px;
  max-width: 680px;
}
.sp-hero-has-image .sp-lead { color: rgba(255,255,255,0.82); }
.sp-hero-plain .sp-lead { color: var(--color-muted); }

/* Meta row */
.sp-meta-row {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 0.875rem;
}
.sp-hero-has-image .sp-meta-row { color: rgba(255,255,255,0.8); }
.sp-hero-plain .sp-meta-row { color: var(--color-muted); }

.sp-author-meta {
  display: inline-flex; align-items: center; gap: 10px;
}
.sp-author-meta img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25);
}
.sp-hero-plain .sp-author-meta img { border-color: var(--color-border); }
.sp-author-info { display: flex; flex-direction: column; line-height: 1.25; }
.sp-author-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; }
.sp-author-name a { font-weight: 700; text-decoration: none; }
.sp-hero-has-image .sp-author-name a { color: #fff; }
.sp-hero-plain .sp-author-name a { color: var(--color-dark); }
.sp-author-name a:hover { text-decoration: underline; }

.sp-meta-divider {
  display: inline-block; width: 1px; height: 16px;
  background: currentColor; opacity: 0.25; flex-shrink: 0;
}
.sp-meta-item {
  display: inline-flex; align-items: center; gap: 5px;
}
.sp-updated { font-style: italic; }

/* ── BODY ─────────────────────────────────────────────────── */
.sp-body {
  max-width: 1120px; margin: 0 auto;
  padding: 48px var(--gap) 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 1024px) {
  .sp-body {
    grid-template-columns: 56px 1fr;
    gap: 48px;
    align-items: start;
  }
}

/* Share Rail */
.sp-share-rail {
  display: none;
}
@media (min-width: 1024px) {
  .sp-share-rail {
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    position: sticky; top: 96px;
    align-self: start;
  }
}
.sp-share-rail-label {
  font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-muted); writing-mode: vertical-rl;
  margin-bottom: 4px;
}
.sp-share-rail .share-buttons-vertical { gap: 10px; }
.sp-share-rail .share-btn {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.sp-share-rail .share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Content Column */
.sp-content-col { min-width: 0; }

/* Entry Content */
.sp-entry-content {
  font-size: 1.0625rem; line-height: 1.85;
  color: var(--color-text);
  max-width: 720px;
}
@media (min-width: 768px) { .sp-entry-content { font-size: 1.125rem; } }

.sp-entry-content > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  float: left; font-size: 4.25rem;
  line-height: 0.85; font-weight: 800;
  color: var(--color-primary);
  margin: 8px 14px 0 0;
  background: linear-gradient(135deg, #4F46E5, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sp-entry-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 800; color: var(--color-dark);
  margin: 48px 0 16px; letter-spacing: -0.03em;
  position: relative; padding-left: 16px;
}
.sp-entry-content h2::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, #4F46E5, #EC4899);
}
.sp-entry-content h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 700; color: var(--color-dark);
  margin: 40px 0 12px; letter-spacing: -0.02em;
}
.sp-entry-content h4 {
  font-family: var(--font-heading);
  font-size: 1.125rem; font-weight: 700;
  color: var(--color-dark); margin: 32px 0 12px;
}
.sp-entry-content p { margin-bottom: 26px; }

.sp-entry-content img, .sp-entry-content figure {
  border-radius: 16px; margin: 36px 0;
  max-width: 100%; height: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.sp-entry-content figure img { margin: 0; box-shadow: none; }
.sp-entry-content figcaption {
  font-size: 0.875rem; color: var(--color-muted);
  text-align: center; margin-top: 10px; font-style: italic;
}

.sp-entry-content blockquote {
  position: relative;
  border: none; border-radius: 16px;
  background: linear-gradient(135deg, rgba(79,70,229,0.05), rgba(236,72,153,0.04));
  padding: 28px 28px 28px 36px;
  margin: 36px 0; font-style: italic;
  font-size: 1.1875rem; color: var(--color-dark);
  line-height: 1.65;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, #4F46E5, #EC4899) 1;
}
.sp-entry-content blockquote::before {
  content: 'C';
  position: absolute; top: 12px; left: 16px;
  font-size: 4rem; line-height: 1;
  font-family: Georgia, serif; font-style: normal;
  background: linear-gradient(135deg, #4F46E5, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
}
.sp-entry-content blockquote p:last-child { margin-bottom: 0; }

.sp-entry-content ul, .sp-entry-content ol {
  margin: 0 0 26px 8px; padding-left: 20px;
}
.sp-entry-content li { margin-bottom: 10px; }
.sp-entry-content ul li::marker { color: var(--color-primary); }

.sp-entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 0.2s;
}
.sp-entry-content a:hover { text-decoration-thickness: 2px; }

.sp-entry-content code {
  background: rgba(79,70,229,0.07);
  color: #4F46E5;
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.88em;
  border: 1px solid rgba(79,70,229,0.15);
}
.sp-entry-content pre {
  background: #0F172A; color: #E2E8F0;
  padding: 24px; border-radius: 16px;
  overflow-x: auto; margin: 28px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.sp-entry-content pre code {
  background: none; border: none; padding: 0; color: inherit;
}

.sp-entry-content table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sp-entry-content th {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff; padding: 12px 16px;
  font-family: var(--font-heading); font-size: 0.875rem;
  text-align: left;
}
.sp-entry-content td {
  padding: 12px 16px; border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}
.sp-entry-content tr:last-child td { border-bottom: none; }
.sp-entry-content tr:nth-child(even) td { background: var(--color-bg); }

/* Tags */
.sp-tags {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 8px;
  margin: 32px 0 0; padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.sp-tags-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; font-weight: 700;
  color: var(--color-dark); flex-shrink: 0;
}
.sp-tags a {
  display: inline-block; font-size: 0.8125rem;
  padding: 5px 14px; border-radius: 99px;
  color: var(--color-text); text-decoration: none;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}
.sp-tags a:hover {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff; border-color: transparent;
  transform: translateY(-1px);
}

/* Inline share */
.sp-share-inline {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 12px;
  margin: 32px 0 0; padding: 24px 28px;
  background: linear-gradient(135deg, rgba(79,70,229,0.05), rgba(236,72,153,0.04));
  border-radius: 16px;
  border: 1px solid rgba(79,70,229,0.1);
}
.sp-share-inline-label {
  font-size: 0.9375rem; font-weight: 700;
  color: var(--color-dark);
  flex-shrink: 0; width: 100%;
  margin-bottom: 4px;
}
.sp-share-inline .share-btn {
  width: 42px; height: 42px; border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* ── AUTHOR BOX ───────────────────────────────────────────── */
.sp-author-box {
  max-width: 720px; margin: 48px auto 0;
  margin-left: var(--gap); margin-right: var(--gap);
  padding: 32px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px; text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.sp-author-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #4F46E5, #EC4899);
}
@media (min-width: 600px) {
  .sp-author-box {
    grid-template-columns: auto 1fr;
    text-align: left; gap: 28px;
  }
}
@media (min-width: 1120px) {
  .sp-author-box { margin-left: auto; margin-right: auto; }
}

.sp-author-box-avatar img {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid var(--color-bg-alt);
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
  display: block; margin: 0 auto;
}
@media (min-width: 600px) { .sp-author-box-avatar img { margin: 0; } }

.sp-author-box-label {
  display: block; font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-muted); margin-bottom: 6px;
}
.sp-author-box-name {
  font-family: var(--font-heading);
  font-size: 1.25rem; font-weight: 800;
  color: var(--color-dark); margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.sp-author-box-name a { color: inherit; text-decoration: none; }
.sp-author-box-name a:hover { color: var(--color-primary); }
.sp-author-box-bio {
  font-size: 0.9375rem; line-height: 1.65;
  color: var(--color-text); margin: 0 0 16px;
}
.sp-author-box-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 700;
  color: var(--color-primary); text-decoration: none;
  transition: gap 0.2s ease;
}
.sp-author-box-link:hover { gap: 10px; text-decoration: underline; }

/* ── RELATED POSTS ────────────────────────────────────────── */
.related-posts {
  max-width: 1120px; margin: 56px auto 0;
  padding: 0 var(--gap);
}
.related-title {
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 800;
  color: var(--color-dark); letter-spacing: -0.03em;
  margin: 0 0 28px; padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
  display: flex; align-items: center; gap: 12px;
}
.related-title::before {
  content: ''; display: inline-block;
  width: 4px; height: 26px; border-radius: 4px;
  background: linear-gradient(180deg, #4F46E5, #EC4899);
  flex-shrink: 0;
}
.related-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}
.related-card {
  display: block; text-decoration: none;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}
.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}
.related-thumb { overflow: hidden; aspect-ratio: 16/10; }
.related-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.related-card:hover .related-thumb img { transform: scale(1.07); }
.related-thumb-placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
}
.related-body { padding: 18px; }
.related-category {
  display: inline-block; font-size: 0.6875rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(79,70,229,0.08);
  color: #4F46E5; padding: 3px 9px;
  border-radius: 5px; margin-bottom: 10px;
}
.related-card-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem; font-weight: 700;
  line-height: 1.4; color: var(--color-dark);
  margin: 0 0 8px; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.2s;
}
.related-card:hover .related-card-title { color: var(--color-primary); }
.related-meta { font-size: 0.75rem; color: var(--color-muted); }

/* ── POST NAVIGATION ──────────────────────────────────────── */
.post-navigation {
  max-width: 1120px; margin: 48px auto 56px;
  padding: 0 var(--gap);
}
.post-navigation .nav-links {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
  display: block; padding: 20px 24px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 16px; text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.post-navigation .nav-next { text-align: right; }
.sp-nav-dir {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--color-primary); margin-bottom: 6px;
}
.post-navigation .nav-next .sp-nav-dir { justify-content: flex-end; }
.sp-nav-title {
  display: block; font-family: var(--font-heading);
  font-size: 0.9375rem; font-weight: 700;
  color: var(--color-dark); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Page links */
.sp-page-links {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin: 24px 0;
  font-weight: 600; color: var(--color-dark);
}
.sp-page-links a {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 8px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: 0.875rem; text-decoration: none;
  color: var(--color-text); transition: all 0.2s;
}
.sp-page-links a:hover {
  background: var(--color-primary);
  color: #fff; border-color: transparent;
}

/* Override old single CSS to avoid conflicts */
.single-hero, .single-body, .single-entry-content,
.entry-header-plain, .author-box, .share-rail {
  all: unset;
}

/* ============================================================
   SINGLE POST – BUG FIXES
   ============================================================ */

/* FIX: Remove the dangerous all:unset block effect */
.single-hero, .single-body, .single-entry-content,
.entry-header-plain, .author-box, .share-rail {
  all: revert;
}

/* FIX: sp-hero-plain text must be WHITE (dark bg) */
.sp-hero-plain {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
  padding: 48px 0 40px;
  color: #fff !important;
}
.sp-hero-plain .sp-hero-inner { color: #fff !important; }
.sp-hero-plain .sp-title { color: #fff !important; }
.sp-hero-plain .sp-lead { color: rgba(255,255,255,0.75) !important; }
.sp-hero-plain .sp-meta-row { color: rgba(255,255,255,0.75) !important; }
.sp-hero-plain .sp-author-name a { color: #fff !important; }
.sp-hero-plain .sp-breadcrumb { color: rgba(255,255,255,0.65) !important; }
.sp-hero-plain .sp-breadcrumb a { color: rgba(255,255,255,0.85) !important; }
.sp-hero-plain .sp-meta-divider { background: rgba(255,255,255,0.25) !important; }
.sp-hero-plain .sp-author-meta img { border-color: rgba(255,255,255,0.2) !important; }
.sp-hero-plain .sp-author-label { opacity: 0.6; }

/* FIX: Hero with image – ensure text shows */
.sp-hero-has-image .sp-title { color: #fff !important; }
.sp-hero-has-image .sp-lead { color: rgba(255,255,255,0.85) !important; }
.sp-hero-has-image .sp-meta-row { color: rgba(255,255,255,0.8) !important; }

/* FIX: sp-hero-inner padding & width */
.sp-hero-inner {
  position: relative !important;
  z-index: 2 !important;
  max-width: 820px !important;
  padding-top: 40px !important;
  padding-bottom: 52px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* FIX: sp-hero-has-image full height */
.sp-hero-has-image {
  min-height: 480px !important;
  display: flex !important;
  align-items: flex-end !important;
}
@media (min-width: 768px) {
  .sp-hero-has-image { min-height: 580px !important; }
}

/* FIX: sp-hero-media absolutely covers hero */
.sp-hero-media {
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden !important;
}
.sp-hero-media img {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important; display: block !important;
}

/* FIX: sp-body layout – full width, proper padding */
.sp-body {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 40px 24px 24px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  box-sizing: border-box !important;
}
@media (min-width: 1024px) {
  .sp-body {
    grid-template-columns: 56px 1fr !important;
    gap: 40px !important;
    align-items: start !important;
  }
}

/* FIX: sp-content-col max-width */
.sp-content-col { min-width: 0 !important; }

/* FIX: sp-entry-content readable width */
.sp-entry-content {
  font-size: 1.0625rem !important;
  line-height: 1.85 !important;
  color: var(--color-text) !important;
  max-width: 680px !important;
}

/* FIX: Share rail positioning */
.sp-share-rail {
  display: none !important;
}
@media (min-width: 1024px) {
  .sp-share-rail {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    position: sticky !important;
    top: 96px !important;
    align-self: start !important;
  }
}
.sp-share-rail-label {
  font-size: 0.625rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--color-muted) !important;
  writing-mode: vertical-rl !important;
  margin-bottom: 4px !important;
}

/* FIX: Author box proper spacing */
.sp-author-box {
  max-width: 680px !important;
  margin: 48px 0 0 !important;
  padding: 28px !important;
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 20px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  text-align: center !important;
  box-shadow: var(--shadow-sm) !important;
  position: relative !important;
  overflow: hidden !important;
}
@media (min-width: 640px) {
  .sp-author-box {
    grid-template-columns: auto 1fr !important;
    text-align: left !important;
    gap: 24px !important;
  }
}

/* FIX: Related posts section spacing */
.related-posts {
  max-width: 1100px !important;
  margin: 48px auto 0 !important;
  padding: 0 24px !important;
}

/* FIX: Post navigation */
.post-navigation {
  max-width: 1100px !important;
  margin: 40px auto 48px !important;
  padding: 0 24px !important;
}
.post-navigation .nav-links {
  display: grid !important;
  gap: 16px !important;
  grid-template-columns: 1fr !important;
}
@media (min-width: 640px) {
  .post-navigation .nav-links { grid-template-columns: 1fr 1fr !important; }
}
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
  display: block !important;
  padding: 20px 24px !important;
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 16px !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-lg) !important;
}
.post-navigation .nav-next a { text-align: right !important; }
.post-navigation .nav-label {
  display: block !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--color-primary) !important;
  margin-bottom: 6px !important;
}
.post-navigation .nav-title {
  display: block !important;
  font-family: var(--font-heading) !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  color: var(--color-dark) !important;
  line-height: 1.4 !important;
}

/* FIX: sp-share-inline */
.sp-share-inline {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 32px 0 0 !important;
  padding: 20px 24px !important;
  background: rgba(79,70,229,0.04) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(79,70,229,0.1) !important;
}
.sp-share-inline-label {
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  color: var(--color-dark) !important;
  width: 100% !important;
  margin-bottom: 4px !important;
}

/* FIX: Tags */
.sp-tags {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 28px 0 0 !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--color-border) !important;
}
.sp-tags a {
  display: inline-block !important;
  font-size: 0.8125rem !important;
  padding: 5px 14px !important;
  border-radius: 99px !important;
  color: var(--color-text) !important;
  text-decoration: none !important;
  background: #fff !important;
  border: 1px solid var(--color-border) !important;
  transition: all 0.2s ease !important;
}
.sp-tags a:hover {
  background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* FIX: Reading progress z-index & position */
.sp-progress {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 3px !important;
  z-index: 99999 !important;
  pointer-events: none !important;
}
.sp-progress span {
  display: block !important;
  height: 100% !important;
  width: 0% !important;
  background: linear-gradient(90deg, #4F46E5, #EC4899) !important;
  transition: width 0.1s linear !important;
}

/* ============================================================
   RESPONSIVE FIXES & MOBILE-FIRST COMPLETIONS
   ============================================================ */

/* ── HEADER: Mobile height fix ─────────────────────────────── */
.header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 56px !important;
  transition: height 0.25s ease !important;
  padding: 0 16px !important;
}
@media (min-width: 768px) {
  .header-inner { height: 64px !important; padding: 0 !important; }
}
.site-header.is-scrolled .header-inner { height: 48px !important; }
@media (min-width: 768px) {
  .site-header.is-scrolled .header-inner { height: 52px !important; }
}

/* ── NEWSLETTER: Mobile padding ────────────────────────────── */
.hp-newsletter {
  margin: 40px 0 24px !important;
  padding: 40px 20px !important;
  border-radius: 16px !important;
}
@media (min-width: 640px) {
  .hp-newsletter { padding: 56px 32px !important; border-radius: 24px !important; }
}
.hp-newsletter-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
@media (min-width: 480px) {
  .hp-newsletter-actions { flex-direction: row !important; justify-content: center !important; }
}
.hp-btn-primary, .hp-btn-outline {
  width: 100% !important;
  justify-content: center !important;
}
@media (min-width: 480px) {
  .hp-btn-primary, .hp-btn-outline { width: auto !important; }
}

/* ── HOMEPAGE HERO: Mobile stacking ────────────────────────── */
@media (max-width: 767px) {
  .hp-hero-post { min-height: 300px !important; }
  .hp-hero-body { padding: 20px 18px 24px !important; }
  .hp-hero-title { font-size: 1.35rem !important; margin-bottom: 10px !important; }
  .hp-hero-excerpt { display: none !important; }
  .hp-hero-meta-top { margin-bottom: 10px !important; }

  .hp-aside-card { padding: 12px !important; }
  .hp-aside-thumb { width: 80px !important; height: 68px !important; }
  .hp-aside-title { font-size: 0.875rem !important; }

  .hp-cats-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
  .hp-cat-card { padding: 14px 8px !important; }
  .hp-cat-icon { font-size: 1.4rem !important; }
  .hp-cat-name { font-size: 0.6875rem !important; }

  .hp-section-head { margin: 32px 0 16px !important; }
  .hp-section-title { font-size: 1.125rem !important; }

  .hp-posts-grid { gap: 16px !important; }
  .hp-card-body { padding: 14px 14px 16px !important; }
  .hp-card-title { font-size: 0.9375rem !important; }
  .hp-card-excerpt { display: none !important; }
}

/* ── POST CARD GRID: tablet 2-col ──────────────────────────── */
@media (min-width: 640px) and (max-width: 1023px) {
  .hp-hero-excerpt { -webkit-line-clamp: 2 !important; }
  .hp-card-excerpt { -webkit-line-clamp: 2 !important; }
}

/* ── SINGLE POST: Mobile hero ───────────────────────────────── */
@media (max-width: 767px) {
  .sp-hero-has-image { min-height: 320px !important; }
  .sp-hero-inner {
    padding-top: 24px !important;
    padding-bottom: 28px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .sp-title { font-size: 1.5rem !important; letter-spacing: -0.02em !important; }
  .sp-lead { font-size: 0.9375rem !important; display: none !important; }
  .sp-meta-row { gap: 6px !important; font-size: 0.75rem !important; }
  .sp-author-meta img { width: 28px !important; height: 28px !important; }
  .sp-meta-divider { display: none !important; }
  .sp-meta-item { display: none !important; }
  .sp-meta-item:first-of-type { display: inline-flex !important; }

  .sp-body { padding: 24px 16px 16px !important; }
  .sp-entry-content { font-size: 1rem !important; line-height: 1.75 !important; }
  .sp-entry-content h2 { font-size: 1.25rem !important; margin: 32px 0 12px !important; }
  .sp-entry-content h3 { font-size: 1.1rem !important; }
  .sp-entry-content blockquote { font-size: 1rem !important; padding: 20px 20px 20px 24px !important; }

  .sp-author-box {
    margin: 32px 0 0 !important;
    padding: 20px !important;
    border-radius: 14px !important;
  }
  .sp-author-box-avatar img { width: 68px !important; height: 68px !important; }
  .sp-author-box-name { font-size: 1.0625rem !important; }
  .sp-author-box-bio { font-size: 0.875rem !important; }

  .sp-share-inline { padding: 16px !important; }
  .related-posts { padding: 0 16px !important; }
  .related-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .post-navigation { padding: 0 16px !important; }

  .sp-breadcrumb { font-size: 0.75rem !important; }
  .sp-breadcrumb span[aria-current] { display: none !important; }
}

/* ── SINGLE POST: Tablet (768–1023px) ──────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .sp-body { padding: 36px 24px 24px !important; }
  .sp-entry-content { font-size: 1.0625rem !important; }
  .related-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .sp-author-box { margin-left: 0 !important; margin-right: 0 !important; }
}

/* ── SIDEBAR: Mobile hidden / tablet stacked ────────────────── */
@media (max-width: 1023px) {
  .site-main { display: block !important; }
  .sidebar { width: 100% !important; margin-top: 32px !important; }
  .has-sidebar .content-area { max-width: 100% !important; }
}

/* ── TOP BAR: Hide on very small screens ────────────────────── */
@media (max-width: 479px) {
  .top-bar { display: none !important; }
  .trending-bar { display: none !important; }
}

/* ── NAVIGATION: Mobile burger improvements ─────────────────── */
@media (max-width: 767px) {
  .main-navigation.toggled {
    top: 56px !important;
    padding: 12px 16px !important;
  }
  .main-navigation.toggled ul { gap: 0 !important; }
  .main-navigation.toggled a {
    padding: 12px 4px !important;
    font-size: 0.9375rem !important;
  }
}

/* ── SEARCH OVERLAY: Mobile full-width ──────────────────────── */
@media (max-width: 767px) {
  .search-overlay { padding: 12px 0 !important; }
  .search-overlay .search-form input[type="search"] {
    font-size: 1rem !important;
    padding: 12px 14px !important;
  }
}

/* ── PAGINATION: Mobile ─────────────────────────────────────── */
@media (max-width: 479px) {
  .hp-pagination .page-numbers {
    min-width: 36px !important;
    height: 36px !important;
    font-size: 0.875rem !important;
    padding: 0 10px !important;
  }
  .hp-pagination .nav-links { gap: 4px !important; }
}

/* ── FOOTER: Mobile stack ───────────────────────────────────── */
@media (max-width: 767px) {
  .footer-widgets { grid-template-columns: 1fr !important; gap: 24px !important; }
  .site-info { flex-direction: column !important; gap: 6px !important; text-align: center !important; }
  .footer-widget-area { margin-bottom: 8px !important; }
}

/* ── GENERAL: Touch-friendly tap targets ────────────────────── */
@media (max-width: 767px) {
  .share-btn { width: 44px !important; height: 44px !important; }
  .hp-badge { padding: 5px 12px !important; }
  .hp-cat-pill { padding: 4px 10px !important; }
  .sp-cat-badge { padding: 5px 14px !important; }
  .hp-btn-primary, .hp-btn-outline { padding: 13px 22px !important; font-size: 0.9375rem !important; }
}

/* ── IMAGE OVERFLOW FIX ─────────────────────────────────────── */
img, video, iframe, embed, object {
  max-width: 100% !important;
  height: auto !important;
}
.sp-entry-content iframe {
  width: 100% !important;
}

/* ============================================================
   FOOTER PREMIUM REDESIGN
   ============================================================ */

.site-footer {
  background: linear-gradient(175deg, #0F172A 0%, #1E293B 100%);
  color: rgba(255,255,255,0.75);
  margin-top: 0;
}

/* ── FOOTER TOP ─────────────────────────────────────────────── */
.footer-top {
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer-top-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 640px) {
  .footer-top-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }
}

@media (min-width: 1024px) {
  .footer-top-inner {
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 0 48px;
    align-items: start;
  }
}

/* ── Brand Column ───────────────────────────────────────────── */
.footer-brand { }

.footer-logo img,
.footer-logo .custom-logo {
  max-height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  margin-bottom: 16px;
}

.footer-site-name {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  margin: 10px 0 20px;
  max-width: 260px;
}

/* Social Icons */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-social-btn:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.footer-social-facebook:hover { background: #1877f2; border-color: #1877f2; }
.footer-social-twitter:hover  { background: #000; border-color: #333; }
.footer-social-instagram:hover { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: transparent; }
.footer-social-youtube:hover  { background: #FF0000; border-color: #FF0000; }
.footer-social-tiktok:hover   { background: #010101; border-color: #69C9D0; }

/* ── Column Shared ──────────────────────────────────────────── */
.footer-col { }

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #4F46E5, #EC4899);
  border-radius: 2px;
}

/* ── Footer Links ───────────────────────────────────────────── */
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-links li { }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s ease, gap 0.2s ease;
}

.footer-links a::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(79,70,229,0.5);
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
  gap: 8px;
  text-decoration: none;
}

.footer-links a:hover::before {
  background: linear-gradient(135deg, #4F46E5, #EC4899);
  transform: scale(1.4);
}

/* ── Recent Posts ───────────────────────────────────────────── */
.footer-recent-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-recent-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.footer-recent-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.footer-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.footer-recent-item:hover .footer-recent-thumb img {
  transform: scale(1.08);
}

.footer-recent-body {
  flex: 1;
  min-width: 0;
}

.footer-recent-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.footer-recent-title:hover {
  color: #fff;
  text-decoration: none;
}

.footer-recent-date {
  display: block;
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.35);
}

/* ── FOOTER BOTTOM BAR ──────────────────────────────────────── */
.footer-bottom {
  padding: 20px 0;
  background: rgba(0,0,0,0.2);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: 16px;
  }
}

.footer-copyright {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
  order: 2;
}

@media (min-width: 768px) { .footer-copyright { order: 1; } }

.footer-copyright a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-copyright a:hover { color: #fff; }

.footer-bottom-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  order: 1;
}

@media (min-width: 768px) {
  .footer-bottom-nav { order: 2; }
}

.footer-bottom-nav a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 2px 6px;
  transition: color 0.2s;
}

.footer-bottom-nav a:hover { color: #fff; }

.footer-bottom-sep {
  color: rgba(255,255,255,0.2);
  font-size: 0.75rem;
  user-select: none;
}

.footer-powered {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
  order: 3;
}

.footer-powered a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-powered a:hover { color: #fff; }

/* ── Widget areas (if used) ─────────────────────────────────── */
.footer-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .footer-widgets { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-widgets { grid-template-columns: repeat(3, 1fr); }
}

.footer-widget-area .widget-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widget-area a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-widget-area a:hover { color: #fff; }

/* ── Mobile Footer ──────────────────────────────────────────── */
@media (max-width: 639px) {
  .footer-top { padding: 40px 0 32px; }
  .footer-top-inner { gap: 28px; }
  .footer-tagline { max-width: 100%; }
  .footer-social { gap: 6px; }
  .footer-social-btn { width: 36px; height: 36px; }
}

/* ============================================================
   SINGLE PAGE (page.php) – PREMIUM REDESIGN (pg-*)
   ============================================================ */

/* Content area full width for pages */
.pg-content-area {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── PAGE HERO (with featured image) ───────────────────────── */
.pg-hero {
  position: relative;
  background: var(--color-dark);
  overflow: hidden;
}

.pg-hero-has-image {
  min-height: 380px;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 768px) {
  .pg-hero-has-image { min-height: 480px; }
}

.pg-hero-media {
  position: absolute;
  inset: 0;
}

.pg-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 6s ease;
}

.pg-hero:hover .pg-hero-media img { transform: scale(1.03); }

.pg-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,15,40,0.95) 0%,
    rgba(8,15,40,0.55) 45%,
    rgba(8,15,40,0.1) 100%
  );
}

.pg-hero-inner {
  position: relative; z-index: 2;
  padding-top: 48px; padding-bottom: 48px;
  max-width: 860px;
  color: #fff;
}

.pg-hero-inner .breadcrumb,
.pg-hero-inner .sp-breadcrumb {
  color: rgba(255,255,255,0.7) !important;
  margin-bottom: 18px;
}

.pg-hero-inner .breadcrumb a,
.pg-hero-inner .sp-breadcrumb a { color: rgba(255,255,255,0.85) !important; }

.pg-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.pg-lead {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  margin: 0;
  max-width: 640px;
}

/* ── PLAIN HEADER (no featured image) ──────────────────────── */
.pg-header-plain {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

.pg-header-plain::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 15% 50%, rgba(79,70,229,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.pg-header-inner {
  position: relative; z-index: 1;
  max-width: 860px;
}

.pg-header-inner .breadcrumb,
.pg-header-inner .sp-breadcrumb {
  color: rgba(255,255,255,0.6) !important;
  margin-bottom: 16px;
}

.pg-header-inner .breadcrumb a,
.pg-header-inner .sp-breadcrumb a { color: rgba(255,255,255,0.8) !important; }

.pg-header-badge { margin-bottom: 14px; }

.pg-legal-badge,
.pg-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.pg-legal-badge {
  background: linear-gradient(135deg, #059669, #10B981);
  color: #fff;
  box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}

.pg-page-badge {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.pg-title-plain {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.pg-lead-plain {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 640px;
}

.pg-meta-plain {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pg-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

.pg-meta-item time { color: inherit; }

/* ── PAGE BODY ──────────────────────────────────────────────── */
.pg-body {
  padding: 48px 0 56px;
}

.pg-body-inner {
  max-width: 860px;
}

/* ── TABLE OF CONTENTS ──────────────────────────────────────── */
.pg-toc {
  background: linear-gradient(135deg, rgba(79,70,229,0.04), rgba(124,58,237,0.04));
  border: 1px solid rgba(79,70,229,0.12);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 0 0 40px;
}

.pg-toc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(79,70,229,0.12);
}

.pg-toc-list {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pg-toc-item {
  counter-increment: toc-counter;
}

.pg-toc-item a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pg-toc-item a::before {
  content: counter(toc-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(79,70,229,0.08);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.pg-toc-item a:hover {
  background: rgba(79,70,229,0.06);
  color: var(--color-primary);
  padding-left: 14px;
  text-decoration: none;
}

.pg-toc-item a:hover::before {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
}

.pg-toc-h3 a {
  padding-left: 32px !important;
  font-size: 0.875rem !important;
  color: var(--color-muted) !important;
}

.pg-toc-h3 a::before {
  background: rgba(79,70,229,0.04) !important;
  font-size: 0.6875rem !important;
}

/* ── ENTRY CONTENT ──────────────────────────────────────────── */
.pg-entry-content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .pg-entry-content { font-size: 1.125rem; }
}

.pg-entry-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--color-dark);
  margin: 48px 0 16px;
  letter-spacing: -0.03em;
  padding-left: 16px;
  position: relative;
  scroll-margin-top: 100px;
}

.pg-entry-content h2::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, #4F46E5, #EC4899);
}

.pg-entry-content h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.375rem);
  font-weight: 700;
  color: var(--color-dark);
  margin: 36px 0 12px;
  letter-spacing: -0.02em;
  scroll-margin-top: 100px;
}

.pg-entry-content h4 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 28px 0 10px;
}

.pg-entry-content p { margin-bottom: 24px; }

.pg-entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.2s;
}

.pg-entry-content a:hover { text-decoration-thickness: 2px; }

.pg-entry-content img, .pg-entry-content figure {
  border-radius: 16px;
  margin: 32px 0;
  max-width: 100%; height: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.pg-entry-content figure img { margin: 0; box-shadow: none; }

.pg-entry-content figcaption {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

.pg-entry-content blockquote {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79,70,229,0.04), rgba(236,72,153,0.03));
  border-left: 4px solid;
  border-image: linear-gradient(180deg, #4F46E5, #EC4899) 1;
  padding: 24px 28px;
  margin: 32px 0;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-dark);
  line-height: 1.65;
}

.pg-entry-content blockquote p:last-child { margin-bottom: 0; }

.pg-entry-content ul, .pg-entry-content ol {
  margin: 0 0 24px 8px;
  padding-left: 20px;
}

.pg-entry-content li { margin-bottom: 10px; }
.pg-entry-content ul li::marker { color: var(--color-primary); }

.pg-entry-content table {
  width: 100%; border-collapse: collapse;
  margin: 28px 0; border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}

.pg-entry-content th {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff; padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 0.875rem; text-align: left;
}

.pg-entry-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.pg-entry-content tr:last-child td { border-bottom: none; }
.pg-entry-content tr:nth-child(even) td { background: var(--color-bg); }

.pg-entry-content code {
  background: rgba(79,70,229,0.07);
  color: #4F46E5;
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.88em;
  border: 1px solid rgba(79,70,229,0.15);
}

.pg-entry-content pre {
  background: #0F172A; color: #E2E8F0;
  padding: 24px; border-radius: 16px;
  overflow-x: auto; margin: 28px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.pg-entry-content pre code {
  background: none; border: none;
  padding: 0; color: inherit;
}

/* ── LEGAL PAGE FOOTER ──────────────────────────────────────── */
.pg-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.pg-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-dark);
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.pg-back-btn:hover {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  border-color: transparent;
  transform: translateX(-3px);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(79,70,229,0.3);
}

.pg-legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-style: italic;
}

/* ── PAGE LINKS (multi-page) ────────────────────────────────── */
.pg-page-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 32px 0;
  font-weight: 600;
  color: var(--color-dark);
}

.pg-page-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.2s;
}

.pg-page-links a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}

/* ── MOBILE RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 767px) {
  .pg-hero-has-image { min-height: 280px !important; }
  .pg-hero-inner { padding-top: 28px !important; padding-bottom: 32px !important; }
  .pg-title { font-size: 1.5rem !important; }
  .pg-lead { font-size: 0.9375rem !important; }

  .pg-header-plain { padding: 32px 0 !important; }
  .pg-title-plain { font-size: 1.5rem !important; }
  .pg-lead-plain { font-size: 0.9375rem !important; }

  .pg-body { padding: 28px 0 36px !important; }

  .pg-toc { padding: 18px 18px !important; border-radius: 12px !important; }
  .pg-toc-item a { font-size: 0.875rem !important; }
  .pg-toc-h3 a { padding-left: 24px !important; }

  .pg-entry-content { font-size: 1rem !important; }
  .pg-entry-content h2 { font-size: 1.25rem !important; margin: 36px 0 12px !important; }
  .pg-entry-content h3 { font-size: 1.1rem !important; }
  .pg-entry-content blockquote { padding: 18px 20px !important; font-size: 1rem !important; }

  .pg-legal-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}
