/* Theme Name: Moonfires Starter
Theme URI: https://moonfires.com
Author: Moonfires
Author URI: https://moonfires.com
Description: A lightweight, fast, and modern WordPress theme built for Moonfires.com - a multilingual blog about Hindu Dharma, Sanatan culture, Indian temples, forts, baby names, and more.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: moonfires-starter
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, rtl-language-support
*/

/* ============================================
   DESIGN SYSTEM - CSS Custom Properties
   ============================================ */
:root {
  /* Brand Colors - Saffron/Orange Palette */
  --color-primary: #E8590C;
  --color-primary-hover: #D04E09;
  --color-primary-light: #FFF3E0;
  --color-primary-glow: rgba(232, 89, 12, 0.15);
  --color-secondary: #C2410C;
  --color-accent: #F59E0B;
  --color-accent-light: #FEF3C7;

  /* Neutral Colors */
  --color-bg: #FAFAF9;
  --color-surface: #FFFFFF;
  --color-surface-raised: #FFFFFF;
  --color-surface-hover: #F5F5F4;
  --color-border: #E7E5E4;
  --color-border-light: #F5F5F4;

  /* Text Colors */
  --color-text: #1C1917;
  --color-text-secondary: #57534E;
  --color-text-tertiary: #A8A29E;
  --color-text-inverse: #FAFAF9;

  /* Semantic Colors */
  --color-success: #16A34A;
  --color-error: #DC2626;
  --color-warning: #F59E0B;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-devanagari: 'Noto Sans Devanagari', 'Inter', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Font Sizes - Fluid */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1rem, 0.925rem + 0.375vw, 1.125rem);
  --text-xl: clamp(1.15rem, 1rem + 0.75vw, 1.25rem);
  --text-2xl: clamp(1.35rem, 1.1rem + 1.25vw, 1.5rem);
  --text-3xl: clamp(1.6rem, 1.2rem + 2vw, 1.875rem);
  --text-4xl: clamp(1.9rem, 1.3rem + 3vw, 2.25rem);
  --text-5xl: clamp(2.2rem, 1.4rem + 4vw, 3rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

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

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 780px;
  --header-height: 70px;
  --nav-height: 50px;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --color-bg: #0C0A09;
  --color-surface: #1C1917;
  --color-surface-raised: #292524;
  --color-surface-hover: #292524;
  --color-border: #44403C;
  --color-border-light: #292524;
  --color-text: #FAFAF9;
  --color-text-secondary: #A8A29E;
  --color-text-tertiary: #78716C;
  --color-text-inverse: #1C1917;
  --color-primary-light: rgba(232, 89, 12, 0.15);
  --color-primary-glow: rgba(232, 89, 12, 0.25);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Devanagari script detection */
:lang(hi), :lang(mr), .devanagari {
  font-family: var(--font-devanagari);
  line-height: 1.8;
}

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

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

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); }

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

/* ============================================
   LAYOUT - Container & Grid
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

@media (max-width: 640px) {
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

[data-theme="dark"] .site-header {
  background: rgba(28,25,23,0.95);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  gap: var(--space-4);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-brand__logo img {
  height: 40px;
  width: auto;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.site-brand__name span {
  color: var(--color-primary);
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 400px;
  margin: 0 var(--space-8);
}

.header-search__form {
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  transition: all var(--transition-fast);
}

.header-search__form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.header-search__input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  padding: var(--space-1) 0;
}

.header-search__input::placeholder {
  color: var(--color-text-tertiary);
}

.header-search__btn {
  background: none;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.header-search__btn:hover {
  color: var(--color-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

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

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
}

.header-social a:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Dark Mode Toggle */
.dark-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.dark-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Dropdown */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.nav-menu .sub-menu a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Support Button in Nav */
.nav-cta a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5) !important;
  background: var(--color-primary);
  color: var(--color-text-inverse) !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--text-sm);
  border-bottom: none !important;
  transition: all var(--transition-fast);
}

.nav-cta a:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-text);
  font-size: 1.3rem;
  line-height: 1;
}

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .header-search { display: none; }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    z-index: 999;
  }

  .nav-menu.is-open { display: flex; }

  .nav-menu > li > a {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav-menu .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: var(--space-4);
    background: transparent;
  }

  .header-social { display: none; }
}

/* ============================================
   HERO SECTION (Homepage)
   ============================================ */
.hero {
  position: relative;
  height: clamp(350px, 50vh, 500px);
  overflow: hidden;
  border-radius: var(--radius-2xl);
  margin: var(--space-6) 0;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease;
}

.hero:hover .hero__image {
  transform: scale(1.05);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.4) 40%,
    rgba(0,0,0,0.1) 100%
  );
}

.hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-8);
  color: #fff;
}

.hero__category {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--text-4xl);
  color: #fff;
  margin-bottom: var(--space-3);
  line-height: 1.2;
  max-width: 700px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.8);
}

.hero__meta svg {
  width: 14px;
  height: 14px;
  margin-right: var(--space-1);
}

@media (max-width: 640px) {
  .hero { height: 300px; border-radius: var(--radius-xl); }
  .hero__content { padding: var(--space-5); }
  .hero__title { font-size: var(--text-2xl); }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section {
  padding: var(--space-12) 0;
}

.section--alt {
  background: var(--color-surface);
}

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

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  position: relative;
  padding-left: var(--space-4);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.section-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  transition: gap var(--transition-fast);
}

.section-link:hover {
  gap: var(--space-2);
}

/* ============================================
   POST CARDS
   ============================================ */
.post-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

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

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

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

.post-card:hover .post-card__image {
  transform: scale(1.08);
}

.post-card__category {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}

.post-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__title a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

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

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-4);
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.post-card__date {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Horizontal Card Variant */
.post-card--horizontal {
  flex-direction: row;
}

.post-card--horizontal .post-card__image-wrap {
  width: 280px;
  min-width: 280px;
  aspect-ratio: auto;
}

.post-card--horizontal .post-card__body {
  padding: var(--space-5) var(--space-6);
}

@media (max-width: 640px) {
  .post-card--horizontal {
    flex-direction: column;
  }
  .post-card--horizontal .post-card__image-wrap {
    width: 100%;
    min-width: auto;
    aspect-ratio: 16/10;
  }
}

/* Small Card Variant */
.post-card--small {
  flex-direction: row;
  border: none;
  background: transparent;
  gap: var(--space-3);
  border-radius: 0;
}

.post-card--small:hover {
  transform: none;
  box-shadow: none;
}

.post-card--small .post-card__image-wrap {
  width: 80px;
  min-width: 80px;
  height: 80px;
  aspect-ratio: 1;
  border-radius: var(--radius);
}

.post-card--small .post-card__body {
  padding: 0;
}

.post-card--small .post-card__title {
  font-size: var(--text-sm);
  -webkit-line-clamp: 2;
  margin-bottom: var(--space-2);
}

.post-card--small .post-card__meta {
  border: none;
  padding: 0;
}

/* ============================================
   BABY NAME CARDS
   ============================================ */
.name-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}

.name-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.name-card__name {
  font-family: var(--font-devanagari);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.name-card__meaning {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.name-card__gender {
  display: inline-block;
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.name-card__gender--boy {
  background: #DBEAFE;
  color: #2563EB;
}

.name-card__gender--girl {
  background: #FCE7F3;
  color: #DB2777;
}

/* Names Horizontal Scroll */
.names-scroll {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.names-scroll::-webkit-scrollbar {
  height: 4px;
}

.names-scroll::-webkit-scrollbar-track {
  background: var(--color-border-light);
  border-radius: var(--radius-full);
}

.names-scroll::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.names-scroll .name-card {
  min-width: 160px;
  scroll-snap-align: start;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-header {
  padding: var(--space-8) 0;
  text-align: center;
}

.single-header__category {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.single-header__title {
  font-size: var(--text-4xl);
  max-width: 800px;
  margin: 0 auto var(--space-5);
  line-height: 1.25;
}

.single-header__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.single-header__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.single-featured {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
  max-height: 500px;
}

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

/* Post Content */
.post-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  font-size: var(--text-lg);
  line-height: 1.85;
}

.post-content h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-5);
}

.post-content h3 {
  font-size: var(--text-2xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.post-content p {
  margin-bottom: var(--space-5);
}

.post-content img {
  border-radius: var(--radius-xl);
  margin: var(--space-6) 0;
}

.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  background: var(--color-primary-light);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.post-content ul, .post-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
  margin-bottom: var(--space-2);
}

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

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
}

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

.post-content th {
  background: var(--color-surface-hover);
  font-weight: 600;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

.share-buttons__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-right: var(--space-2);
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  background: transparent;
  cursor: pointer;
  font-size: var(--text-sm);
}

.share-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Related Posts */
.related-posts {
  padding: var(--space-12) 0;
}

/* Post Navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.post-nav__item--next {
  text-align: right;
}

.post-nav__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
}

.post-nav__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

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

@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__item--next { text-align: left; }
}

/* ============================================
   ARCHIVE / CATEGORY PAGES
   ============================================ */
.archive-header {
  padding: var(--space-10) 0 var(--space-6);
  text-align: center;
}

.archive-header__label {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.archive-header__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.archive-header__desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-10) 0;
}

.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.pagination a:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ============================================
   SIDEBAR
   ============================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
}

.sidebar .widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.sidebar .widget-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-16);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  padding: var(--space-12) 0;
}

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

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

.footer-col__title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.footer-col p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.footer-col ul li {
  margin-bottom: var(--space-2);
}

.footer-col ul a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-col ul a::before {
  content: '→';
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.footer-col ul a:hover {
  color: var(--color-primary);
}

.footer-col ul a:hover::before {
  opacity: 1;
}

/* Footer Social */
.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Footer Bottom */
.footer-bottom {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.footer-bottom a {
  color: var(--color-text-tertiary);
}

.footer-bottom a:hover {
  color: var(--color-primary);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-page {
  text-align: center;
  padding: var(--space-20) 0;
}

.error-page__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
}

.error-page__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.error-page__desc {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-header {
  padding: var(--space-10) 0 var(--space-6);
  text-align: center;
}

.search-header__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.search-header__form {
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 100;
}

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

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

/* ============================================
   CTA / NEWSLETTER SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  margin: var(--space-8) 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.05'%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");
}

.cta-section__title {
  color: #fff;
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

.cta-section__desc {
  color: rgba(255,255,255,0.9);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-section .btn {
  background: #fff;
  color: var(--color-primary);
  position: relative;
  z-index: 1;
}

.cta-section .btn:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   FORM MESSAGES
   ============================================ */
.form-message {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-message--success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.form-message--error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ============================================
   LOADING / ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-fade-in-up:nth-child(1) { animation-delay: 0s; }
.animate-fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.animate-fade-in-up:nth-child(3) { animation-delay: 0.2s; }
.animate-fade-in-up:nth-child(4) { animation-delay: 0.3s; }
.animate-fade-in-up:nth-child(5) { animation-delay: 0.4s; }
.animate-fade-in-up:nth-child(6) { animation-delay: 0.5s; }

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

.skeleton {
  background: linear-gradient(90deg, var(--color-surface-hover) 25%, var(--color-bg) 50%, var(--color-surface-hover) 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.wp-block-image {
  margin: var(--space-6) 0;
}

.wp-block-image img {
  border-radius: var(--radius-xl);
}

.alignleft {
  float: left;
  margin: 0 var(--space-6) var(--space-4) 0;
}

.alignright {
  float: right;
  margin: 0 0 var(--space-4) var(--space-6);
}

.aligncenter {
  display: block;
  margin: var(--space-6) auto;
}

.wp-caption-text {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-align: center;
  margin-top: var(--space-2);
}

/* Comments */
.comments-area {
  margin-top: var(--space-12);
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
}

.comments-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

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

.comment {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
}

.comment .children {
  margin-left: var(--space-8);
  margin-top: var(--space-4);
}

.comment-author {
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.comment-meta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-3);
}

.comment-body p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.comment-respond {
  margin-top: var(--space-8);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-header, .site-nav, .site-footer,
  .share-buttons, .related-posts, .back-to-top,
  .comments-area, .post-nav { display: none; }

  .post-content { max-width: 100%; }

  a { color: #000; text-decoration: underline; }
}
