/*
Theme Name: Sunrise House
Theme URI: https://sunrisehouse.blog
Author: Drache
Description: Premium custom theme for Sunrise House Blog
Version: 1.0.0
*/

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --dark: #0f172a;
  --dark-100: #1e293b;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --white: #ffffff;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 80px;
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--dark-100);
  background-color: var(--gray-100);
}

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.site-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--dark);
}

.site-description {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 0;
}

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

.main-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.main-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  border-radius: 8px;
  transition: all 0.2s;
}

.main-menu a:hover,
.main-menu a:focus {
  color: var(--primary);
  background-color: var(--gray-100);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 3px 0;
  transition: all 0.2s;
  border-radius: 2px;
}

@media (max-width: 992px) {
  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    flex-direction: column;
  }
  
  .main-navigation.active {
    display: flex;
  }
  
  .main-menu {
    flex-direction: column;
    width: 100%;
  }
  
  .menu-toggle {
    display: flex;
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 4rem) 0 5rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-100) 50%, #1e293b 100%);
  color: var(--white);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #60a5fa;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero-title span {
  color: #60a5fa;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-description {
  font-size: 1.25rem;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  color: var(--white);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* Main Content */
.main-content {
  padding: 5rem 0;
  background: var(--gray-100);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

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

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

/* Post Card */
.post-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.post-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.post-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.post-title a {
  color: var(--dark);
}

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

.post-excerpt {
  font-size: 0.9375rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.2s;
}

.read-more:hover {
  gap: 0.75rem;
  color: var(--primary-dark);
}

.read-more::after {
  content: '→';
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  transition: all 0.2s;
}

.page-numbers:hover {
  background: var(--gray-100);
  color: var(--dark);
}

.page-numbers.current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: var(--gray-300);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.footer-description {
  font-size: 0.9375rem;
  color: var(--gray-400);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-column h4 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 1.25rem;
}

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

.footer-menu li {
  margin-bottom: 0.75rem;
}

.footer-menu a {
  color: var(--gray-400);
  font-size: 0.9375rem;
  transition: all 0.2s;
}

.footer-menu a:hover {
  color: var(--white);
  padding-left: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer-meta {
  display: flex;
  gap: 1.5rem;
}

.footer-meta a {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer-meta a:hover {
  color: var(--white);
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 8px rgba(233, 69, 96, 0.5);
}

/* Scroll to Top */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 100;
}

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

.scroll-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* Single Post */
.single-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-100) 100%);
  padding: calc(var(--header-height) + 4rem) 0 4rem;
  color: var(--white);
}

.single-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.single-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.meta-views {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  color: var(--gray-400);
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--white);
}

.author-role {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.single-content {
  background: var(--white);
  padding: 4rem 0;
}

.single-content .container {
  max-width: 800px;
}

.single-content h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.single-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.single-content p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

.single-content img {
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.single-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--gray-100);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.single-content blockquote p {
  margin: 0;
}

.post-navigation {
  background: var(--gray-100);
  padding: 2rem 0;
  border-top: 1px solid var(--gray-200);
}

.post-navigation .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.nav-previous a,
.nav-next a {
  display: block;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.nav-previous a:hover,
.nav-next a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.nav-previous span,
.nav-next span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

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

/* No Posts */
.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.no-posts h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.no-posts p {
  color: var(--gray-500);
}

/* WordPress Alignments */
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; }

/* WordPress Captions */
.wp-caption {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.wp-caption img {
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-align: center;
}

/* Screen Reader Text */
.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;
}

/* ==========================================
   ENHANCED SINGLE POST TEMPLATE
   ========================================== */

/* Featured Image Hero */
.single-featured-image {
  height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 0;
}
.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.6) 100%);
}

/* Single Layout */
.single-layout {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 0;
}

/* Share Sidebar (Sticky) */
.single-share-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}
.share-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.share-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 0.25rem;
}
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: transform 0.2s, opacity 0.2s;
  border: none;
  cursor: pointer;
  background: var(--dark-100);
}
.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
  color: var(--white);
}
.share-x { background: #000; }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }
.share-copy { background: var(--gray-500); }

/* Single Content */
.single-content {
  min-width: 0;
}
.content-container {
  max-width: 720px;
}
.single-content p {
  font-size: 1.125rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  color: var(--dark-100);
}
.single-content h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}
.single-content h3 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.single-content ul,
.single-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.single-content li {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.single-content strong { color: var(--dark); }
.single-content a { color: var(--primary); text-decoration: underline; }
.single-content a:hover { color: var(--primary-dark); }

/* Blockquote */
.single-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: var(--white);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.single-content blockquote p {
  margin: 0;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--dark);
}

/* Code blocks */
.single-content pre {
  background: var(--dark);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.single-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--gray-200);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.single-content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Tags */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}
.tag-link {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--gray-200);
  color: var(--gray-500);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 100px;
  transition: all 0.2s;
}
.tag-link:hover {
  background: var(--dark-100);
  color: var(--white);
}

/* Author Bio Box */
.author-bio-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 3rem;
  padding: 1.75rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.author-bio-avatar .author-avatar {
  border-radius: 50%;
  width: 80px !important;
  height: 80px !important;
}
.author-bio-content { flex: 1; }
.author-bio-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}
.author-bio-desc {
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.author-bio-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}
.author-bio-link:hover { color: var(--primary-dark); }

/* Related Posts */
.related-posts {
  background: var(--white);
  padding: 4rem 0;
  margin-top: 3rem;
}
.related-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.related-card {
  background: var(--gray-100);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.related-thumb {
  display: block;
  height: 160px;
  overflow: hidden;
}
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.related-card:hover .related-thumb img {
  transform: scale(1.05);
}
.related-info {
  padding: 1rem 1.25rem 1.25rem;
}
.related-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.related-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.4rem 0 0.5rem;
  line-height: 1.4;
}
.related-card-title a { color: var(--dark); }
.related-card-title a:hover { color: var(--primary); }
.related-date {
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* Post Navigation */
.post-navigation {
  background: var(--white);
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.post-nav-next {
  text-align: right;
}
.post-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.post-nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  transition: color 0.2s;
}
.post-nav-title:hover { color: var(--primary); }

/* Comments */
.single-comments {
  padding: 3rem 0 5rem;
  max-width: 720px;
}
.comments-wrapper { }
.comment-reply-title { font-size: 1.25rem; margin-bottom: 1.5rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
  .single-featured-image { height: 250px; }
  .single-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 0;
  }
  .single-share-sidebar {
    position: static;
    order: -1;
  }
  .share-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }
  .share-label {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 0;
  }
  .related-grid { grid-template-columns: 1fr; }
  .author-bio-box { flex-direction: column; }
  .single-content p { font-size: 1.05rem; }
}

/* ==========================================
   COMMENT SYSTEM STYLING
   ========================================== */

#comments {
  margin-top: 3rem;
}

.comments-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

/* Comment List */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.comment:last-child { border-bottom: none; }
.comment-body { display: flex; gap: 1rem; }
.comment-avatar {
  flex-shrink: 0;
}
.comment-avatar .avatar {
  border-radius: 50%;
  width: 48px !important;
  height: 48px !important;
}
.comment-content-wrap { flex: 1; min-width: 0; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.comment-author {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
}
.comment-author a { color: var(--dark); }
.comment-author a:hover { color: var(--primary); }
.comment-date {
  font-size: 0.8rem;
  color: var(--gray-400);
}
.comment-date a { color: var(--gray-400); }
.comment-content {
  font-size: 0.975rem;
  line-height: 1.7;
  color: var(--dark-100);
}
.comment-content p {
  margin-bottom: 0.75rem !important;
  font-size: 0.975rem !important;
}
.comment-content p:last-child { margin-bottom: 0 !important; }
.comment-reply-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.5rem;
  display: inline-block;
}
.comment-reply-link:hover { color: var(--primary-dark); }

/* Children */
.children {
  list-style: none;
  padding-left: 3.5rem;
  margin-top: 1rem;
}

/* Comment Form */
.comment-reply-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--dark-100);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}
.comment-form-comment { margin-bottom: 1.25rem; }
.comment-form-author,
.comment-form-email,
.comment-form-url {
  margin-bottom: 1.25rem;
  flex: 1;
}
.comment-form-author { margin-right: 1rem; }
.form-submit {
  margin-top: 1.5rem;
}
.submit {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.submit:hover { background: var(--primary-dark); }
.submit:active { transform: scale(0.98); }

/* Comment Navigation */
.comment-navigation {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.nav-previous a,
.nav-next a {
  color: var(--primary);
  font-weight: 600;
}

/* Awaiting moderation */
.comment-moderated {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ==========================================
   404 ERROR PAGE
   ========================================== */

.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: var(--gray-100);
}
.error-container {
  text-align: center;
  padding: 4rem 0;
}
.error-content { }
.error-code {
  font-size: 8rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
}
.error-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dark);
}
.error-desc {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.error-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.btn-primary {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-secondary {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--white);
  color: var(--dark);
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid var(--gray-300);
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.error-search {
  max-width: 400px;
  margin: 0 auto 3rem;
  text-align: left;
}
.error-search h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.error-search .search-form {
  display: flex;
  gap: 0.5rem;
}
.error-search .search-form input[type="search"] {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.error-search .search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
}
.error-search .search-form button {
  padding: 0.7rem 1.25rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* Search form (global + search page) */
.search-form {
  display: flex;
  gap: 0.5rem;
}
.search-form input[type="search"],
.search-form input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--dark-100);
  background: var(--white);
  transition: border-color 0.2s;
}
.search-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.search-form button,
.search-form input[type="submit"] {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: background 0.2s;
}
.search-form button:hover,
.search-form input[type="submit"]:hover {
  background: var(--primary-dark);
}

.error-suggestions {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}
.error-suggestions h3 { font-size: 1rem; margin-bottom: 1rem; }
.suggestion-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.suggestion-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: var(--white);
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  color: var(--dark);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.suggestion-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.suggestion-link .count {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-weight: 400;
}

/* ==========================================
   SEARCH PAGE
   ========================================== */

.search-page { padding: 3rem 0 5rem; }
.page-header { margin-bottom: 3rem; text-align: center; }
.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.search-query { color: var(--primary); }
.search-stats {
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* Search results grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.post-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.post-card-thumb {
  display: block;
  height: 200px;
  overflow: hidden;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb-placeholder {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-icon {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
}
.post-card-body { padding: 1.25rem; }
.post-card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.post-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.4rem 0 0.75rem;
  line-height: 1.4;
}
.post-card-title a { color: var(--dark); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-400);
  flex-wrap: wrap;
}
.meta-sep { color: var(--gray-300); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.pagination .page-numbers {
  padding: 0.6rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  transition: all 0.2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* No results */
.no-results {
  text-align: center;
  padding: 4rem 0;
}
.no-results-icon {
  font-size: 4rem;
  color: var(--gray-300);
  margin-bottom: 1rem;
}
.no-results h2 { margin-bottom: 0.75rem; }
.no-results p { color: var(--gray-500); margin-bottom: 2rem; }
.no-results-categories h3 { font-size: 1rem; margin-bottom: 1rem; }
.category-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.category-pill {
  padding: 0.5rem 1rem;
  background: var(--gray-200);
  color: var(--dark);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.category-pill:hover { background: var(--primary); color: var(--white); }

/* Mobile search */
@media (max-width: 768px) {
  .error-code { font-size: 5rem; }
  .error-title { font-size: 1.5rem; }
  .error-actions { flex-direction: column; align-items: center; }
  .suggestion-links { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
}
