/* ==========================================================================
   Oficina de Oração - "Sacred Garden" Design System
   A contemplative digital sanctuary with warm, organic aesthetics
   ========================================================================== */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
  /* === Primary - Olive Tones === */
  --olive-deep: #4A5638;
  --olive-muted: #6B7B4C;
  --olive-soft: #8B9B6B;
  --olive-pale: #D4DCC4;
  --olive-ghost: #E8ECE0;

  /* === Warm Neutrals - Parchment/Cream === */
  --parchment: #FAF6F0;
  --parchment-warm: #F5EDE0;
  --cream: #FFFDF8;
  --sand: #E8DFD0;

  /* === Accent - Aged Gold === */
  --gold: #C9A227;
  --gold-muted: #B8975A;
  --gold-pale: #E8DDB5;
  --gold-dark: #8B6914;

  /* === Text - Warm Browns === */
  --ink: #2D2923;
  --ink-soft: #5C534A;
  --ink-muted: #8B8278;
  --ink-faint: #B5AEA5;

  /* === Liturgical Accent Colors === */
  --advent-purple: #5C4A6E;
  --lent-purple: #6B4D6E;
  --ordinary-green: #4A5638;
  --christmas-gold: #C9A227;
  --easter-white: #FFFDF8;

  /* === Semantic Colors === */
  --success: #5A7340;
  --warning: #B8860B;
  --error: #A65D57;
  --info: #5B7B8C;

  /* === Shadows === */
  --shadow-sm: 0 1px 2px rgba(45, 41, 35, 0.05);
  --shadow-md: 0 4px 12px rgba(45, 41, 35, 0.08);
  --shadow-lg: 0 8px 24px rgba(45, 41, 35, 0.12);
  --shadow-xl: 0 16px 48px rgba(45, 41, 35, 0.16);
  --shadow-glow: 0 0 20px rgba(201, 162, 39, 0.15);

  /* === Typography === */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-accent: 'Newsreader', Georgia, serif;
  --font-ui: 'Source Sans 3', -apple-system, sans-serif;

  /* === Fluid Type Scale === */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 0.9375rem);
  --text-base: clamp(1rem, 0.925rem + 0.375vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 2rem + 3.75vw, 4rem);

  /* === Spacing === */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

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

  /* === Transitions === */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* === Z-Index Scale === */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* === Layout === */
  --container-max: 1200px;
  --content-max: 720px;
  --sidebar-width: 320px;
  --header-height: 4rem;
  --mobile-nav-height: 4rem;
}

/* ==========================================================================
   2. DARK MODE - "Candlelit Chapel"
   ========================================================================== */

.dark {
  --parchment: #1A1815;
  --parchment-warm: #1F1C18;
  --cream: #252220;
  --sand: #2D2A27;

  --ink: #E8E4DE;
  --ink-soft: #C5BFB5;
  --ink-muted: #8B857B;
  --ink-faint: #5C5650;

  --olive-pale: #3D4A32;
  --olive-ghost: #2A3225;

  --gold: #D4B456;
  --gold-muted: #C9A84A;
  --gold-pale: #4A4230;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(212, 180, 86, 0.2);
}

/* ==========================================================================
   3. BASE STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--parchment);
  transition: background-color var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
  min-height: 100vh;
  padding-bottom: var(--mobile-nav-height);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Subtle paper texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
  z-index: -1;
}

.dark body::before {
  opacity: 0.03;
}

/* Dark mode warm vignette */
.dark body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

h1 { font-size: var(--text-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-3xl); letter-spacing: -0.015em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: 700; }

p {
  margin: 0 0 var(--space-lg);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--olive-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--olive-deep);
}

.dark a {
  color: var(--olive-soft);
}

.dark a:hover {
  color: var(--gold);
}

strong, b {
  font-weight: 600;
  color: var(--ink);
}

/* Selection */
::selection {
  background-color: var(--gold-pale);
  color: var(--ink);
}

.dark ::selection {
  background-color: var(--gold-dark);
  color: var(--cream);
}

/* ==========================================================================
   5. LAYOUT COMPONENTS
   ========================================================================== */

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

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .content-wrapper {
    flex-direction: row;
  }

  .content-main {
    flex: 1;
    min-width: 0;
  }

  .content-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
  }
}

/* ==========================================================================
   6. HEADER - Desktop
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--cream);
  border-bottom: 1px solid var(--sand);
  transition: background-color var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.dark .site-header {
  background: var(--cream);
  border-color: var(--sand);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--olive-deep);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.site-logo:hover {
  color: var(--gold-dark);
}

.dark .site-logo {
  color: var(--olive-soft);
}

.dark .site-logo:hover {
  color: var(--gold);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--olive-muted);
  transition: color var(--duration-fast) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.site-logo:hover .logo-icon {
  color: var(--gold);
  transform: rotate(-5deg);
}

/* Desktop Nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover {
  color: var(--olive-deep);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--olive-deep);
}

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

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.btn-icon:hover {
  background: var(--olive-ghost);
  color: var(--olive-deep);
}

.btn-icon:active {
  transform: scale(0.95);
}

.dark .btn-icon:hover {
  background: var(--sand);
  color: var(--gold);
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ==========================================================================
   7. MOBILE BOTTOM NAVIGATION
   ========================================================================== */

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: var(--cream);
  border-top: 1px solid var(--sand);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform var(--duration-normal) var(--ease-out);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--mobile-nav-height);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  padding: var(--space-sm) var(--space-md);
  color: var(--ink-muted);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--duration-fast) var(--ease-out);
}

.mobile-nav-item:active svg {
  transform: scale(0.9);
}

.mobile-nav-item.active {
  color: var(--olive-deep);
}

.dark .mobile-nav-item.active {
  color: var(--gold);
}

/* Hide nav on scroll down, show on scroll up */
.mobile-nav.hidden {
  transform: translateY(100%);
}

/* ==========================================================================
   8. POST CARDS
   ========================================================================== */

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

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

.dark .post-card {
  background: var(--sand);
}

/* Card Image */
.post-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

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

/* Category Badge on Image */
.post-card-category {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
}

/* Card Content */
.post-card-content {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-md);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
}

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

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

.post-card-excerpt {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Meta */
.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--sand);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.post-meta-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-meta-item svg {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

.post-meta-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-stat svg {
  width: 1rem;
  height: 1rem;
  color: var(--ink-muted);
}

/* Card Tags */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ==========================================================================
   9. CATEGORY PILLS
   ========================================================================== */

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.category-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Default / Palavra do Dia */
.category-pill--palavra-do-dia,
.category-pill--default {
  background: var(--olive-pale);
  color: var(--olive-deep);
}

/* Orações */
.category-pill--oracoes {
  background: var(--gold-pale);
  color: var(--gold-dark);
}

/* Meditações */
.category-pill--meditacoes {
  background: #E8E0F0;
  color: #5C4A6E;
}

.dark .category-pill--meditacoes {
  background: #3D3650;
  color: #C4B5E0;
}

/* Advento */
.category-pill--advento {
  background: #E8E0F0;
  color: var(--advent-purple);
}

.dark .category-pill--advento {
  background: #3D3650;
  color: #C4B5E0;
}

/* ==========================================================================
   10. TAG CHIPS
   ========================================================================== */

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--parchment-warm);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease-out);
}

.tag-chip:hover {
  background: var(--olive-ghost);
  color: var(--olive-deep);
  border-color: var(--olive-pale);
}

.dark .tag-chip {
  background: var(--sand);
}

.dark .tag-chip:hover {
  background: var(--olive-pale);
  color: var(--gold);
}

/* ==========================================================================
   11. SCRIPTURE BLOCKS
   ========================================================================== */

.scripture-block,
blockquote,
.wp-block-quote {
  position: relative;
  margin: var(--space-2xl) 0;
  padding: var(--space-xl) var(--space-xl) var(--space-xl) var(--space-2xl);
  background: linear-gradient(
    135deg,
    var(--parchment-warm) 0%,
    var(--cream) 100%
  );
  border-left: 3px solid var(--gold-muted);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--ink-soft);
}

.scripture-block::before,
blockquote::before,
.wp-block-quote::before {
  content: '"';
  position: absolute;
  top: var(--space-sm);
  left: var(--space-md);
  font-size: 4rem;
  font-family: var(--font-display);
  color: var(--gold-pale);
  line-height: 1;
  opacity: 0.6;
}

.scripture-block p,
blockquote p,
.wp-block-quote p {
  margin: 0 0 var(--space-sm);
}

.scripture-block p:last-child,
blockquote p:last-child,
.wp-block-quote p:last-child {
  margin-bottom: 0;
}

.scripture-block cite,
blockquote cite,
.wp-block-quote cite {
  display: block;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--gold-muted);
  text-align: right;
}

/* Dark mode */
.dark .scripture-block,
.dark blockquote,
.dark .wp-block-quote {
  background: linear-gradient(
    135deg,
    rgba(74, 66, 48, 0.4) 0%,
    rgba(45, 42, 39, 0.6) 100%
  );
  border-left-color: var(--gold);
  color: var(--ink-soft);
}

.dark .scripture-block::before,
.dark blockquote::before,
.dark .wp-block-quote::before {
  color: var(--gold-dark);
  opacity: 0.4;
}

/* ==========================================================================
   12. VERSE BLOCKS (Sacred Text)
   ========================================================================== */

pre.wp-block-verse,
.wp-block-verse {
  position: relative;
  margin: var(--space-2xl) 0;
  padding: var(--space-2xl);
  background: linear-gradient(
    145deg,
    #FFFBEB 0%,
    #FEF3C7 100%
  );
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-md),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.9;
  color: #5C4A2A;
  white-space: pre-wrap;
  word-wrap: break-word;
}

pre.wp-block-verse::before,
.wp-block-verse::before {
  content: '✝';
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.dark pre.wp-block-verse,
.dark .wp-block-verse {
  background: linear-gradient(
    145deg,
    rgba(74, 58, 40, 0.6) 0%,
    rgba(61, 48, 32, 0.8) 100%
  );
  color: #F5E6C8;
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   13. OLIVE BRANCH DIVIDER
   ========================================================================== */

.olive-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-2xl) 0;
  color: var(--olive-muted);
}

.olive-divider svg {
  width: 200px;
  height: 24px;
}

hr,
hr.wp-block-separator,
.wp-block-separator {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--sand) 20%,
    var(--olive-pale) 50%,
    var(--sand) 80%,
    transparent 100%
  );
  margin: var(--space-2xl) 0;
}

/* ==========================================================================
   14. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

/* Primary Button */
.btn-primary {
  background: var(--olive-muted);
  color: white;
}

.btn-primary:hover {
  background: var(--olive-deep);
  box-shadow: var(--shadow-md);
}

/* Secondary Button */
.btn-secondary {
  background: var(--parchment-warm);
  color: var(--ink);
  border: 1px solid var(--sand);
}

.btn-secondary:hover {
  background: var(--olive-ghost);
  border-color: var(--olive-pale);
}

/* Gold/Accent Button */
.btn-gold {
  background: var(--gold);
  color: white;
}

.btn-gold:hover {
  background: var(--gold-dark);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   15. LIKE/PRAY BUTTON
   ========================================================================== */

.pray-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.25rem;
  background: var(--parchment-warm);
  border: 1px solid var(--sand);
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.pray-btn:hover {
  background: var(--olive-ghost);
  border-color: var(--olive-pale);
  color: var(--olive-deep);
}

.pray-btn:active {
  transform: scale(0.97);
}

.pray-btn--active {
  background: var(--gold-pale);
  border-color: var(--gold-muted);
  color: var(--gold-dark);
  cursor: default;
}

.pray-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--duration-normal) var(--ease-out);
}

.pray-btn:hover svg {
  transform: scale(1.1);
}

.pray-btn--active svg {
  animation: prayPulse 0.5s var(--ease-out);
}

.pray-count {
  font-weight: 600;
}

.pray-text {
  font-size: var(--text-xs);
  opacity: 0.8;
}

@keyframes prayPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ==========================================================================
   15B. POST ARTICLE PAGE
   ========================================================================== */

.post-article {
  background: var(--parchment);
}

.post-header {
  margin-bottom: var(--space-2xl);
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.post-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
  color: var(--ink-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.post-meta-item svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.7;
}

.post-featured-image {
  margin: 0 0 var(--space-2xl);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.post-content {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--ink);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.post-content a {
  color: var(--olive-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--sand);
  margin-top: var(--space-2xl);
}

/* Post Actions Bar */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--sand);
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.share-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-right: var(--space-xs);
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--parchment-warm);
  color: var(--ink-soft);
  transition: all var(--duration-fast) var(--ease-out);
}

.share-btn:hover {
  background: var(--ink);
  color: white;
  transform: translateY(-2px);
}

.share-btn--whatsapp:hover {
  background: #25D366;
}

.share-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ==========================================================================
   15C. COMMENTS SECTION
   ========================================================================== */

.comments-section {
  margin-top: var(--space-3xl);
}

.comments-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-xl);
}

.comments-title svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--olive-muted);
}

/* Comment Form */
.comment-form {
  background: var(--parchment-warm);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--olive-muted);
  box-shadow: 0 0 0 3px var(--olive-ghost);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--ink-muted);
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  animation: spin 0.8s linear infinite;
}

.dark .comment-form {
  background: var(--sand);
}

.dark .form-input,
.dark .form-textarea {
  background: var(--parchment);
  border-color: var(--ink-faint);
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.comment-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dark .comment-card {
  background: var(--sand);
}

.comment-avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--olive-muted) 0%, var(--gold-muted) 100%);
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 700;
  color: white;
}

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

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.comment-author {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--ink);
}

.comment-date {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.comment-content {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0;
}

/* ==========================================================================
   16. READING PROGRESS BAR
   ========================================================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: calc(var(--z-sticky) + 1);
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--olive-muted) 0%,
    var(--gold) 100%
  );
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 50ms linear;
}

/* ==========================================================================
   17. PODCAST EMBED
   ========================================================================== */

.podcast-embed {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.podcast-embed iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ==========================================================================
   18. YOUTUBE EMBED
   ========================================================================== */

.wp-block-embed,
.wp-block-embed-youtube {
  margin: var(--space-2xl) 0;
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   19. SEARCH
   ========================================================================== */

.search-input {
  width: 100%;
  padding: 1rem 1.25rem;
  padding-left: 3rem;
  background: var(--cream);
  border: 2px solid var(--sand);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.search-input:focus {
  border-color: var(--olive-muted);
  box-shadow: 0 0 0 4px var(--olive-ghost);
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.dark .search-input {
  background: var(--sand);
  border-color: var(--ink-faint);
}

.dark .search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 180, 86, 0.2);
}

/* ==========================================================================
   20. COMMENT FORM
   ========================================================================== */

.comment-form {
  background: var(--parchment-warm);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--olive-muted);
  box-shadow: 0 0 0 3px var(--olive-ghost);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.dark .comment-form {
  background: var(--sand);
}

.dark .comment-form input,
.dark .comment-form textarea {
  background: var(--parchment);
  border-color: var(--ink-faint);
}

/* ==========================================================================
   21. SIDEBAR
   ========================================================================== */

.sidebar-section {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.dark .sidebar-section {
  background: var(--sand);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--olive-pale);
}

.sidebar-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--olive-muted);
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-out);
}

.category-list a:hover {
  color: var(--olive-deep);
}

.category-count {
  background: var(--parchment-warm);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ==========================================================================
   22. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--parchment-warm);
  border-top: 1px solid var(--sand);
  padding: var(--space-3xl) 0;
  margin-top: var(--space-4xl);
}

.dark .site-footer {
  background: var(--sand);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--olive-deep);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.footer-copyright {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* ==========================================================================
   23. ANIMATIONS
   ========================================================================== */

/* Fade in up - for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

/* Staggered children */
.stagger-children > * {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 75ms; }
.stagger-children > *:nth-child(3) { animation-delay: 150ms; }
.stagger-children > *:nth-child(4) { animation-delay: 225ms; }
.stagger-children > *:nth-child(5) { animation-delay: 300ms; }
.stagger-children > *:nth-child(6) { animation-delay: 375ms; }
.stagger-children > *:nth-child(7) { animation-delay: 450ms; }
.stagger-children > *:nth-child(8) { animation-delay: 525ms; }
.stagger-children > *:nth-child(9) { animation-delay: 600ms; }
.stagger-children > *:nth-child(10) { animation-delay: 675ms; }

/* Breathing animation for meditation */
@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

.animate-breathe {
  animation: breathe 4s var(--ease-in-out) infinite;
}

/* Pulse for notifications */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}

/* Slide in from bottom (for mobile nav items) */
@keyframes slideInBottom {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in-bottom {
  animation: slideInBottom 0.4s var(--ease-out) both;
}

/* ==========================================================================
   24. UTILITY CLASSES
   ========================================================================== */

/* Visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prose container */
.prose {
  max-width: var(--content-max);
}

.prose > * + * {
  margin-top: var(--space-lg);
}

.prose h3 {
  margin-top: var(--space-2xl);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--sand);
  color: var(--olive-deep);
}

.dark .prose h3 {
  border-color: var(--ink-faint);
  color: var(--gold);
}

/* Center content */
.text-center { text-align: center; }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing */
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }

/* ==========================================================================
   25. HTMX LOADING STATES
   ========================================================================== */

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-flex;
}

.htmx-request.htmx-indicator {
  display: inline-flex;
}

/* Loading spinner */
.loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--sand);
  border-top-color: var(--olive-muted);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--sand) 25%,
    var(--parchment-warm) 50%,
    var(--sand) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

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

/* ==========================================================================
   26. SEARCH PAGE
   ========================================================================== */

.search-form {
  margin-bottom: var(--space-2xl);
}

.search-wrapper {
  display: flex;
  gap: var(--space-sm);
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink-muted);
  pointer-events: none;
}

.search-wrapper .search-input {
  flex: 1;
  padding-left: 3rem;
}

.search-results-count {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-xl);
}

.search-results-count strong {
  color: var(--ink);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
}

.empty-state svg {
  width: 5rem;
  height: 5rem;
  color: var(--ink-faint);
  margin: 0 auto var(--space-lg);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: var(--text-base);
  color: var(--ink-muted);
  margin: 0;
}

.empty-state-hint {
  font-size: var(--text-sm);
  color: var(--ink-faint);
  margin-top: var(--space-sm);
}

/* ==========================================================================
   27. CATEGORY PAGE
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-md);
}

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

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

.breadcrumb svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.5;
}

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

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--olive-ghost);
  border-radius: var(--radius-lg);
  color: var(--olive-deep);
}

.category-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.dark .category-icon {
  background: var(--olive-pale);
  color: var(--gold);
}

/* ==========================================================================
   28. ABOUT PAGE
   ========================================================================== */

.about-page {
  max-width: var(--content-max);
}

.about-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.about-logo {
  width: 6rem;
  height: 6rem;
  margin: 0 auto var(--space-xl);
  color: var(--olive-muted);
}

.about-logo svg {
  width: 100%;
  height: 100%;
}

.about-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.about-lead {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 40ch;
  margin: 0 auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  padding: var(--space-xl);
  background: var(--parchment-warm);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

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

.dark .feature-card {
  background: var(--sand);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-md);
  background: var(--olive-ghost);
  border-radius: var(--radius-full);
  color: var(--olive-deep);
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.dark .feature-icon {
  background: var(--olive-pale);
  color: var(--gold);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0;
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--parchment-warm);
  border-radius: var(--radius-full);
  color: var(--ink-soft);
  transition: all var(--duration-fast) var(--ease-out);
}

.social-link:hover {
  background: var(--olive-muted);
  color: white;
  transform: translateY(-2px);
}

.social-link svg {
  width: 1.5rem;
  height: 1.5rem;
}

.dark .social-link {
  background: var(--sand);
}

.dark .social-link:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ==========================================================================
   29. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 767px) {
  /* Tighter spacing on mobile */
  .container {
    padding: 0 var(--space-md);
  }

  /* Full width cards on mobile */
  .post-card {
    border-radius: 0;
    margin-left: calc(var(--space-md) * -1);
    margin-right: calc(var(--space-md) * -1);
    box-shadow: none;
    border-bottom: 1px solid var(--sand);
  }

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

  /* Adjust header for mobile */
  .site-header {
    position: relative;
  }

  .header-height {
    height: 3.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet adjustments */
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .post-grid .post-card:first-child {
    grid-column: span 2;
  }
}

/* ==========================================================================
   27. PRINT STYLES
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .mobile-nav,
  .reading-progress,
  .pray-button,
  .comment-form {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}
