/*
Theme Name: Goodprays Celestial Theme
Theme URI: https://goodprays.com
Author: Antigravity AI
Author URI: https://deepmind.google
Description: A premium celestial dark-mode theme for the Goodprays prayer & reflection platform.
Version: 2.0.0
Text Domain: goodprays-theme
*/

/* ============================================================
   0. GOOGLE FONTS — Cormorant Garant + Inter
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --bg:              #05080f;
  --bg-2:            #080d18;
  --gold:            #C9A84C;
  --gold-light:      #E8C76A;
  --gold-dim:        rgba(201, 168, 76, 0.12);
  --gold-hover:      rgba(201, 168, 76, 0.35);
  --cream:           #F5F0E8;
  --text:            #EEE8DC;
  --text-muted:      #7A8BA0;
  --card-bg:         rgba(255, 255, 255, 0.022);
  --card-border:     rgba(201, 168, 76, 0.10);
  --card-hover-bg:   rgba(201, 168, 76, 0.025);
  --card-hover-border: rgba(201, 168, 76, 0.42);

  /* Typography */
  --font-heading: 'Cormorant Garant', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing & radii */
  --radius-sm:  8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;

  /* Shadows & glows */
  --shadow-card:    0 4px 32px rgba(0, 0, 0, 0.55);
  --shadow-hover:   0 16px 56px rgba(0, 0, 0, 0.6), 0 0 40px rgba(201, 168, 76, 0.06);
  --glow-gold:      0 0 32px rgba(201, 168, 76, 0.15);

  /* Transition */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.5s var(--ease);
}

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

html {
  scroll-behavior: smooth;
}

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

/* Ambient background gradients */
body::before {
  content: '';
  position: fixed;
  bottom: -5%;
  left: -10%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.055) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  will-change: transform;
}

body::after {
  content: '';
  position: fixed;
  top: -8%;
  right: -8%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(ellipse at center, rgba(60, 40, 140, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  will-change: transform;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition);
}

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

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

/* ============================================================
   3. SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(5, 8, 15, 0.92);
  border-color: rgba(201, 168, 76, 0.14);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}

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

.logo-flame {
  width: 32px;
  height: auto;
  flex-shrink: 0;
  transition: transform 0.6s var(--ease);
}

.site-logo:hover .logo-flame {
  transform: translateY(-2px) scale(1.05);
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cream);
  line-height: 1;
}

/* Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}

.nav-menu a {
  display: block;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  transition: color 0.3s, background 0.3s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.04);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.lang-switcher .lang-item {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  transition: all 0.3s var(--ease);
}

.lang-switcher .lang-item:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.04);
}

.lang-switcher .lang-item.is-active {
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.2);
}

/* ============================================================
   4. SITE MAIN
   ============================================================ */
.site-main {
  position: relative;
  z-index: 1;
  min-height: 80vh;
}

.content-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================================
   5. HERO SECTION
   ============================================================ */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: 780px;
  margin: 0 auto;
}

.hero-flame {
  width: 80px;
  height: auto;
  margin-bottom: 2rem;
  animation: flameFloat 4s var(--ease) infinite alternate;
  filter: drop-shadow(0 0 24px rgba(201, 168, 76, 0.4));
}

@keyframes flameFloat {
  0%   { transform: translateY(0px) scale(1); filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.35)); }
  100% { transform: translateY(-8px) scale(1.03); filter: drop-shadow(0 0 36px rgba(201, 168, 76, 0.55)); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-eyebrow::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  background: linear-gradient(160deg, var(--cream) 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.45);
  color: var(--bg);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--card-border);
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.2), transparent);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   6. PRAYERS GRID & CARDS
   ============================================================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.07);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: -0.01em;
}

.section-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.3s;
}

.section-link:hover {
  color: var(--gold);
}

.prayers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-top: 0;
}

.prayer-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* subtle top accent line */
.prayer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.25), transparent);
  transition: opacity 0.5s;
  opacity: 0;
}

.prayer-card:hover {
  background: var(--card-hover-bg);
  border-color: var(--card-hover-border);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.prayer-card:hover::before {
  opacity: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.card-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.18);
  padding: 0.25rem 0.65rem;
  border-radius: 40px;
}

.card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.card-title a {
  color: var(--cream);
  transition: color 0.3s;
}

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

.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  transition: var(--transition);
  align-self: flex-start;
}

.read-more-btn .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.read-more-btn:hover {
  color: var(--gold-light);
}

.read-more-btn:hover .arrow {
  transform: translateX(5px);
}

/* ============================================================
   7. SINGLE ARTICLE
   ============================================================ */
.single-container {
  max-width: 740px;
}

.prayer-article {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 4.5rem 4rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.prayer-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.35), transparent);
}

.article-header {
  text-align: center;
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}

.article-flame {
  width: 44px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 16px rgba(201, 168, 76, 0.45));
  animation: flameFloat 4s var(--ease) infinite alternate;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.article-category {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.18);
  padding: 0.25rem 0.7rem;
  border-radius: 40px;
}

.article-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cream);
  font-style: italic;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: rgba(238, 232, 220, 0.88);
}

.article-content p {
  margin-bottom: 1.75rem;
}

.article-content h2, .article-content h3 {
  font-family: var(--font-heading);
  color: var(--cream);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.article-content h2 { font-size: 1.9rem; }
.article-content h3 { font-size: 1.5rem; }

.article-content blockquote {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  background: var(--gold-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--cream);
}

.article-footer {
  border-top: 1px solid rgba(201, 168, 76, 0.08);
  margin-top: 4rem;
  padding-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-xl);
  background: transparent;
  transition: var(--transition);
}

.back-home-btn:hover {
  color: var(--cream);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
}

/* ============================================================
   8. PAGINATION
   ============================================================ */
.pagination-container {
  margin-top: 5rem;
  display: flex;
  justify-content: center;
}

.pagination .nav-links {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.pagination .page-numbers:hover {
  border-color: var(--card-hover-border);
  color: var(--cream);
  background: var(--card-hover-bg);
}

.pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-color: transparent;
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.pagination .prev, .pagination .next {
  width: auto;
  padding: 0 1.2rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================================
   9. SITE FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(201, 168, 76, 0.07);
  padding: 4rem 0 3rem;
  margin-top: 6rem;
  background: rgba(5, 8, 15, 0.8);
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  gap: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.footer-logo-flame {
  width: 24px;
  height: auto;
  opacity: 0.8;
}

.footer-logo-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links {
  padding-top: 0.25rem;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

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

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  padding-top: 0.25rem;
}

/* ============================================================
   9b. PRAYER PREV/NEXT NAV (single post)
   ============================================================ */
.prayer-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.prayer-nav-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.prayer-nav-link:hover {
  color: var(--gold);
}

/* ============================================================
   9c. COMPACT HERO (category pages)
   ============================================================ */
.hero-section--compact {
  padding: 4rem 2rem 2.5rem;
}

.hero-title--small {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

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

/* ============================================================
   11. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .prayers-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-container {
    height: auto;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-menu {
    gap: 0;
    flex-wrap: wrap;
  }

  .nav-menu a {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
  }

  .hero-section {
    padding: 4rem 1.5rem 3rem;
  }

  .prayers-grid {
    grid-template-columns: 1fr;
  }

  .prayer-article {
    padding: 2.5rem 1.75rem;
  }

  .article-title {
    font-size: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-copyright {
    text-align: center;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  .prayer-nav {
    flex-direction: column;
    gap: 0.75rem;
  }
}

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

  .prayer-card {
    padding: 1.75rem;
  }
}
