/*
Theme Name: Law of Divine Life
Theme URI: https://lawofdivinelife.in
Author: Shivansh Tiwari
Author URI: https://lawofdivinelife.in
Description: Deeply customizable, high-performance Vedic astrology and spiritual blog theme with complete WordPress Customizer panels for Header, Footer, Body Colors, Typography, Hero/Zodiac/Blog Images, Top Moving Color Ball, and Interactive Article Flow.
Version: 1.6.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lawofdivinelife
*/

:root {
  --bg-primary: #0b0e17;
  --bg-secondary: #161d31;
  --bg-surface: #131826;
  --bg-surface-hover: #1a2135;
  --accent-gold: #e5b869;
  --accent-gold-dim: rgba(229, 184, 105, 0.14);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(11, 14, 23, 0.92);
  --header-text: #f3f4f6;
  --header-height: 64px;
  --footer-bg: transparent;
  --footer-text: #9ca3af;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --body-font-size: 16px;
  --body-line-height: 1.72;
  --card-radius: 14px;
  --img-radius: 14px;
  --img-aspect: 16 / 9;
  --max-width: 1140px;
}

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

html {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 4.5rem;
  background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 65%);
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a { color: var(--accent-gold); text-decoration: none; transition: opacity 0.2s ease, color 0.2s ease; }
a:hover { opacity: 0.9; }
img { max-width: 100%; height: auto; display: block; }

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

/* Pointer-Following Divine Aura Glow */
.lodl-pointer-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 35;
  background: radial-gradient(circle, var(--accent-gold-dim) 0%, rgba(229, 184, 105, 0.04) 45%, transparent 72%);
  transform: translate3d(-999px, -999px, 0);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
  body.lodl-pointer-active .lodl-pointer-aura {
    opacity: 1;
  }
}

.lodl-glow-card {
  position: relative;
  overflow: hidden;
}

.lodl-glow-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    300px circle at var(--mx, -500px) var(--my, -500px),
    rgba(229, 184, 105, 0.14),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lodl-glow-card:hover::after {
  opacity: 1;
}

/* Reading Progress Bar */
.lodl-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent-gold), #fff3c4, var(--accent-gold));
  box-shadow: 0 0 10px var(--accent-gold);
  transition: width 0.08s linear;
}

/* Top Announcement Bar (Customizable) */
.lodl-top-announcement {
  background: var(--accent-gold-dim);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--accent-gold);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 1rem;
  letter-spacing: 0.02em;
}

.lodl-top-announcement a {
  text-decoration: underline;
  margin-left: 0.35rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  color: var(--header-text);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header.lodl-not-sticky {
  position: relative;
}

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

.site-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-branding img {
  max-height: calc(var(--header-height) - 14px);
  width: auto;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--header-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a { color: var(--header-text); font-size: 0.92rem; font-weight: 500; }
.main-nav a:hover { color: var(--accent-gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--header-text);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 1.25rem;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
}

/* 10-Spectrum Continuous Moving / Draggable Top Theme & Background Ball Track */
.lodl-ball-track-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 164px;
  height: 32px;
  padding: 3px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #0b0e17 0%,
    #1e1b4b 11%,
    #311042 22%,
    #4c0519 33%,
    #3b1208 44%,
    #06281e 55%,
    #082f49 66%,
    #2e1065 77%,
    #f5f3ff 88%,
    #faf6ee 100%
  );
  border: 1px solid var(--accent-gold);
  cursor: pointer;
  user-select: none;
  touch-action: none;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.45);
}

@media (max-width: 480px) {
  .lodl-ball-track-wrap { width: 112px; }
}

.lodl-moving-ball {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffffff 0%, var(--accent-gold) 60%, #7c4d0b 100%);
  box-shadow: 0 0 12px var(--accent-gold), 0 2px 6px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #0b0e17;
  font-weight: 700;
  cursor: grab;
  will-change: transform;
  transform: translateX(0px) rotate(0deg);
}

.lodl-moving-ball:active { cursor: grabbing; scale: 1.08; }

/* Hero (Customizable Eyebrow, Title, Subtitle, CTA & Optional Hero Image) */
.hero-section { text-align: center; padding: 3rem 1.25rem 2.25rem; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
  border: 1px solid rgba(229, 184, 105, 0.35);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
  line-height: 1.2;
  color: var(--text-main);
  margin: 0 auto 0.85rem;
  max-width: 780px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 auto;
}

/* 12-Sign Zodiac Grid */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--text-main);
  text-align: center;
  margin: 0 0 1.5rem;
}

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.zodiac-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.35rem 1rem;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.zodiac-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  background: var(--bg-surface-hover);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
  opacity: 1;
}

.zodiac-symbol { font-size: 2.15rem; line-height: 1; color: var(--accent-gold); margin-bottom: 0.55rem; transition: transform 0.25s ease; }
.zodiac-card:hover .zodiac-symbol { transform: scale(1.14) rotate(4deg); }
.zodiac-name { font-family: var(--font-serif); font-size: 1.12rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.2rem; }
.zodiac-dates { font-size: 0.78rem; color: var(--text-muted); }

/* Animated Featured Image Showcase (Customizable Aspect Ratio & Radius) */
.lodl-featured-stage {
  position: relative;
  margin: 0 auto 2.25rem;
  border-radius: calc(var(--img-radius) + 4px);
  padding: 6px;
  background: linear-gradient(135deg, rgba(229, 184, 105, 0.55), rgba(255, 255, 255, 0.08), rgba(229, 184, 105, 0.45));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.48), 0 0 32px rgba(229, 184, 105, 0.12);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.3s ease;
  animation: lodlFeaturedReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lodl-featured-stage:hover {
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.58), 0 0 42px rgba(229, 184, 105, 0.24);
}

.lodl-featured-inner {
  position: relative;
  border-radius: var(--img-radius);
  overflow: hidden;
  background: var(--bg-primary);
  aspect-ratio: var(--img-aspect);
  max-height: 520px;
}

.lodl-featured-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.01);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.lodl-featured-stage:hover .lodl-featured-inner img {
  transform: scale(1.055);
}

.lodl-featured-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(11, 14, 23, 0.04) 0%,
    rgba(11, 14, 23, 0.0) 58%,
    rgba(11, 14, 23, 0.68) 100%
  );
}

.lodl-featured-caption {
  position: absolute;
  bottom: 0.9rem;
  left: 1.1rem;
  right: 1.1rem;
  z-index: 2;
  font-size: 0.82rem;
  color: #f3f4f6;
  background: rgba(11, 14, 23, 0.65);
  backdrop-filter: blur(8px);
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(229, 184, 105, 0.28);
  display: inline-block;
  max-width: max-content;
}

@keyframes lodlFeaturedReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Blog Archive Grid & Animated Card Thumbnails */
.lodl-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.lodl-blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.28s ease;
}

.lodl-blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-gold);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.4);
}

.lodl-archive-thumb {
  position: relative;
  display: block;
  aspect-ratio: var(--img-aspect);
  overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.lodl-archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.lodl-blog-card:hover .lodl-archive-thumb img {
  transform: scale(1.07);
}

.lodl-blog-card-body {
  padding: 1.35rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Editorial Article Flow & Scroll-Reveal Animations */
.lodl-article-shell {
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

.lodl-article-header {
  text-align: center;
  margin-bottom: 1.85rem;
  animation: lodlFadeSlideUp 0.65s ease both;
}

.lodl-article-meta-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 1rem;
  border-radius: 99px;
}

.lodl-prose {
  font-size: 1.07rem;
  line-height: 1.82;
  letter-spacing: 0.005em;
}

.lodl-has-dropcap > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.35rem;
  line-height: 0.85;
  padding: 0.12rem 0.65rem 0 0;
  color: var(--accent-gold);
  font-weight: 700;
}

.lodl-prose p {
  margin: 0 0 1.35rem;
  color: var(--text-main);
}

.lodl-prose h2 {
  font-family: var(--font-serif);
  font-size: 1.58rem;
  color: var(--text-main);
  margin: 2.25rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.lodl-prose h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 68px;
  height: 2px;
  background: var(--accent-gold);
}

.lodl-prose h3 {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  color: var(--accent-gold);
  margin: 1.85rem 0 0.65rem;
}

.lodl-prose blockquote {
  margin: 1.85rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent-gold);
  background: var(--accent-gold-dim);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--text-main);
}

.lodl-prose ul, .lodl-prose ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
}

.lodl-prose li { margin-bottom: 0.55rem; }
.lodl-prose li::marker { color: var(--accent-gold); }

.lodl-flow-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.lodl-flow-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes lodlFadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .lodl-flow-item, .lodl-featured-stage {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .lodl-pointer-aura { display: none !important; }
}

/* Reading Panels, Tabs & Cosmic Metadata */
.horoscope-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.85rem;
  margin-bottom: 2rem;
}

.tab-bar { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 1.35rem; }

.tab-btn {
  padding: 0.55rem 1.05rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background: var(--accent-gold);
  color: #0b0e17;
  border-color: var(--accent-gold);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.cosmic-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-subtle);
}

.meta-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.meta-value { display: block; font-size: 1rem; font-weight: 700; color: var(--text-main); }

.lodl-compat-link {
  color: var(--accent-gold);
  text-decoration: underline;
  text-decoration-color: rgba(229, 184, 105, 0.45);
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.lodl-compat-link:hover { text-decoration-color: var(--accent-gold); opacity: 1; }

/* Breadcrumbs */
.lodl-breadcrumbs { margin-bottom: 0.85rem; }
.lodl-breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.lodl-breadcrumb-sep { margin-left: 0.35rem; opacity: 0.6; }

/* Customizable Footer & Multi-Column Footer Widgets */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0 2rem;
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

.lodl-footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  text-align: left;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lodl-footer-col-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--text-main);
  margin: 0 0 0.65rem;
}

.lodl-footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.lodl-footer-social a {
  padding: 0.38rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 600;
}

.footer-nav ul {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.mobile-bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 0.45rem 0.25rem;
}

.mobile-bottom-dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-main);
  gap: 0.15rem;
}

@media (min-width: 769px) {
  .mobile-bottom-dock { display: none; }
}


/* Site-Wide Search Bar in Header & Mobile Dock */
.lodl-header-search {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  padding: 0.22rem 0.35rem 0.22rem 0.85rem;
  gap: 0.35rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lodl-header-search:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-dim);
}

.lodl-header-search input[type="search"] {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.85rem;
  width: 155px;
  font-family: var(--font-sans);
}

.lodl-header-search input[type="search"]::placeholder {
  color: var(--text-muted);
}

.lodl-header-search button {
  background: var(--accent-gold);
  color: #0b0e17;
  border: none;
  border-radius: 99px;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .lodl-header-search { display: none; }
}

.lodl-mobile-search-bar {
  display: none;
  padding: 0.65rem 1.25rem 0.25rem;
}

@media (max-width: 960px) {
  .lodl-mobile-search-bar { display: block; }
}

.lodl-mobile-search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.35rem 0.45rem 0.35rem 0.9rem;
}

.lodl-mobile-search-form input[type="search"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: var(--font-sans);
}

.lodl-mobile-search-form input[type="search"]::placeholder {
  color: var(--text-muted);
}

.lodl-mobile-search-form button {
  background: var(--accent-gold);
  color: #0b0e17;
  border: none;
  border-radius: 8px;
  padding: 0.52rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
