/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {

  --font-scale: 1;
  /* Base backgrounds */
  --bg-900: #1a120b;
  --bg-800: #2b1c14;
  --bg-700: #402216;
  --bg-600: #543224;
  --bg-500: #6b4436;

  /* Saffron / Amber accent */
  --saffron-200: #fef3c7;
  --saffron-300: #fde68a;
  --saffron-400: #fbbf24;
  --saffron-500: #f59e0b;
  --saffron-600: #d97706;
  --saffron-700: #b45309;
  --saffron-glow: rgba(245, 158, 11, 0.4);

  /* Gold / Metallic */
  --gold-300: #fce38a;
  --gold-400: #fcd34d;
  --gold-500: #fbbf24;
  --gold-600: #d4af37;
  --gold-gradient: linear-gradient(135deg, #fcd34d, #f59e0b);

  /* Text Hierarchy */
  --text-white: #fdfaf5;
  --text-title: #f8f0e0;
  --text-primary: #e8dfd0;
  --text-secondary: #c8b89a;
  --text-muted: #8a7d6e;

  /* Cards */
  --card-bg: rgba(43, 28, 20, 0.7);
  --card-border: rgba(245, 158, 11, 0.15);
  --card-hover-bg: rgba(64, 34, 22, 0.85);
  --card-hover-border: rgba(245, 158, 11, 0.4);

  /* Spacing & Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-organic: 40% 60% 70% 30% / 40% 50% 60% 50%;
  --radius-pill: 999px;

  /* Transitions */
  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  --transition-slow: 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  --transition-bounce: 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 24px 64px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.15);
  --shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.03);

  /* Typography */
  --font-gu: 'Noto Serif Gujarati', serif;
  --font-gu-sans: 'Noto Sans Gujarati', sans-serif;
  --font-en: 'DM Sans', 'Inter', sans-serif;
  --font-heading: 'Playfair Display', 'DM Sans', serif;
}
/* Admin Theme Variables */
[data-theme="dark"] {
  --admin-bg: #1a1a1a;
  --admin-bg-card: rgba(30,30,30,0.85);
  --admin-text: #e0e0e0;
  --admin-text-muted: #b0b0b0;
  --admin-border: rgba(255,255,255,0.1);
  --admin-primary: #f59e0b;
}

/* Admin page base styling */
body.admin-page {
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-page .card, .admin-page .feed-panel {
  background: var(--admin-bg-card) !important;
  border: 1px solid var(--admin-border) !important;
}

.admin-page .feed-input, .admin-page .feed-select {
  background: var(--admin-bg-card);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}

.admin-page .btn {
  background: var(--admin-primary);
  color: var(--text-white);
  border: none;
}

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

/* Ensure overlay does not obscure admin UI */
body.admin-page::after {
  background: transparent !important;
}

/* Theme toggle button for admin */
.theme-toggle-admin {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.theme-toggle-admin:hover {
  color: var(--saffron-600);
}
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-900);
  color: var(--text-primary);
  font-family: var(--font-gu-sans), var(--font-en);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* === SPLIT BACKGROUND SYSTEM ===
   We now use a premium circuit/grill pattern in the background
   The yellow dots and lines fit the Organic Saffron theme.
   body::before = circuit pattern (fixed)
   body::after  = gradient overlay for readability
*/
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3; /* Moved further back */
  pointer-events: none;
  opacity: 0.8; /* Increased opacity as requested */
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 19px,
      rgba(245, 158, 11, 0.03) 19px,
      rgba(245, 158, 11, 0.03) 20px,
      transparent 20px,
      transparent 39px,
      rgba(245, 158, 11, 0.03) 39px,
      rgba(245, 158, 11, 0.03) 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 19px,
      rgba(245, 158, 11, 0.03) 19px,
      rgba(245, 158, 11, 0.03) 20px,
      transparent 20px,
      transparent 39px,
      rgba(245, 158, 11, 0.03) 39px,
      rgba(245, 158, 11, 0.03) 40px
    ),
    radial-gradient(
      circle at 20px 20px,
      rgba(245, 158, 11, 0.06) 2px,
      transparent 2px
    ),
    radial-gradient(
      circle at 40px 40px,
      rgba(245, 158, 11, 0.06) 2px,
      transparent 2px
    );
  background-size: 40px 40px, 40px 40px, 40px 40px, 40px 40px;
  display: block;
}

body.light-mode::before {
  opacity: 0.6; /* Increased opacity for light mode */
  background-image: repeating-linear-gradient(
      0deg, transparent, transparent 19px, rgba(0, 0, 0, 0.02) 19px, rgba(0, 0, 0, 0.02) 20px, transparent 20px, transparent 39px, rgba(0, 0, 0, 0.02) 39px, rgba(0, 0, 0, 0.02) 40px
    ),
    repeating-linear-gradient(
      90deg, transparent, transparent 19px, rgba(0, 0, 0, 0.02) 19px, rgba(0, 0, 0, 0.02) 20px, transparent 20px, transparent 39px, rgba(0, 0, 0, 0.02) 39px, rgba(0, 0, 0, 0.02) 40px
    ),
    radial-gradient(circle at 20px 20px, rgba(0, 0, 0, 0.04) 2px, transparent 2px),
    radial-gradient(circle at 40px 40px, rgba(0, 0, 0, 0.04) 2px, transparent 2px);
}

/* Dark gradient overlay: transparent in hero, dark in content */
body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(5, 3, 2, 0.15) 0%,
      /* nearly transparent on hero top */
      rgba(5, 3, 2, 0.10) 40%,
      /* still light as yellow line approaches */
      rgba(5, 3, 2, 0.60) 60%,
      /* darkens in content zone */
      rgba(5, 3, 2, 0.85) 85%,
      rgba(5, 3, 2, 0.92) 100%);
  z-index: -1;
  pointer-events: none;
}

/* Ensure all page content sits above the overlay */
body>* {
  position: relative;
  z-index: 1;
}

/* Canvas particle layer sits between overlay and content */
#bgCanvas {
  z-index: 0 !important;
}

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

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

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: 1536px;
  /* Increased from 1180px to utilize more screen space on desktop */
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Scrollbar ---------- */
/* Global Scrollbar Removal - Premium App Feel */
::-webkit-scrollbar {
  display: none !important;
  width: 0;
  height: 0;
}

body {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}


/* ============================================================
   ELEGANT FADE PAGE TRANSITION
   ============================================================ */
body {
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

body.page-entering {
  opacity: 0;
}

body.page-exiting {
  opacity: 0;
}

/* ============================================================
   NAVBAR (REFACTORED)
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
  padding: 0.8rem 0;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 184, 0, 0.15) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7) !important;
  padding: 0.5rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-white);
}

.logo-gu {
  font-family: var(--font-gu);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-400);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  align-items: center;
}

/* Base Nav Link */
.nav-link {
  position: relative;
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── LUXURY STYLE 1: PILL BUTTON (Unified Under-glow) ── */
.navbar.nav-pill .nav-links {
  gap: 1rem;
}

.navbar.nav-pill .nav-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-bottom: 4px solid rgba(245, 166, 35, 0.8);
  color: #F0E0C0;
  border-radius: 50px;
  height: 44px;
  padding: 0 24px;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.navbar.nav-pill .nav-link:hover,
.navbar.nav-pill .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #FFD580 !important;
  border-color: rgba(245, 166, 35, 0.5);
  border-bottom: 4px solid #F5A623;
  box-shadow: 0 0 15px rgba(245, 166, 35, 0.4);
  transform: translateY(-2px);
}

/* ── LUXURY STYLE 2: MINIMAL TEXT (Pair 2) ── */
.navbar.nav-minimal {
  background: transparent;
  /* No solid background by default, allows transparency */
}

.navbar.nav-minimal.scrolled {
  background: rgba(10, 10, 10, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 184, 0, 0.15) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7) !important;
}

.navbar.nav-minimal .nav-link {
  color: #B0A090;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.5rem;
  background: none;
  border: none;
  box-shadow: none;
}

.navbar.nav-minimal .nav-link:hover {
  color: #F5C842;
  background: none;
  transform: none;
}

.navbar.nav-minimal .nav-link.active {
  color: #F5C842 !important;
  border-bottom: 2px solid #D4A017;
  text-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

/* Responsive Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-400);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Hide logo on home page — hero image acts as the branding */
.home-page .nav-logo {
  display: none;
}

/* Push nav links to the right when logo is hidden */
.home-page .nav-inner {
  justify-content: flex-end;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-400);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* Background image comes from body — top half of Background.webp shows here */
  background: transparent;
  overflow: visible;
  padding-top: 64px;
}

/* Subtle ambient glow overlay on hero only */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.04) 0%, transparent 40%);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero::before {
    opacity: 0.45;
  }

  #bgCanvas {
    opacity: 0.4;
  }
}

/* Decorative horizontal rule */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-600), transparent);
}

/* Global particle canvas — fixed behind everything */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

.hero-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem 1.25rem 2rem;
  /* tightened padding to remove space below buttons */
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: none;
}

.hero-title {
  margin-top: -2rem;
  /* Move the whole group upwards */
  margin-bottom: -5rem;
  /* Pull quote box tightly under the calligraphy */
  animation: fadeInUp 0.7s 0.1s ease both;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.hero-top-img {
  width: 100%;
  max-width: 900px;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.25));
  flex-shrink: 0;
  z-index: 1;
  transform: scale(2.1) translateY(3.8rem);
  /* Make image a bit bigger and move it down */
  transform-origin: top center;
  /* Scale grows downward, top never gets clipped */
  margin-bottom: -2rem;
  pointer-events: none;
  opacity: 1 !important;
  /* Brighter branding visibility - fully visible in both modes */
  display: block;
}

body.light-mode .hero-top-img {
  filter: contrast(1.1) brightness(1.0) !important;
  opacity: 1 !important;
}

.hero-calligraphy {
  max-width: 1200px;
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255, 179, 15, 0.7)) drop-shadow(0 0 45px rgba(255, 179, 15, 0.4));
  margin-top: 0.1rem;
  transform: scale(1.8) translateY(1.8rem);
  /* Pull calligraphy down to center on chest */
  z-index: 2;
  position: relative;
  pointer-events: none;
  left: 3%;
  /* Shift to the right slightly to center on chest */
  display: block;
}

/* ── MOBILE HERO OVERRIDES ────────────────────────────────────
   IMPORTANT: This block must stay AFTER .hero-top-img and
   .hero-calligraphy desktop rules above. Moving it earlier
   causes the desktop scale() values to win the CSS cascade.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title {
    margin-top: -7.5rem !important;
    margin-bottom: 0rem !important;
    animation: none;
  }

  .hero-top-img {
    max-height: 40vh !important;
    transform: scale(2.2) translateY(-1.5rem) !important;
    transform-origin: top center !important;
    margin-bottom: 0 !important;
    opacity: 0.8 !important;
  }

  .hero-calligraphy {
    max-width: 85% !important;
    left: 0 !important;
    transform: scale(2.2) translateY(-0.5rem) !important;
    margin-top: 0 !important;
  }

  .hero-quote {
    padding: 1.25rem 1.2rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    transform: none !important;
    font-size: 0.95rem !important;
    border-radius: var(--radius-lg) !important; /* Fix horizontal cut-off from pill shape */
  }

  /* 3 Buttons: explicit row layout */
  .hero-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .hero-actions .btn {
    flex: 1 !important;
    max-width: 120px !important;
    padding: 0.6rem 0.4rem !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ============================================================
   RESPONSIVE BACKGROUND IMAGE ADJUSTMENTS
   Background.webp is portrait (~1:1.73 ratio).
   At 100% width, the image is ~173vh tall — perfectly split:
   top 100vh = hero zone, next ~73vh = content cosmic space.
   
   Mobile: on narrow portrait phones, use cover so the image
   fills the screen without too much empty space on sides.
   ============================================================ */

@media (max-width: 768px) {
  body::before {
    /* On mobile/portrait, switch to cover to fill height properly */
    background-size: cover;
    background-position: top center;
  }
}

.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;
}

.hero-subtitle {
  font-family: var(--font-gu-sans);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 0.5rem;
  animation: fadeInUp 0.7s 0.2s ease both;
  display: none;
}

.hero-quote {
  font-family: var(--font-gu);
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: var(--saffron-400);
  background: rgba(18, 12, 6, 0.45);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);

  /* New Pill Style with Bottom Glow Border */
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-bottom: 4px solid rgba(255, 179, 15, 0.9);

  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.9),
    /* Deeper ambient shadow */
    0 20px 40px rgba(245, 158, 11, 0.12),
    /* Softer gold glow */
    inset 0 -3px 12px rgba(245, 158, 11, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.08);

  padding: 1rem 2rem;
  margin: 0 auto 1.5rem;
  width: fit-content;
  max-width: 680px;
  animation: fadeInUp 0.8s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  line-height: 1.7;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;

  /* Golden 3D text effect */
  color: #fbbf24;
  text-shadow:
    0 1px 1px #b45309,
    0 2px 2px #92400e,
    0 4px 4px #78350f,
    0 6px 12px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(245, 158, 11, 0.6);
}

/* Subtle shimmer sweep across the quote box */
.hero-quote::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg,
      transparent 40%,
      rgba(255, 215, 80, 0.06) 50%,
      transparent 60%);
  animation: quoteShimmer 4s 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes quoteShimmer {
  0% {
    left: -100%;
  }

  50% {
    left: 140%;
  }

  100% {
    left: 140%;
  }
}

.quote-mark {
  font-size: 1.4em;
  line-height: 0.8;
  color: #fcd34d;
  opacity: 1;
  text-shadow:
    0 1px 1px #b45309,
    0 2px 2px #92400e,
    0 4px 10px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(251, 191, 36, 0.7);
}

.quote-author {
  display: block;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-gu-sans);
  color: #c8bfaf;
  opacity: 1;
  font-style: italic;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.quote-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 1rem;
}

.quote-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.3);
  transition: background 0.3s;
}

.quote-dot.active {
  background: var(--saffron-400);
  box-shadow: 0 0 8px var(--saffron-400);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255, 255, 255, 0.04) 50%, var(--card-bg) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
}

.skeleton-title {
  width: 70%;
  height: 20px;
}

.skeleton-body1 {
  width: 100%;
}

.skeleton-body2 {
  width: 85%;
}

.skeleton-body3 {
  width: 60%;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.8;
  }

  50% {
    opacity: 0.3;
  }
}


.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s 0.4s ease both;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-primary,
.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #F0E0C0;
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-bottom: 4px solid rgba(255, 179, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover,
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 166, 35, 0.5);
  color: #FFD580;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
  border-bottom-color: #fbbf24;
}

.btn-primary:active,
.btn-outline:active {
  transform: translateY(0);
  border-bottom-width: 2px;
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  padding: 5rem 0 2.5rem;
  background: var(--bg-900);
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
  position: relative;
  text-align: center;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-600), transparent);
}

.page-title {
  font-family: var(--font-gu);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

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

/* ============================================================
   PRASANG RESULTS PAGE
   ============================================================ */

.prasang-banner {
  position: relative;
  margin-top: 64px;
  padding: 2.5rem 0 2rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 160, 23, 0.2);
}

.prasang-banner-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(212, 160, 23, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.prasang-banner-inner {
  position: relative;
  z-index: 1;
}

/* ============================================================
   MODERN BACK BUTTON (UIverse themed)
   ============================================================ */
.modern-back-btn {
  display: inline-flex;
  align-items: center;
  width: 12rem;
  height: 3.5rem;
  border-radius: 1rem;
  position: relative;
  background: var(--bg-900);
  border: 4px solid var(--card-border);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-gu-sans);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

.modern-back-btn .btn-text {
  transform: translateX(3rem);
  position: relative;
  z-index: 20;
  color: var(--text-title);
  transition: color 0.5s ease;
  width: 100%;
  text-align: center;
  padding-right: 1.5rem;
  margin: 0;
}

.modern-back-btn:hover .btn-text {
  color: var(--bg-900);
}

.modern-back-btn .icon-container {
  background: var(--saffron-500);
  border-radius: 0.75rem;
  height: calc(100% - 8px);
  width: 25%;
  display: grid;
  place-items: center;
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 10;
  transition: width 0.5s ease;
}

.modern-back-btn:hover .icon-container {
  width: calc(100% - 8px);
}

.modern-back-btn svg {
  width: 25px;
  height: 25px;
  color: var(--bg-900);
}

.prasang-banner-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.prasang-banner-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 1px solid rgba(245, 158, 11, 0.25);
  border-right: 1px solid rgba(245, 158, 11, 0.25);
  border-bottom: 5px solid rgba(255, 179, 15, 0.95);
  background: rgba(3, 4, 6, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.prasang-banner-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 -22px 35px rgba(245, 158, 11, 0.4),
    inset 0 0 15px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}

.prasang-banner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.prasang-banner-fallback {
  font-family: var(--font-gu-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-400);
  text-align: center;
  padding: 0 10px;
  line-height: 1.3;
}

.prasang-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.prasang-banner-label {
  font-family: var(--font-gu-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-600);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prasang-banner-title {
  font-family: var(--font-gu);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  margin: 0;
}

.prasang-banner-count {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-gu-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gold-500);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-top: 0.25rem;
}

/* Two-column layout */
.prasang-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.prasang-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}

.sidebar-title {
  font-family: var(--font-gu-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--card-border);
}

.prasang-main {
  min-width: 0;
}

.prasang-main .cards-grid {
  grid-template-columns: 1fr;
}

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

  .prasang-sidebar {
    position: static;
  }

  .prasang-banner-avatar {
    width: 80px;
    height: 80px;
  }

  .prasang-banner-content {
    gap: 1.25rem;
  }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 1rem 0;
  /* Reduced padding to tighten layout */
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  /* Increased spacing to give cards more breathing room below the title */
}

.scroll-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.section-title {
  font-family: var(--font-gu);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  /* Brighter, more legible gold gradient for section headings */
  background: linear-gradient(135deg, #fff5cc 0%, #fcd34d 35%, #f59e0b 65%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 8px rgba(245, 158, 11, 0.3));
  position: relative;
  padding-bottom: 0.65rem;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron-400), rgba(245, 158, 11, 0.4), transparent);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  animation: titleBarGrow 0.6s ease both;
}

@keyframes titleBarGrow {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    width: 72px;
    opacity: 1;
  }
}

.section-header .section-title {
  margin-bottom: 0;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.cards-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 2.5rem 60px 1.5rem 60px;
  /* Increased top padding to prevent glow clipping */
  /* Provide generous room for shadows */
  margin: 0 -60px;
  /* Pull back to align with headers while allowing shadows to bleed */
  scroll-padding: 0 60px;
  /* Ensure snap-scrolling respects the padding */
  scrollbar-width: none;
  /* Hide for Firefox */
  -ms-overflow-style: none;
  /* Hide for IE/Edge */
  scroll-snap-type: x mandatory;
  /* Edge fade: 120px fade zones matching the padding */
  -webkit-mask-image: linear-gradient(to right,
      transparent 0px,
      black 120px,
      black calc(100% - 120px),
      transparent 100%);
  mask-image: linear-gradient(to right,
      transparent 0px,
      black 120px,
      black calc(100% - 120px),
      transparent 100%);
}

/* Home Page specific latest articles grid — 5 columns */
@media (min-width: 1024px) {
  #articlesGrid.cards-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    gap: 1.5rem;
    /* Re-enable edge fade for scrolling */
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 120px, black calc(100% - 120px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0px, black 120px, black calc(100% - 120px), transparent 100%);
  }

  #articlesGrid.cards-grid .article-card {
    /* Show exactly 5 cards in desktop view.
       Calculation: (100% container width - 4 gaps of 1.5rem) / 5 cards */
    min-width: calc((100% - 6rem) / 5);
    width: calc((100% - 6rem) / 5);
    flex-shrink: 0;
    padding: 1.25rem 1rem;
  }

  #articlesGrid.cards-grid .card-title {
    font-size: 1rem;
  }

  #articlesGrid.cards-grid .card-excerpt {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #articlesGrid.cards-grid .read-more {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }
}




.cards-grid::-webkit-scrollbar {
  display: none !important;
}

.cards-grid .article-card {
  min-width: 320px;
  width: 320px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* Modifier for stacked single-column layout instead of horizontal scroll */
.stacked-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  overflow: visible !important;
  padding: 1.5rem 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
}

.stacked-grid .article-card {
  width: 100% !important;
  min-width: 0 !important;
  margin-bottom: 0.5rem;
}

/* Remove the intense neon background gradient blur for standard stacked lists */
.stacked-grid .neon-bg-span {
  display: none !important;
}

/* Center all content since cards span the full width of the row */
.stacked-grid .article-card .content,
.stacked-grid .article-card .card-body-wrap {
  align-items: center !important;
  text-align: center !important;
}

.stacked-grid .article-card .card-title,
.stacked-grid .article-card .card-prasang-label,
.stacked-grid .article-card .card-excerpt {
  text-align: center !important;
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* --- Neon Latest Cards System --- */
.neon-latest-card {
  position: relative;
  z-index: 1;
  overflow: visible !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.neon-latest-card .neon-bg-span {
  display: none !important;
}

/* Unified vibrant multicolored design cycling every 4 cards */

.neon-latest-card .content {
  background: rgba(24, 18, 8, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 225, 150, 0.45);
  /* Brighter, more defined top edge */
  border-left: 1px solid rgba(245, 158, 11, 0.1);
  border-right: 1px solid rgba(245, 158, 11, 0.1);
  border-bottom: 6px solid rgba(255, 179, 15, 0.95);
  border-radius: 1.5rem;
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: none !important;
  transition: all 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
}

.neon-latest-card:hover .content {
  transform: translateY(-8px);
  background: rgba(24, 18, 8, 0.85);
  border-top-color: rgba(245, 158, 11, 0.45);
}

/* Expanding Corners Card Hover Effect */
.neon-latest-card .content::before,
.neon-latest-card .content::after {
  position: absolute;
  content: "";
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-gu);
  font-size: 1.8rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: transparent;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
}

.neon-latest-card .content::before {
  top: 0;
  right: 0;
  border-radius: 0 1.5rem 0 100%;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  border-left: 1px solid rgba(251, 191, 36, 0.2);
}

.neon-latest-card .content::after {
  bottom: 0;
  left: 0;
  border-radius: 0 100% 0 1.5rem;
  border-top: 1px solid rgba(251, 191, 36, 0.2);
  border-right: 1px solid rgba(251, 191, 36, 0.2);
}

.neon-latest-card:hover .content::before,
.neon-latest-card:hover .content::after {
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  background: rgba(245, 158, 11, 0.95);
  border-color: transparent;
}

.neon-latest-card:hover .content::after {
  content: "વાંચો";
  color: var(--bg-900);
}


.card-prasang-label {
  font-family: var(--font-gu-sans);
  /* Different highlighted color to easily differentiate 'featured' prasang tags */
  color: #ff8f59;
  font-size: 0.88rem;
  margin-top: 0.4rem;
  font-weight: 700;
  font-style: bold;
  opacity: 1;
}

.card-featured-tag {
  font-family: var(--font-en);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-400);
  background: rgba(245, 158, 11, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  text-transform: uppercase;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.category-badge {
  font-family: var(--font-gu-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bg-900);
  background: linear-gradient(135deg, var(--saffron-300), var(--saffron-500));
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  white-space: nowrap;
}

.card-img {
  border-radius: calc(var(--radius-md) - 6px);
  aspect-ratio: 16/7;
  object-fit: cover;
  width: 100%;
}

.card-title {
  font-family: var(--font-gu);
  font-size: 1.3rem;
  /* Increased 2pt for better prominence */
  font-weight: 700;

  /* Clean bright metallic gold — easier to read, warm glow */
  background: linear-gradient(160deg, #fff5d6 0%, #fcd34d 30%, #d4a017 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* Subtle depth shadow */
  filter: drop-shadow(0 1px 4px rgba(212, 160, 23, 0.5));

  line-height: 1.4;
  margin-top: 0.25rem;
}

.card-excerpt {
  font-size: 0.93rem;
  /* Stepped up from text-muted to be clearly legible */
  color: #c8b89a;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.readmore-btn {
  width: fit-content;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-bottom: 3px solid rgba(251, 191, 36, 0.9);
  border-radius: var(--radius-lg);
  padding: 0px 15px;
  gap: 8px;
  transition: all 0.4s;
  text-decoration: none;
}

.btn-book-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  width: 35px;
  height: 100%;
}

.btn-book-wrapper .book {
  width: 100%;
  height: auto;
  filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
}

.btn-book-wrapper .book-page {
  width: 50%;
  height: auto;
  position: absolute;
}

.readmore-btn:hover .book-page {
  animation: paging 0.6s linear infinite;
  transform-origin: left;
}

.readmore-btn:hover {
  background-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  border-color: transparent;
}

.readmore-btn .text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-gu);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--saffron-400);
  transition: color 0.4s;
}

.readmore-btn:hover .text {
  color: var(--bg-900);
}

/* ============================================================
   CATEGORY CHIPS (home highlights) — kept for fallback
   ============================================================ */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.category-chip {
  font-family: var(--font-gu-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--card-bg);
  border-top: 1px solid rgba(245, 158, 11, 0.15);
  border-left: 1px solid rgba(245, 158, 11, 0.15);
  border-right: 1px solid rgba(245, 158, 11, 0.15);
  border-bottom: 3px solid rgba(212, 160, 23, 0.5);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.category-chip:hover,
.category-chip.active {
  background: rgba(212, 160, 23, 0.1);
  border-color: var(--gold-500);
  color: var(--gold-400);
  transform: translateY(-2px);
}

/* ============================================================
   AVATAR CARD ROW — used for Featured (prasang) and Categories
   ============================================================ */
.avatar-row-wrapper {
  position: relative;
  width: 100%;
  overflow: visible;
  /* CRITICAL: Allow glow to bleed outside container */
}

.scroll-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(12, 10, 4, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 1px solid rgba(245, 158, 11, 0.15);
  border-right: 1px solid rgba(245, 158, 11, 0.15);
  border-bottom: 3.5px solid rgba(255, 179, 15, 0.95);
  color: var(--saffron-400);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  opacity: 0.9;
  padding-bottom: 3px;
  z-index: 10;
}

.scroll-btn:hover {
  background: rgba(20, 15, 5, 0.85);
  border-color: var(--saffron-300);
  border-bottom-color: #fbbf24;
  color: var(--gold-400);
  transform: scale(1.15) translateY(-2px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.55),
    0 0 15px rgba(245, 158, 11, 0.3);
}

.scroll-btn.prev-btn {
  margin-right: 0.25rem;
}

.scroll-btn.next-btn {
  margin-left: 0.25rem;
}

.avatar-row {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 40px 60px;
  /* Generous 60px safe zone for glows */
  margin: 0 -60px;
  /* Pull back for perfect title alignment */
  scroll-padding: 0 60px;
  /* Smooth snap-scrolling */
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Edge fade: hides abrupt cuts on both sides */
  -webkit-mask-image: linear-gradient(to right,
      transparent 0px,
      black 120px,
      black calc(100% - 120px),
      transparent 100%);
  mask-image: linear-gradient(to right,
      transparent 0px,
      black 120px,
      black calc(100% - 120px),
      transparent 100%);
}

/* Remove pseudo-element spacers which were causing misalignment */
.avatar-row::before,
.avatar-row::after {
  display: none;
}

.avatar-row::-webkit-scrollbar {
  display: none;
}

.avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  width: 170px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  scroll-snap-align: start;
}

.avatar-card:hover {
  transform: translateY(-8px) scale(1.05);
  /* Lifts and scales up */
}

.avatar-img-wrap {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  background: rgba(3, 4, 6, 0.6);
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Use box-shadow for the bottom golden "shelf" instead of border-bottom to avoid circular segment overlaps */
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.9),
    0 4px 6px -1px rgba(255, 179, 15, 0.8),
    0 0 0 1px rgba(245, 158, 11, 0.08);
  transition: transform var(--transition-bounce), box-shadow var(--transition), border-color var(--transition);
  transform: translateZ(0);
  background-clip: padding-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.avatar-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 -30px 50px rgba(245, 158, 11, 0.55),
    inset 0 5px 15px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 2;
  transition: box-shadow var(--transition);
}

.avatar-card:hover .avatar-img-wrap {
  box-shadow:
    0 18px 45px rgba(255, 179, 15, 0.45),
    0 0 30px rgba(245, 158, 11, 0.25),
    0 0 0 1px rgba(245, 158, 11, 0.2);
  border-color: rgba(255, 179, 15, 0.9);
  transform: scale(1.05);
}

.avatar-card:hover .avatar-img-wrap::after {
  box-shadow: none;
  opacity: 0;
}

.avatar-img-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* Clip the image tightly */
  object-fit: cover;
  object-position: top center;
  /* Ensures majestic portrait alignment (no heads cut off) */
  background: var(--bg-800);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1.05) translateY(2%);
}

.avatar-card:hover .avatar-img-wrap img {
  transform: scale(1.12) translateY(2%);
  /* Image slowly zooms in on hover */
}

/* Specific adjustment to crop/fill the Prabhudasbhai SVG which has extra empty space */
.avatar-img-wrap img[src*="prabhudasbhai"] {
  transform: scale(2.4) translateY(12%);
}

.avatar-card:hover .avatar-img-wrap img[src*="prabhudasbhai"] {
  transform: scale(2.5) translateY(12%);
}

/* Specific adjustment for Bhakto image (which is text) so it's not cut off */
.avatar-img-wrap img[src*="bhakto"] {
  transform: scale(0.9);
  object-position: center;
}

.avatar-card:hover .avatar-img-wrap img[src*="bhakto"] {
  transform: scale(0.98);
}

/* Fallback full-name text inside circle */
.avatar-fallback {
  font-family: var(--font-gu-sans);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--saffron-400);
  line-height: 1.1;
  text-align: center;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-all;
  transition: transform 0.4s ease, color var(--transition);
}

.avatar-card:hover .avatar-fallback {
  transform: scale(1.1);
  color: var(--gold-500);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.avatar-label {
  font-family: var(--font-gu-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  max-width: 200px;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  hyphens: none !important;
  transition: all 0.3s ease;
}

.avatar-card:hover .avatar-label {
  color: var(--gold-300);
  /* Brighter gold on hover */
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* ============================================================
   ALBUM CARDS (Paravani)
   ============================================================ */
.album-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  width: 170px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  scroll-snap-align: start;
}

.album-card:hover {
  transform: translateY(-8px) scale(1.05);
  /* Lifts and scales up */
}

.album-img-wrap {
  width: 154px;
  height: 154px;
  border-radius: 12px;
  /* Square with rounded corners */
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-bottom: 5px solid rgba(255, 179, 15, 0.98);
  background: rgba(18, 12, 6, 0.85);
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(245, 158, 11, 0.08),
    0 4px 20px rgba(245, 158, 11, 0.12);
  transition: transform var(--transition-bounce), box-shadow var(--transition), border-color var(--transition);
  transform: translateZ(0);
}

.album-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  /* Match wrap radius */
  box-shadow:
    inset 0 -30px 50px rgba(245, 158, 11, 0.55),
    inset 0 5px 15px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 2;
  transition: box-shadow var(--transition);
}

.album-card:hover .album-img-wrap {
  box-shadow:
    0 18px 45px rgba(255, 179, 15, 0.45),
    0 0 30px rgba(245, 158, 11, 0.25),
    0 0 0 1px rgba(245, 158, 11, 0.2);
  border-color: rgba(255, 179, 15, 0.9);
  transform: scale(1.05);
}

.album-card:hover .album-img-wrap::after {
  box-shadow: none;
  opacity: 0;
}

.album-img-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  /* Match wrap radius */
  object-fit: cover;
  object-position: center;
  background: var(--bg-800);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.album-card:hover .album-img-wrap img {
  transform: scale(1.08);
  /* Image slowly zooms in on hover */
}

/* Fallback full-name text inside square */
.album-fallback {
  font-family: var(--font-gu-sans);
  font-size: 1.35rem;
  /* slightly smaller to fit well */
  font-weight: 700;
  color: var(--saffron-400);
  line-height: 1.3;
  text-align: center;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  /* CRITICAL: only wrap at word boundaries (spaces), no mid-word ripping */
  /* CRITICAL: only wrap at word boundaries (spaces), no mid-word ripping */
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  hyphens: none !important;
  transition: transform 0.4s ease, color var(--transition);
}

.album-card:hover .album-fallback {
  transform: scale(1.05);
  /* slightly subtler scale */
  color: var(--gold-500);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.album-label {
  font-family: var(--font-gu-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  max-width: 200px;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  hyphens: none !important;
  transition: all 0.3s ease;
}

.album-card:hover .album-label {
  color: var(--gold-300);
  /* Brighter gold on hover */
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* ============================================================
   CATEGORY CARDS (categories page)
   ============================================================ */
.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.category-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-inner), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.category-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-6px);
  box-shadow: none !important;
  background: var(--card-hover);
}

.category-card-name {
  font-family: var(--font-gu);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-400);
}

.category-card-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.category-card-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ============================================================
   SORT & FILTERS
   ============================================================ */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sort-select {
  background: var(--navy-700);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font-gu-sans);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.sort-select:focus {
  border-color: var(--gold-500);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.page-btn {
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 600;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* Modern circle shape */
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: linear-gradient(135deg, var(--saffron-400), var(--saffron-500));
  color: var(--bg-900);
  border-color: var(--saffron-400);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-box {
  display: flex;
  gap: 0.75rem;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.search-input {
  flex: 1;
  background: var(--navy-700);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-gu-sans);
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

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

.search-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

.search-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.search-filters label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.search-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  min-height: 1.2rem;
}

.search-summary strong {
  color: var(--gold-400);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ============================================================
   ARTICLE DETAIL PAGE
   ============================================================ */
.article-main {
  padding-top: 80px;
  padding-bottom: 2rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
  padding-top: 3rem;
}

.article-body {
  position: relative;
  /* To contain the neon backdrop */
  z-index: 1;
  min-width: 0;
  max-width: 1550px;
  margin: 0 auto 2rem auto;
  background: transparent;
  /* Crystal transparent reading area */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem 4rem;
  border-radius: 2.2rem;
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-bottom: 5px solid rgba(255, 179, 15, 0.98);
  /* Intense neon border glows (inner + outer) */
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(245, 158, 11, 0.25),
    inset 0 0 25px rgba(245, 158, 11, 0.12),
    inset 0 1px 2px rgba(255, 200, 80, 0.15);
}


@media (max-width: 768px) {
  .article-body {
    padding: 1.75rem 1.25rem;
    border-radius: 1.25rem;
  }

  .article-title-h1 {
    font-size: calc(1.5rem * var(--font-scale));
  }

  .article-content {
    font-size: calc(1.05rem * var(--font-scale));
    line-height: 1.9;
  }

  .article-toolbar-actions {
    justify-content: flex-start;
    width: 100%;
    margin-top: 0.75rem;
  }

  .article-meta-group {
    justify-content: flex-start;
  }
}

.article-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── slim toolbar: back | category+date | zen ── */
.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.article-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  font-family: var(--font-gu-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-bottom: 3px solid rgba(245, 166, 35, 0.5);
  border-radius: var(--radius-pill);
  background: rgba(245, 166, 35, 0.05);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.article-back-btn:hover {
  color: var(--gold-400);
  border-color: var(--gold-400);
  border-bottom-color: var(--gold-400);
  background: rgba(245, 166, 35, 0.1);
}

.article-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.article-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  flex: 1;
  flex-wrap: wrap;
}

.article-meta-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── title ── */
.article-title-h1 {
  font-family: var(--font-gu);
  font-size: clamp(calc(1.6rem * var(--font-scale)), calc(3.5vw * var(--font-scale)), calc(2.4rem * var(--font-scale)));
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
  transition: font-size 0.3s ease;
  margin-bottom: 0.85rem;
  /* Subtle gold shine */
  background: linear-gradient(135deg, #fff8ec 0%, #f4c842 50%, #fde082 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── author / location meta row ── */
.article-meta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.article-author-badge {
  font-family: var(--font-gu-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--saffron-300);
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  padding: 0.25rem 0.9rem;
  border-radius: var(--radius-pill);
}

.article-location-badge {
  font-family: var(--font-gu-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-featured-img {
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.article-content {
  font-family: var(--font-gu);
  font-size: calc(1.18rem * var(--font-scale));
  line-height: 1.85;
  /* Reduced from 2.1 for tighter look */
  /* Warm ivory — easy on eyes, not glaring white */
  color: #e8dfd0;
  letter-spacing: 0.01em;
  transition: font-size 0.3s ease;
}

.article-content p {
  margin-bottom: 1.25em;
  /* Reduced from 1.55em */
  text-align: justify;
}

.article-content h2 {
  font-size: calc(1.4rem * var(--font-scale));
  color: var(--gold-400);
  margin: 2em 0 0.6em;
  transition: font-size 0.3s ease;
}

.article-content h3 {
  font-size: calc(1.15rem * var(--font-scale));
  color: var(--text-white);
  margin: 1.5em 0 0.5em;
  transition: font-size 0.3s ease;
}

.article-content blockquote {
  border-left: 3px solid var(--gold-500);
  padding: 0.75rem 1.25rem;
  margin: 1.5em 0;
  color: var(--text-secondary);
  font-style: italic;
  background: rgba(212, 160, 23, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(212, 160, 23, 0.12);
}

.article-tag {
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

.article-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.article-nav a {
  flex: 1;
  min-width: 160px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-gu-sans);
  font-weight: 600;
  transition: all var(--transition);
}

.article-nav a:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.sidebar-title {
  font-family: var(--font-gu);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 1rem;
}

.related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-list li a {
  font-family: var(--font-gu-sans);
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(212, 160, 23, 0.08);
  transition: color var(--transition);
}

.related-list li a:hover {
  color: var(--gold-400);
}

.more-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-500);
}

/* Share bar */
.share-bar {
  background: var(--navy-800);
  border-top: 1px solid rgba(212, 160, 23, 0.1);
  border-bottom: 1px solid rgba(212, 160, 23, 0.1);
  padding: 0.9rem 0;
}

.share-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-en);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-600);
  background: rgba(212, 160, 23, 0.08);
  color: var(--gold-400);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.share-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}

.share-btn:hover {
  border-color: var(--gold-500);
  color: var(--gold-400);
  background: rgba(212, 160, 23, 0.15);
  transform: translateY(-2px);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form-wrap .section-title,
.contact-info .section-title {
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-gu-sans);
}

.form-input {
  background: var(--navy-700);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-gu-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

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

.form-feedback {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  font-family: var(--font-gu-sans);
}

.form-feedback.success {
  background: rgba(72, 199, 89, 0.1);
  color: #48c759;
  border: 1px solid rgba(72, 199, 89, 0.3);
}

.form-feedback.error {
  background: rgba(255, 80, 80, 0.1);
  color: #ff5050;
  border: 1px solid rgba(255, 80, 80, 0.3);
}

.contact-info-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(212, 160, 23, 0.1);
}

.contact-detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-en);
}

.contact-detail-value {
  font-size: 1rem;
  color: var(--gold-400);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: transparent;
  border-top: none;
  box-shadow: none;
  padding: 2.5rem 0;
  margin-top: auto;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.45), transparent);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-gu-sans);
  transition: color var(--transition), text-shadow var(--transition);
}

.footer-links a:hover {
  color: var(--gold-400);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Section eyebrow label */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saffron-500);
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-animate {
  animation: fadeInUp 0.5s ease both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {

  /* Mobile Menu Styles with Staggered Animation */
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 4, 6, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
    z-index: 999;
    border-bottom: none;
  }

  .nav-links.open {
    display: flex;
    animation: fadeInMenu 0.4s ease forwards;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .nav-links.open li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered transition delays for nav items */
  .nav-links.open li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-links.open li:nth-child(2) {
    transition-delay: 0.15s;
  }

  .nav-links.open li:nth-child(3) {
    transition-delay: 0.2s;
  }

  .nav-links.open li:nth-child(4) {
    transition-delay: 0.25s;
  }

  .nav-links.open li:nth-child(5) {
    transition-delay: 0.3s;
  }

  @keyframes fadeInMenu {
    from {
      opacity: 0;
      background: rgba(3, 4, 6, 0);
    }

    to {
      opacity: 1;
      background: rgba(3, 4, 6, 0.98);
    }
  }

  .nav-toggle {
    display: block;
  }


  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {

  /* Horizontal Scrolling Article Cards on mobile */
  #articlesGrid.cards-grid {
    flex-direction: row;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.75rem 20px 2rem 20px;
    margin: 0 -20px;
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
    gap: 1rem;
    scrollbar-width: none;
  }

  #articlesGrid.cards-grid .article-card {
    min-width: 310px;
    width: 310px;
    scroll-snap-align: center;
  }

  #articlesGrid.cards-grid::-webkit-scrollbar {
    display: none;
  }

  /* Shrink Avatar & Album Circles on small mobile */
  .avatar-card,
  .album-card {
    width: 130px;
    gap: 0.5rem;
  }

  .avatar-img-wrap,
  .album-img-wrap {
    width: 110px;
    height: 110px;
  }

  .avatar-label,
  .album-label {
    font-size: 0.8rem;
    max-width: 130px;
    word-break: keep-all !important;
  }

}

/* ============================================================
   COMPONENTS / UTILS
   ============================================================ */
/* Scroll Reveal */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Tool Buttons (Zen, Font size) */
.article-tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-en);
  font-weight: 600;
}

.article-tool-btn:hover {
  color: var(--saffron-400);
  background: rgba(245, 166, 35, 0.1);
  border-color: rgba(245, 166, 35, 0.3);
  transform: scale(1.05);
}

/* Zen Reading Mode */
body.zen-mode {
  background-color: #0b0f19;
}

body.zen-mode .navbar,
body.zen-mode .footer,
body.zen-mode .share-bar,
body.zen-mode .article-sidebar,
body.zen-mode .article-nav,
body.zen-mode .article-meta-row,
body.zen-mode .category-badge,
body.zen-mode .article-tags {
  display: none !important;
}

/* Admin Specific */
.admin-edit-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  font-family: var(--font-gu-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-400);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-500);
  border-radius: 20px;
  transition: all var(--transition);
  margin-top: 0.5rem;
}

.admin-edit-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--saffron-400);
  transform: translateY(-2px);
}

/* Date Picker Fixes */
input[type="date"] {
  min-width: 150px;
}

input[type="date"]::-webkit-datetime-edit-year-field {
  width: 3.5em !important;
}

/* ============================================================
   SECURITY / COPY PROTECTION
   ============================================================ */
/* Global text selection restriction */
body {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Allow text selection in inputs, textareas, and specific admin/content areas */
input,
textarea,
[contenteditable="true"],
.admin-panel,
.admin-table,
.add-form-container,
.bulk-bar,
.auth-container {
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  user-select: auto !important;
}

/* ============================================================
   CONCEPT 3.0: MIDNIGHT OBSIDIAN — ULTRA PREMIUM DARK
   ============================================================ */

/* ── OVERRIDING ROOT VARIABLES GLOBALLY FOR THIS THEME ── */
:root {
  --bg-900: #020202 !important;
  /* Pure OLED Black */
  --bg-800: #0a0a0a !important;
  /* Deep Obsidian */
  --bg-700: #121212 !important;
  --bg-600: #1a1a1a !important;
  --saffron-400: #facc15 !important;
  --saffron-500: #ffb800 !important;
  /* Electric Glow Saffron */
  --saffron-600: #f59e0b !important;
  --saffron-glow: rgba(255, 184, 0, 0.4) !important;
  --text-primary: #e5e5e5 !important;
  --text-title: #ffffff !important;
  --text-muted: #737373 !important;
  /* Card redefinitions */
  --card-bg: rgba(10, 10, 10, 0.8) !important;
  --card-hover-bg: rgba(20, 20, 20, 0.95) !important;
  --card-border: rgba(255, 184, 0, 0.15) !important;
  --card-hover-border: rgba(255, 184, 0, 0.5) !important;
}

/* 1. Global Background & Premium Depth */
body {
  background-color: var(--bg-900) !important;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 184, 0, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.02) 0%, transparent 50%) !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  color: var(--text-primary) !important;
}

/* Subtle texture overlay — Keeps it from looking perfectly flat */
body::after {
  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='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025;
  /* Slightly increased for pure black */
  pointer-events: none;
  z-index: -1;
}

/* 2. Top-Bar Obsidian (Desktop & Global) */
/* The navbar is transparent at the absolute top, but once scrolled, it will take the .scrolled glassmorphic background */

.logo-gu {
  color: var(--saffron-500) !important;
  text-shadow: 0 0 15px rgba(255, 184, 0, 0.4) !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  transition: all 0.3s ease !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--saffron-500) !important;
  text-shadow: 0 0 10px rgba(255, 184, 0, 0.3) !important;
}

/* 3. Hero Image Visibility - Much Stronger for Mobile */
.hero-top-img {
  mask-image: radial-gradient(circle at center, black 30%, rgba(0, 0, 0, 0.5) 60%, transparent 95%) !important;
  -webkit-mask-image: radial-gradient(circle at center, black 30%, rgba(0, 0, 0, 0.5) 60%, transparent 95%) !important;
  opacity: 0.4 !important;
  filter: drop-shadow(0 0 30px rgba(255, 184, 0, 0.2)) brightness(0.8) !important;
}

.hero-calligraphy {
  filter: drop-shadow(0 0 25px rgba(255, 184, 0, 0.6)) drop-shadow(0 0 50px rgba(255, 184, 0, 0.3)) !important;
}

/* 4. Organic Shapes & Intensity Shadow Glows */
:root {
  --radius-organic: 30px 70px 40px 80px / 50px 40px 90px 60px;
}

.article-card {
  border-radius: var(--radius-organic) !important;
  background: var(--card-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.03) !important;
  box-shadow: none !important;
}

.article-card:hover {
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40% !important;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(5, 5, 5, 1)) !important;
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: none !important;
}

/* 5. Minimalist Zen Mode (3.0 Obsidian) */
body.zen-mode {
  background: #000000 !important;
}

body.zen-mode .article-title-h1 {
  background: linear-gradient(135deg, #ffffff 0%, #ffb800 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Mobile Tweak */
@media (max-width: 767px) {
  body {
    background-image:
      radial-gradient(circle at 50% 0%, rgba(255, 184, 0, 0.15) 0%, transparent 50%) !important;
  }

  /* Extreme hero visibility boost */
  .hero-top-img {
    opacity: 0.95 !important;
    filter: drop-shadow(0 0 40px rgba(255, 184, 0, 0.6)) brightness(1.2) contrast(1.1) !important;
    transform: scale(2.4) translateY(-2.5rem) !important;
  }

  .hero-calligraphy {
    filter: drop-shadow(0 0 30px rgba(255, 184, 0, 0.8)) !important;
    transform: scale(3.8) translateY(-0.5rem) !important;
  }

  /* Fix Outerglow UI for article cards */
  .cards-grid {
    padding-bottom: 3rem !important;
    /* Extra space so glow isn't cut off */
    overflow: visible !important;
  }

  .neon-bg-span {
    display: none !important;
  }

  .neon-latest-card .content {
    border-bottom: 5px solid rgba(255, 184, 0, 1) !important;
    box-shadow: none !important;
    background: none !important;
    /* Extra measure to ensure no sneaky background shapes */
  }
}

.reading-progress-container {
  display: none !important;
}

/* Hiding progress bar per user request */

/* ============================================================
   LIGHT THEME INVERT
   ============================================================ */
body.light-mode {
  --bg-900: #f6ebe3;
  --bg-800: #eeeff1;
  --bg-700: #f2e3d5;
  --bg-600: #e8d0bd;
  --bg-500: #d9b8a0;

  --text-white: #1a120b;
  --text-title: #2b1c14;
  --text-primary: #3b281b;
  --text-secondary: #5a4030;
  --text-muted: #755b48;

  --card-bg: rgba(255, 250, 246, 0.85);
  --card-border: rgba(240, 186, 154, 0.3);
  --card-hover-bg: rgba(255, 255, 255, 0.95);
  --card-hover-border: rgba(240, 186, 154, 0.6);

  --saffron-glow: rgba(240, 186, 154, 0.4);
  --shadow-glow: 0 0 30px rgba(240, 186, 154, 0.2);
  --shadow-inner: inset 0 1px 1px rgba(0, 0, 0, 0.03);
}

body.light-mode::before {
  opacity: 1 !important;
  filter: contrast(1.1) brightness(1.0) !important;
  /* Ensure the background image is fully opaque and vibrant */
}

body.light-mode::after {
  /* LIGHT OVERLAY: drastically reduced from 0.95 to 0.2 to remove "obstacle" masking the image */
  background: linear-gradient(135deg,
      rgba(240, 186, 154, 0.25) 0%,
      rgba(246, 235, 227, 0.20) 45%,
      rgba(238, 239, 241, 0.15) 100%) !important;
  opacity: 1 !important;
}

body.light-mode .hero-quote {
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: none !important;
  color: #b45309 !important;
  text-shadow: none !important;
}

body.light-mode .hero-quote::after,
body.light-mode .hero-quote::before {
  display: none !important;
  box-shadow: none !important;
  background: none !important;
}

body.light-mode .hero-quote .quote-author {
  color: var(--text-secondary);
  text-shadow: none;
}

body.light-mode .logo-gu {
  color: var(--saffron-700);
}

body.light-mode .nav-link {
  color: var(--text-primary);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  border-radius: 50%;
}

.theme-toggle:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold-500);
  transform: scale(1.1);
}

body.light-mode .theme-toggle {
  color: var(--saffron-700);
}

body.light-mode .theme-toggle:hover {
  background: rgba(180, 83, 9, 0.1);
}

/* Enhance Section Titles */
body.light-mode .section-title {
  background: linear-gradient(135deg, #b45309 0%, #d97706 35%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: none;
  text-shadow: none;
}

body.light-mode .section-title::after {
  background: linear-gradient(90deg, #d97706, rgba(217, 119, 6, 0.4), transparent);
  box-shadow: none;
}

/* Enhance Latest Cards & Neon */
body.light-mode .neon-latest-card .neon-bg-span {
  display: none !important;
}

body.light-mode .article-card .content,
body.light-mode .neon-latest-card .content {
  background: var(--card-bg) !important;
  border-color: rgba(240, 186, 154, 0.4) !important;
  border-bottom: 5px solid rgba(240, 186, 154, 0.9) !important;
  box-shadow: none !important;
}

body.light-mode .article-card:hover .content,
body.light-mode .neon-latest-card:hover .content {
  background: var(--card-hover-bg) !important;
  border-top-color: rgba(240, 186, 154, 0.6) !important;
  box-shadow: none !important;
}

/* Enhance Card Text */
body.light-mode .card-title {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--text-title);
  filter: none;
  text-shadow: none;
}

body.light-mode .card-excerpt,
body.light-mode .card-date {
  color: var(--text-secondary);
}

body.light-mode .card-prasang-label {
  color: #d97706;
}

/* Enhance Read More Button */
body.light-mode .read-more {
  color: #b45309;
  border-color: rgba(240, 186, 154, 0.6);
  background: rgba(240, 186, 154, 0.15);
  box-shadow: none;
}

body.light-mode .read-more:hover {
  color: var(--bg-900);
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #d97706;
}

/* Enhance Hero Buttons */
body.light-mode .btn-primary,
body.light-mode .btn-outline {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #92400e !important;
  border-color: rgba(240, 186, 154, 0.8) !important;
  border-bottom-color: rgba(240, 186, 154, 1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .btn-primary:hover,
body.light-mode .btn-outline:hover {
  background: #ffffff !important;
  color: #78350f !important;
  border-color: #d97706 !important;
  box-shadow: 0 8px 25px rgba(240, 186, 154, 0.4) !important;
}

/* Enhance Category Chips */
body.light-mode .category-chip {
  background: var(--card-bg) !important;
  color: var(--text-secondary) !important;
  border-color: rgba(240, 186, 154, 0.6) !important;
  border-bottom-color: rgba(240, 186, 154, 0.9) !important;
}

body.light-mode .category-chip:hover,
body.light-mode .category-chip.active {
  background: rgba(240, 186, 154, 0.3) !important;
  color: #92400e !important;
}

/* Enhance Avatar Borders & Text */
body.light-mode .avatar-img-wrap,
body.light-mode .prasang-banner-avatar {
  background: var(--card-bg) !important;
  border-color: rgba(240, 186, 154, 0.6) !important;
  box-shadow: none !important;
}

body.light-mode .avatar-img-wrap::after,
body.light-mode .prasang-banner-avatar::after {
  box-shadow: none !important;
}

body.light-mode .avatar-label,
body.light-mode .avatar-fallback {
  color: var(--text-title);
}

body.light-mode .avatar-card:hover .avatar-label {
  color: #d97706;
  text-shadow: none;
}

/* Enhance Scroll Controls */
body.light-mode .scroll-btn {
  background: var(--card-bg) !important;
  color: #b45309 !important;
  border-color: rgba(240, 186, 154, 0.4) !important;
  border-bottom-color: rgba(240, 186, 154, 0.8) !important;
  box-shadow: none !important;
}

body.light-mode .scroll-btn:hover {
  background: rgba(240, 186, 154, 0.3) !important;
  color: #92400e !important;
  box-shadow: none !important;
}

/* Enforce zero-shadow policy for all cards globally in light mode */
body.light-mode .article-card,
body.light-mode .article-card .content,
body.light-mode .neon-latest-card,
body.light-mode .neon-latest-card .content {
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  text-shadow: none !important;
  background: var(--card-bg) !important;
}

/* Fix Category Badge & Back Button in Light Mode */
body.light-mode .category-badge {
  color: #78350f !important;
  background: linear-gradient(135deg, #fef3c7, #fcd34d) !important;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.1) !important;
  border: 1px solid rgba(180, 83, 9, 0.2) !important;
}

body.light-mode .article-back-btn {
  background: #fff !important;
  color: #92400e !important;
  border: 1px solid rgba(180, 83, 9, 0.3) !important;
  box-shadow: none !important;
}

body.light-mode .article-back-btn:hover {
  background: #fef3c7 !important;
}

body.light-mode .article-location-badge {
  color: #92400e !important;
  background: rgba(180, 83, 9, 0.05) !important;
}

/* Fix Article Reading Page Readability in Light Mode */
body.light-mode .article-content {
  color: var(--text-primary) !important;
}

body.light-mode .article-content h2,
body.light-mode .article-content h3 {
  color: var(--text-title) !important;
}

body.light-mode .related-list li a {
  color: var(--text-primary) !important;
  text-shadow: none !important;
}

body.light-mode .related-list li a:hover {
  color: #b45309 !important;
}

body.light-mode .sidebar-title {
  color: var(--text-title) !important;
}

body.light-mode .more-link {
  color: #b45309 !important;
}

body.light-mode .article-title-h1 {
  background: none !important;
  -webkit-text-fill-color: var(--text-title) !important;
  color: var(--text-title) !important;
}

body.light-mode .article-author-badge {
  color: #92400e !important;
  background: rgba(240, 186, 154, 0.3) !important;
  border-color: rgba(240, 186, 154, 0.6) !important;
}

body.light-mode .article-meta-group .card-date {
  color: var(--text-secondary) !important;
}

body.light-mode .reading-time-badge {
  color: var(--text-muted) !important;
}

/* Light Mode Scrolled Navbar Glassmorphism */
body.light-mode .navbar.scrolled {
  background: rgba(255, 252, 248, 0.98) !important; /* Higher opacity to prevent collision */
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(180, 83, 9, 0.15) !important;
  box-shadow: 0 4px 20px rgba(180, 83, 9, 0.08) !important;
}

/* Fix Chip & Button Visibility in Light Mode */
body.light-mode .category-chip {
  background: #fff !important;
  color: #92400e !important;
  border: 1px solid rgba(180, 83, 9, 0.3) !important;
}

body.light-mode .category-chip.active {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #d97706 !important;
}

body.light-mode .btn-outline {
  background: #fff !important;
  color: #92400e !important;
  border-color: rgba(180, 83, 9, 0.4) !important;
}

/* Share Bar & Footer Visibility */
body.light-mode .share-bar {
  background: rgba(255, 252, 248, 0.8) !important;
  border-top: 1px solid rgba(180, 83, 9, 0.1) !important;
  border-bottom: 1px solid rgba(180, 83, 9, 0.1) !important;
}

body.light-mode .share-label {
  color: #92400e !important;
  font-weight: 600;
}

body.light-mode .share-btn {
  background: #fff !important;
  border-color: rgba(180, 83, 9, 0.3) !important;
  color: #d97706 !important;
}

body.light-mode .share-btn:hover {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
}

body.light-mode .footer {
  background: #faf7f2 !important;
  border-top: 1px solid rgba(180, 83, 9, 0.1) !important;
}

body.light-mode .footer-brand p {
  color: #92400e !important;
}

body.light-mode .footer .logo-gu {
  color: #b45309 !important;
  text-shadow: none !important;
}

body.light-mode .footer-links a {
  color: #92400e !important;
}

body.light-mode .footer-links a:hover {
  color: #d97706 !important;
}

/* Global Logo Visibility in Light Mode */
body.light-mode .logo-gu {
  color: #b45309 !important;
  text-shadow: none !important;
}

body.light-mode #particles-js {
  opacity: 0.3 !important;
  filter: contrast(1.2);
}
/* ============================================================
   GLOBAL PAGE LOADER (Book Animation)
   ============================================================ */
.global-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-900);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.global-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.global-loader .loader {
  display: flex;
  align-items: center;
  justify-content: center;
}
.global-loader .book-wrapper {
  width: 150px;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.global-loader .book {
  width: 100%;
  height: auto;
  filter: drop-shadow(0px 8px 15px rgba(245, 158, 11, 0.15));
}
.global-loader .book-wrapper .book-page {
  width: 50%;
  height: auto;
  position: absolute;
  animation: paging 1.2s linear infinite;
  transform-origin: left;
}
@keyframes paging {
  0% { transform: rotateY(0deg) skewY(0deg); }
  50% { transform: rotateY(90deg) skewY(-20deg); }
  100% { transform: rotateY(180deg) skewY(0deg); }
}

/* ============================================================
   3D ROTATING CAROUSEL — Latest Articles
   Based on ilkhoeri's Uiverse component, adapted to
   Organic Saffron theme with card content.
   ============================================================ */

/* The outer centering wrapper that sets the stage height */
.carousel-3d-wrapper {
  width: 100%;
  height: 520px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  overflow-x: clip;
  margin: 1rem 0 3.5rem;
}

/* The rotating cylinder — all positional maths happen here */
.carousel-3d-inner {
  --w: 200px;
  --h: 224px;
  --translateZ: 420px;
  --rotateX: -10deg;
  --perspective: 1200px;
  position: absolute;
  width: var(--w);
  height: var(--h);
  top: calc(50% - (var(--h) / 2));
  left: calc(50% - (var(--w) / 2));
  z-index: 2;
  transform-style: preserve-3d;
  transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0deg);
  animation: carousel-rotate 28s linear infinite;
}

/* Pause rotation ONLY when user hovers over an actual card */
.carousel-3d-inner:has(.carousel-3d-card:hover) {
  animation-play-state: paused;
}

@keyframes carousel-rotate {
  from {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0deg);
  }
  to {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(1turn);
  }
}

/* Individual card face positioned around the cylinder */
.carousel-3d-card {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-bottom: 4px solid rgba(255, 179, 15, 0.9);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transform:
    rotateY(calc((360deg / var(--quantity)) * var(--index)))
    translateZ(var(--translateZ));
  background: rgba(26, 18, 11, 0.0);
  /* The radial gradient fills the card with a saffron-tinted glow */
  background-image: radial-gradient(
    circle at center,
    rgba(245, 158, 11, 0.08) 0%,
    rgba(245, 158, 11, 0.18) 60%,
    rgba(245, 158, 11, 0.35) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.carousel-3d-card:hover {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow:
    0 0 30px rgba(245, 158, 11, 0.25),
    inset 0 1px 0 rgba(255, 225, 150, 0.2);
}


/* Text content area */
.carousel-3d-content {
  flex: 1;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.35rem;
  overflow: hidden;
}

.carousel-3d-title {
  font-family: var(--font-gu);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-title);
  line-height: 1.3;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-3d-label {
  font-family: var(--font-gu-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff8f59;
  margin: 0;
}

.carousel-3d-excerpt {
  font-family: var(--font-gu-sans);
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.75;
  color: var(--text-secondary);
  line-height: 1.4;
  transform: scale(0.8);
  transform-origin: left top;
  width: 125%;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Mobile: shrink the cylinder so it fits narrow screens */
@media (max-width: 768px) {
  .carousel-3d-wrapper {
    height: 420px;
  }

  .carousel-3d-inner {
    --w: 155px;
    --h: 176px;
    --translateZ: 300px;
  }
}

