/* =========================================================
   CMS Blog — Frontend Stylesheet
   Complete rewrite: Editorial / Magazine Design System
   ========================================================= */

:root {
  --primary: #18181b;
  --accent: #ec4899;
  --accent-light: #fce7f3;
  --accent-hover: #db2777;
  --bg: #fafafa;
  --card: #ffffff;
  --text: #09090b;
  --muted: #64748b;
  --border: #e4e4e7;
  --radius: 8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-hover: 0 12px 28px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.06);

  /* User-customizable (overridden by PHP inline <style> in header) */
  --color-primary: #18181b;
  --color-secondary: #ec4899;
  --color-accent: #ec4899;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

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

/* =========================================================
   Reading Progress Bar
   ========================================================= */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #f472b6);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* =========================================================
   Navbar
   ========================================================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow 0.25s;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo {
  max-height: 38px;
  width: auto;
}

.site-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.site-name span.accent { color: var(--accent); }

.navbar .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem;
  color: var(--text);
}

.navbar-toggler:focus { box-shadow: none; }

/* Search inline */
.navbar-search .form-control {
  font-size: 0.875rem;
  border-radius: 20px 0 0 20px;
  border-right: none;
  border-color: var(--border);
  background: var(--bg);
  padding: 0.4375rem 0.875rem;
}

.navbar-search .form-control:focus {
  border-color: var(--accent);
  box-shadow: none;
  background: #fff;
}

.navbar-search .btn {
  border-radius: 0 20px 20px 0;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 0.4375rem 0.75rem;
  font-size: 0.875rem;
}

.navbar-search .btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Breadcrumb */
.breadcrumb-bar {
  background: #f4f4f5;
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 0;
}

.breadcrumb {
  font-size: 0.8rem;
  margin: 0;
}

.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item a:hover { color: var(--accent); }
.breadcrumb-item.active { color: var(--text); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: #cbd5e1; }

/* =========================================================
   Hero Section
   ========================================================= */
.hero-section {
  padding: 6rem 0;
  background: var(--primary);
  color: #fff;
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section.has-bg-image {
  background-size: cover;
  background-position: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(236,72,153,.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(236,72,153,.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.15s;
}

.hero-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(236,72,153,.45);
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: none;
}

.hero-btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}

/* =========================================================
   Page Hero (blog listing, category, etc.)
   ========================================================= */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #27272a 100%);
  padding: 4rem 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  clip-path: ellipse(52% 100% at 50% 100%);
}

.page-hero-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.625rem;
}

.page-hero-subtitle {
  font-size: 1rem;
  opacity: 0.75;
  max-width: 580px;
  margin: 0 auto;
}

.page-hero-meta {
  font-size: 0.875rem;
  opacity: 0.6;
  margin-top: 0.5rem;
}

.page-hero-sm {
  padding: 2.5rem 0;
}

.category-hero-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

/* =========================================================
   Features Section
   ========================================================= */
.features-section {
  background: var(--bg);
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: #f0abfc;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.625rem;
  letter-spacing: -0.25px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* =========================================================
   Section Labels / Headings
   ========================================================= */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.75px;
  margin-bottom: 0.625rem;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

/* =========================================================
   Post Cards
   ========================================================= */
.post-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow);
  height: 100%;
}

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

.post-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: #f4f4f5;
  flex-shrink: 0;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

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

.post-card-img a { display: block; height: 100%; }

/* Category badge on image */
.post-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
}

.cat-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s;
}

.cat-badge:hover { background: var(--accent-hover); color: #fff; }

.cat-badge-outline {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(4px);
}

/* Featured star badge */
.featured-star {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fbbf24;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

/* Inline category badge (not on image) */
.category-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.category-badge:hover {
  background: var(--accent);
  color: #fff;
}

.post-card-title {
  font-size: 1.025rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.625rem;
  flex: 1;
  letter-spacing: -0.25px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.post-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

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

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  gap: 0.5rem;
}

.post-meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.read-time {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* =========================================================
   CTA Section
   ========================================================= */
.cta-section {
  background: var(--accent);
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.cta-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.75px;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
  color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,.2);
}

/* =========================================================
   Newsletter Section
   ========================================================= */
.newsletter-section {
  background: #f4f4f5;
  padding: 5rem 0;
}

.newsletter-form .form-control {
  border-radius: 50px 0 0 50px;
  padding: 0.75rem 1.25rem;
  border-right: none;
  border-color: var(--border);
  font-size: 0.9375rem;
  background: #fff;
}

.newsletter-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: none;
}

.newsletter-form .btn {
  border-radius: 0 50px 50px 0;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  transition: background 0.15s;
}

.newsletter-form .btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* =========================================================
   Single Post
   ========================================================= */
.post-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 100%);
}

.post-hero-content {
  position: relative;
  z-index: 1;
}

.post-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.75px;
  color: #fff;
  margin-bottom: 1rem;
}

.post-title-inline {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.75px;
  color: var(--text);
  margin-bottom: 1rem;
}

/* ─── Post content typography ─────────────────────────── */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #18181b;
  max-width: 72ch;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-top: 2.25rem;
  margin-bottom: 0.875rem;
  letter-spacing: -0.4px;
}

.post-content h2 { font-size: 1.625rem; }
.post-content h3 { font-size: 1.35rem; }
.post-content h4 { font-size: 1.15rem; }

.post-content p { margin-bottom: 1.375rem; }

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.post-content img {
  width: 100%;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  background: var(--accent-light);
  border-radius: 0 12px 12px 0;
  margin: 2rem 0;
  color: #52525b;
  font-style: italic;
  font-size: 1.05rem;
}

.post-content pre {
  background: #18181b;
  color: #e4e4e7;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.875rem;
  margin: 2rem 0;
  line-height: 1.65;
}

.post-content code {
  background: #f4f4f5;
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.875em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

.post-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.post-content ul,
.post-content ol {
  padding-left: 1.75rem;
  margin-bottom: 1.375rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content th {
  background: #f4f4f5;
  font-weight: 600;
  color: var(--text);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ─── Share buttons ───────────────────────────────────── */
.share-btn {
  transition: transform 0.15s, box-shadow 0.15s;
  font-size: 0.8375rem;
  font-weight: 500;
}

.share-btn:hover { transform: translateY(-1px); }

/* ─── Author box ──────────────────────────────────────── */
.author-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.author-box-role {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.625rem;
}

.author-box-bio {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* ─── Post navigation ──────────────────────────────────── */
.post-nav-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 1.125rem 1.25rem;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-nav-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.post-nav-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.post-nav-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: -0.25px;
}

/* ─── Comments ─────────────────────────────────────────── */
.comments-list { display: flex; flex-direction: column; gap: 1.25rem; }

.comment-item {
  display: flex;
  gap: 1rem;
}

.comment-reply {
  margin-left: 3rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
}

.comment-body {
  flex: 1;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.comment-author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.comment-date {
  font-size: 0.775rem;
  color: var(--muted);
}

.comment-text {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
}

.comment-reply-btn {
  background: none;
  border: none;
  font-size: 0.775rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-weight: 500;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s;
}

.comment-reply-btn:hover { color: var(--accent); }

/* Comment form */
.comment-form .form-control {
  border-radius: 8px;
  border-color: var(--border);
  font-size: 0.9rem;
}

.comment-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(236,72,153,.1);
}

.comment-form .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.comment-form .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* =========================================================
   Section Heading with underline accent
   ========================================================= */
.section-heading {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  position: relative;
  padding-bottom: 0.625rem;
  margin-bottom: 1.5rem;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* =========================================================
   Sidebar
   ========================================================= */
.sidebar {
  position: sticky;
  top: 88px;
}

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.125rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.widget-list {
  list-style: none;
}

.widget-list li {
  border-bottom: 1px solid var(--border);
}

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

.widget-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

.widget-count {
  background: #f4f4f5;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Recent posts widget */
.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.recent-post-thumb {
  width: 62px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.recent-post-info { flex: 1; min-width: 0; }

.recent-post-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.recent-post-title:hover { color: var(--accent); }

.recent-post-date {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Search widget */
.search-widget-form .form-control {
  border-radius: 8px 0 0 8px;
  border-right: none;
  border-color: var(--border);
  font-size: 0.875rem;
}

.search-widget-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: none;
}

.search-widget-form .btn {
  border-radius: 0 8px 8px 0;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-link {
  display: inline-block;
  background: #f4f4f5;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 20px;
  padding: 3px 12px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.tag-link:hover,
.tag-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tag-link.size-1 { font-size: 0.7rem; }
.tag-link.size-2 { font-size: 0.8rem; }
.tag-link.size-3 { font-size: 0.875rem; }
.tag-link.size-4 { font-size: 0.95rem; font-weight: 600; }
.tag-link.size-5 { font-size: 1.05rem; font-weight: 700; }

/* =========================================================
   Pagination
   ========================================================= */
.pagination .page-link {
  color: var(--text);
  border-color: var(--border);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 8px !important;
  margin: 0 2px;
  transition: all 0.15s;
  padding: 0.5rem 0.875rem;
}

.pagination .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination .page-link:hover {
  background: var(--accent-light);
  border-color: #f9a8d4;
  color: var(--accent);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { margin-top: auto; }

.footer-main {
  background: var(--primary);
  padding: 4rem 0 3rem;
}

.footer-bottom {
  background: #09090b;
  padding: 1.125rem 0;
}

.footer-brand { margin-bottom: 1.125rem; }

.footer-logo {
  max-height: 38px;
  filter: brightness(0) invert(1);
}

.footer-site-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: #71717a;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

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

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.25px;
  color: #a1a1aa;
  margin-bottom: 1.125rem;
}

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

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  color: #71717a;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}

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

/* Newsletter in footer */
.footer-newsletter-input {
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: #fff !important;
  border-radius: 8px 0 0 8px !important;
  font-size: 0.875rem;
}

.footer-newsletter-input::placeholder { color: #71717a !important; }

.footer-newsletter-input:focus {
  border-color: var(--accent) !important;
  box-shadow: none !important;
}

.footer-newsletter-btn {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  border-radius: 0 8px 8px 0 !important;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.15s !important;
}

.footer-newsletter-btn:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

/* =========================================================
   Back to top
   ========================================================= */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(236,72,153,.4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 28px rgba(236,72,153,.5);
  transform: translateY(-2px);
}

/* =========================================================
   Breadcrumb
   ========================================================= */
.post-breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

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

.post-breadcrumb-sep { color: #d4d4d8; font-size: 0.75rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 991.98px) {
  .sidebar { position: static; }
  .post-hero { min-height: 300px; }
  .hero-section { padding: 4rem 0; min-height: auto; }
  .author-box { flex-direction: column; }
}

@media (max-width: 767.98px) {
  .hero-title { font-size: 2.25rem; }
  .cta-title { font-size: 1.875rem; }
  .post-card-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .footer-main { padding: 3rem 0 2rem; }
  .comment-reply { margin-left: 1.5rem; }
}

@media (max-width: 575.98px) {
  .hero-section { padding: 3rem 0; }
  .page-hero { padding: 3rem 0; }
}

/* =========================================================
   Skeleton loading
   ========================================================= */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================================
   Alert messages (frontend)
   ========================================================= */
.alert {
  border-radius: 10px;
  font-size: 0.9rem;
}

/* =========================================================
   Utilities
   ========================================================= */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.aspect-16-9 {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.object-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   Single post meta utilities
   ========================================================= */
.post-hero-meta {
  color: rgba(255,255,255,.75);
  font-size: 0.875rem;
}

.post-hero-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
  flex-shrink: 0;
}

.post-inline-meta { font-size: 0.875rem; }

.post-inline-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex-shrink: 0;
}

.share-label { font-size: 0.8125rem; }

.post-card-title-sm { font-size: 0.9rem; }

.post-date-xs { font-size: 0.775rem; }

.comment-count-badge {
  background: #f4f4f5;
  color: #71717a;
  font-size: 0.8rem;
  vertical-align: middle;
}

.comment-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.comment-author-link { color: inherit; }

.comment-form-heading { font-size: 1.15rem; }

/* ─── Page hero eyebrow (white muted) ───────────────────── */
.page-hero-eyebrow { color: rgba(255,255,255,.6); }

/* ─── CTA section inner z-index ────────────────────────── */
.cta-inner { z-index: 1; }

/* ─── Footer copy text ─────────────────────────────────── */
.footer-copy { font-size: 0.8125rem; }

.footer-admin-link { opacity: 0.4; }

/* =========================================================
   Post list items (tag / search results)
   ========================================================= */
.post-list-item { align-items: flex-start; }

.post-list-thumb-link { display: block; }

.post-list-thumb {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.post-meta-inline { line-height: 1.4; }

/* =========================================================
   Static page template
   ========================================================= */
.page-featured-image { margin-bottom: 0; }

.page-featured-img {
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.page-content { font-size: 1.0625rem; }

/* ── Contact page ────────────────────────────────────────── */
.contact-info-card {
  padding: 1.5rem 1rem;
  background: #f8fafc;
  border-radius: 12px;
  height: 100%;
}
.contact-info-icon {
  width: 52px;
  height: 52px;
  background: var(--color-primary, #18181b);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 auto 0.75rem;
}
.contact-info-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 4px;
}
.contact-info-value {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}
.contact-info-value a {
  color: var(--color-primary, #18181b);
  text-decoration: none;
}
.contact-info-value a:hover { text-decoration: underline; }
.page-hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 520px;
  margin: 0.75rem auto 0;
}

/* =========================================================
   Search widget form (consistent across sidebar contexts)
   ========================================================= */
.search-widget-form .btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.search-widget-form .btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
