/* =========================================================
   Bible Lamhil - Animated Glassmorphism & Material Design
   Owner & Editor: Rev. Dr. Satminlen Khongsai
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lexend:wght@400;500;600;700&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;1,7..72,400&family=Lora:ital,wght@0,400;0,600;1,400&family=Merriweather:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block');

/* Prevent Broken Icon Text Flash */
html.fonts-loading .material-symbols-rounded,
.fonts-loading .material-symbols-rounded {
  visibility: hidden !important;
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded', sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 1, 'wght' 450, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  flex-shrink: 0;
}

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, Cambria, serif;

  /* Theme Colors (Light) */
  --bg-gradient: radial-gradient(at 0% 0%, #e0e7ff 0px, transparent 50%),
                 radial-gradient(at 100% 0%, #fef3c7 0px, transparent 50%),
                 radial-gradient(at 100% 100%, #dbeafe 0px, transparent 50%),
                 radial-gradient(at 0% 100%, #f1f5f9 0px, transparent 50%),
                 #f8fafc;
  --bg-main: #f8fafc;
  
  /* Glass Variables (Light) */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.88);
  --glass-bg-subtle: rgba(241, 245, 249, 0.7);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-subtle: rgba(226, 232, 240, 0.75);
  --glass-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --glass-shadow-hover: 0 20px 40px -10px rgba(30, 58, 138, 0.12), 0 8px 12px -3px rgba(30, 58, 138, 0.06);
  --glass-blur: blur(20px) saturate(190%);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --primary: #2563eb;          /* Modern Electric Royal Blue */
  --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  --primary-subtle: rgba(37, 99, 235, 0.1);
  --accent: #d97706;           /* Biblical Amber/Gold */
  --accent-gradient: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
  --accent-subtle: rgba(217, 119, 6, 0.12);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  
  --header-height: 64px;
  --mobile-nav-height: 62px;
}

[data-theme="dark"] {
  --bg-gradient: radial-gradient(at 0% 0%, #172554 0px, transparent 50%),
                 radial-gradient(at 100% 0%, #451a03 0px, transparent 40%),
                 radial-gradient(at 50% 100%, #1e1b4b 0px, transparent 50%),
                 #090d16;
  --bg-main: #090d16;
  
  /* Glass Variables (Dark) */
  --glass-bg: rgba(19, 26, 44, 0.7);
  --glass-bg-hover: rgba(28, 38, 64, 0.85);
  --glass-bg-subtle: rgba(30, 41, 59, 0.65);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-border-subtle: rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.45);
  --glass-shadow-hover: 0 20px 45px 0 rgba(0, 0, 0, 0.65), 0 0 20px rgba(59, 130, 246, 0.2);
  --glass-blur: blur(25px) saturate(200%);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #090d16;
  
  --primary: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 50%, #60a5fa 100%);
  --primary-subtle: rgba(59, 130, 246, 0.18);
  --accent: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  --accent-subtle: rgba(245, 158, 11, 0.18);
}

[data-theme="sepia"] {
  --bg-gradient: radial-gradient(at 0% 0%, #fef3c7 0px, transparent 50%),
                 radial-gradient(at 100% 0%, #fae8c8 0px, transparent 40%),
                 radial-gradient(at 50% 100%, #f5e6cb 0px, transparent 50%),
                 #f7ede2;
  --bg-main: #f7ede2;
  
  /* Glass Variables (Sepia) */
  --glass-bg: rgba(247, 237, 226, 0.84);
  --glass-bg-hover: rgba(254, 246, 236, 0.95);
  --glass-bg-subtle: rgba(238, 224, 208, 0.78);
  --glass-border: rgba(214, 192, 168, 0.6);
  --glass-border-subtle: rgba(214, 192, 168, 0.4);
  --glass-shadow: 0 10px 30px -5px rgba(120, 53, 15, 0.08), 0 4px 6px -2px rgba(120, 53, 15, 0.04);
  --glass-shadow-hover: 0 20px 40px -10px rgba(120, 53, 15, 0.15);
  --glass-blur: blur(20px) saturate(160%);

  --text-main: #451a03;
  --text-muted: #854d0e;
  --text-inverse: #fef3c7;
  
  --primary: #92400e;
  --primary-gradient: linear-gradient(135deg, #78350f 0%, #92400e 50%, #b45309 100%);
  --primary-subtle: rgba(146, 64, 14, 0.15);
  --accent: #b45309;
  --accent-gradient: linear-gradient(135deg, #92400e 0%, #b45309 50%, #d97706 100%);
  --accent-subtle: rgba(180, 83, 9, 0.15);
}

/* Dynamic Typography Overrides */
body.font-jakarta { font-family: 'Plus Jakarta Sans', sans-serif !important; }
body.font-playfair { font-family: 'Playfair Display', serif !important; }
body.font-merriweather { font-family: 'Merriweather', serif !important; }
body.font-lora { font-family: 'Lora', serif !important; }
body.font-inter { font-family: 'Inter', sans-serif !important; }
body.font-poppins { font-family: 'Poppins', sans-serif !important; }
body.font-literata { font-family: 'Literata', serif !important; }
body.font-lexend { font-family: 'Lexend', sans-serif !important; }

/* Dynamic Font Sizing */
body.text-size-sm .article-body, body.text-size-sm p { font-size: 0.92rem !important; line-height: 1.65 !important; }
body.text-size-md .article-body, body.text-size-md p { font-size: 1.05rem !important; line-height: 1.75 !important; }
body.text-size-lg .article-body, body.text-size-lg p { font-size: 1.18rem !important; line-height: 1.85 !important; }
body.text-size-xl .article-body, body.text-size-xl p { font-size: 1.32rem !important; line-height: 1.95 !important; }

/* =========================================================
   Base & Animated Ambient Background
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 24px);
  padding-top: env(safe-area-inset-top);
  transition: background 0.4s ease, color 0.3s ease;
  overflow-x: hidden;
  position: relative;
}

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

/* Ambient Floating Blur Mesh Orbs (Hardware Accelerated 3D) */
.ambient-glow-1 {
  position: fixed;
  top: -120px;
  left: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb1 20s ease-in-out infinite alternate;
  will-change: transform;
}

.ambient-glow-2 {
  position: fixed;
  bottom: 8%;
  right: -80px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.22) 0%, rgba(217, 119, 6, 0) 70%);
  border-radius: 50%;
  filter: blur(75px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb2 16s ease-in-out infinite alternate-reverse;
  will-change: transform;
}

.ambient-glow-3 {
  position: fixed;
  top: 45%;
  left: 35%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb3 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes floatOrb1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(80px, 60px, 0) scale(1.15); }
  100% { transform: translate3d(-40px, 100px, 0) scale(0.92); }
}

@keyframes floatOrb2 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-70px, -50px, 0) scale(1.12); }
  100% { transform: translate3d(50px, -90px, 0) scale(0.94); }
}

@keyframes floatOrb3 {
  0% { transform: translate3d(0, 0, 0) scale(0.9); }
  50% { transform: translate3d(-60px, 70px, 0) scale(1.2); }
  100% { transform: translate3d(80px, -40px, 0) scale(1); }
}

/* =========================================================
   Smooth Scroll Reveal & Stagger Animations
========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   Material Symbols Alignment & Sizing Perfection
========================================================= */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  font-variation-settings: 'FILL' 1, 'wght' 450, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

/* =========================================================
   Glassmorphic Header
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.header-scrolled {
  background: var(--glass-bg-hover);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--glass-border);
}

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

.logo-area {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-area:active {
  transform: scale(0.96);
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  padding: 4px;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-icon .material-symbols-rounded {
  font-size: 24px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.header-nav {
  display: none;
  gap: 6px;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
    align-items: center;
  }
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-muted);
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1;
  transition: all 0.2s ease;
}

.nav-link .material-symbols-rounded {
  font-size: 19px;
  width: 19px;
  height: 19px;
}

.nav-link span {
  display: inline-block;
  line-height: 1;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-icon .material-symbols-rounded {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.btn-icon:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

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

/* =========================================================
   Animated Topics Horizontal Bar (Glass Pills)
========================================================= */
.topics-bar {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border-subtle);
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
}

.topics-bar::-webkit-scrollbar {
  display: none;
}

.topics-scroll {
  display: flex;
  gap: 8px;
  padding: 0 18px;
  align-items: center;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text-muted);
  line-height: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  flex-shrink: 0;
}

.topic-pill .material-symbols-rounded {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.topic-pill span {
  display: inline-block;
  line-height: 1;
}

.topic-pill:hover {
  color: var(--text-main);
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.topic-pill:active {
  transform: scale(0.94);
}

.topic-pill.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* =========================================================
   Slidable Hero Carousel (Smart User Recommendations)
========================================================= */
.hero-carousel-container {
  margin: 10px 0 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.hero-carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 0;
  width: 100%;
  box-shadow: var(--glass-shadow-hover);
  user-select: none;
  touch-action: pan-y pinch-zoom;
}

.hero-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  align-items: stretch;
}

.hero-slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 4px;
  display: flex;
}

.hero-slide .hero-sermon {
  margin: 0;
  border-radius: var(--radius-lg);
  width: 100%;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Slider Glass Arrow Controls (Desktop only) */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}

.slider-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.slider-btn.prev-btn {
  left: 14px;
}

.slider-btn.next-btn {
  right: 14px;
}

.slider-btn .material-symbols-rounded {
  font-size: 26px;
}

/* Slider Pagination Status Bar (Tightly Positioned Below Card) */
.slider-dots {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 auto;
  padding: 2px 8px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  z-index: 5;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.35;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-dot:hover {
  opacity: 0.85;
}

.slider-dot.active {
  width: 18px;
  border-radius: var(--radius-full);
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.7);
}

/* Glass Hero Sermon Card */
.hero-sermon {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.94) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.hero-sermon::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.3) 0%, rgba(217, 119, 6, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tag {
  display: none !important;
}

.hero-badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  margin-bottom: 12px;
}

.hero-badge-cat .material-symbols-rounded {
  font-size: 14px;
}

.hero-title-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 6px;
  white-space: nowrap;
}

.hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.5px;
  width: 100%;
}

.hero-title-wrap.has-marquee .hero-title {
  text-overflow: clip;
  overflow: visible;
}

.hero-title-text {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

.hero-title-wrap.has-marquee .hero-title-text {
  animation: heroTitleMarquee 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

@keyframes heroTitleMarquee {
  0%, 20% {
    transform: translateX(0);
  }
  80%, 100% {
    transform: translateX(var(--marquee-distance, -30%));
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
}

.hero-scripture {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fef3c7;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 8px;
}

.hero-scripture .material-symbols-rounded {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.hero-excerpt {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 18px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

.hero-author {
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.hero-author .material-symbols-rounded {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.btn-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #ffffff;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  cursor: pointer;
}

.btn-read .material-symbols-rounded {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.btn-read:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5);
}

.btn-read:active {
  transform: scale(0.96);
}

/* =========================================================
   Mobile Specific Slider Rules (Uniform rectangle, No excerpt, No next/prev buttons)
========================================================= */
@media (max-width: 768px) {
  .hero-carousel-wrapper {
    margin: 12px 0 20px 0;
  }
  .hero-slide {
    padding: 0;
  }
  .hero-slide .hero-sermon {
    min-height: 220px !important;
    height: 220px !important;
    padding: 18px 16px !important;
    border-radius: var(--radius-md);
    justify-content: space-between;
  }
  .hero-slide .hero-sermon .hero-title-wrap {
    margin-bottom: 4px !important;
  }
  .hero-slide .hero-sermon .hero-title {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    display: block !important;
    overflow: hidden !important;
  }
  /* Requirement: Do not display excerpt on mobile sliding cards */
  .hero-carousel-wrapper .hero-excerpt,
  .hero-slide .hero-excerpt {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Requirement: Remove next and previous buttons on mobile */
  .hero-carousel-wrapper .slider-btn,
  .slider-btn.prev-btn,
  .slider-btn.next-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .hero-scripture {
    font-size: 0.76rem !important;
    padding: 2px 8px !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
  }
  .hero-meta {
    padding-top: 8px !important;
    margin-top: auto !important;
  }
  .hero-author {
    font-size: 0.78rem !important;
  }
  .btn-read {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    height: 34px !important;
  }
}

/* =========================================================
   Glassmorphic Article Card
========================================================= */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 900px) {
  .layout-grid {
    grid-template-columns: 2.2fr 1fr;
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.section-title .material-symbols-rounded {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.post-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  margin-bottom: 16px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: rotate(25deg) translateY(-100%);
  transition: transform 0.75s ease;
  pointer-events: none;
}

.post-card:hover::after {
  transform: rotate(25deg) translateY(100%);
}

.post-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-hover);
  border-color: rgba(59, 130, 246, 0.4);
}

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

.post-card:active {
  transform: scale(0.98);
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-subtle);
  height: 26px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.card-category .material-symbols-rounded {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.card-scripture {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.card-scripture .material-symbols-rounded {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  letter-spacing: -0.3px;
  transition: color 0.2s;
}

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

.post-card-excerpt {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border-subtle);
  padding-top: 12px;
  margin-top: 4px;
}

.post-author-name {
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.post-author-name .material-symbols-rounded {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.post-meta-details {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Mobile: Author on 1st line, Time and Date on next line so both fit in one line each */
@media (max-width: 768px) {
  .post-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 10px;
  }
  .post-author-name {
    width: 100%;
    font-size: 0.86rem;
    font-weight: 750;
    color: var(--text-main);
  }
  .post-meta-details {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: nowrap;
  }
}

/* =========================================================
   Sidebar Cards & Glass Widgets
========================================================= */
.sidebar-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

.author-widget {
  text-align: center;
}

.author-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px auto;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.9);
  overflow: hidden;
  position: relative;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-avatar .material-symbols-rounded {
  font-size: 40px;
}

.author-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.author-role {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.author-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.author-badge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  height: 36px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border-subtle);
  line-height: 1;
  transition: all 0.2s;
}

.author-badge-btn .material-symbols-rounded {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.author-badge-btn:hover {
  background: var(--primary-gradient);
  color: #fff;
}

/* Daily Verse Glass Card */
.verse-card {
  border-left: 4px solid var(--accent);
}

.verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 10px;
}

.verse-ref {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.verse-ref .material-symbols-rounded {
  font-size: 14px;
}

/* =========================================================
   Single Article / Reader View
========================================================= */
.article-container {
  max-width: 780px;
  margin: 20px auto 40px auto;
  padding: 0 16px;
}

.article-header {
  margin-bottom: 24px;
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-subtle);
  height: 28px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  line-height: 1;
}

.article-category-badge .material-symbols-rounded {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.article-title {
  font-size: 1.85rem;
  font-weight: 850;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.6px;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 2.5rem;
  }
}

.article-meta-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border-subtle);
  padding-bottom: 16px;
  margin-bottom: 22px;
}

.article-author-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--text-main);
}

.article-author-row .material-symbols-rounded {
  font-size: 18px;
  color: var(--primary);
}

.article-submeta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-meta-item .material-symbols-rounded {
  font-size: 15px;
  color: var(--text-muted);
}

.scripture-box {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
}

.scripture-box-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.scripture-box-title .material-symbols-rounded {
  font-size: 17px;
  width: 17px;
  height: 17px;
}

.scripture-box-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-main);
  line-height: 1.55;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
}

.font-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-font {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.2;
}

.btn-font:hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

.btn-font:active {
  transform: scale(0.92);
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-main);
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2, .article-body h3, .article-body h4 {
  color: var(--text-main);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-weight: 850;
  line-height: 1.3;
}

.article-body blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  border-left: 4px solid var(--accent);
  padding: 14px 20px;
  background: var(--glass-bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.8rem 0;
  color: var(--text-main);
}

/* Share Section */
.share-bar {
  margin: 36px 0;
  padding: 22px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.share-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.share-label .material-symbols-rounded {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.share-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 750;
  color: #fff;
  border: none;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-share .material-symbols-rounded {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.btn-share:hover {
  transform: translateY(-2px);
}

.btn-share:active {
  transform: scale(0.94);
}

.btn-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.btn-facebook { background: linear-gradient(135deg, #1877F2, #0d5ec4); }
.btn-copy { background: var(--primary-gradient); }

/* =========================================================
   Glassmorphic Mobile Floating Capsule Bottom Navigation
========================================================= */
.mobile-bottom-nav {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 14px;
  right: 14px;
  height: 64px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 0 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  flex: 1;
  height: 100%;
  padding: 4px 0;
  position: relative;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.mob-nav-icon-wrap {
  width: 32px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mob-nav-item .material-symbols-rounded {
  font-size: 23px;
  transition: all 0.25s;
}

.mob-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 1px;
}

.mob-nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 2px;
}

.mob-nav-item.active {
  color: var(--primary);
  font-weight: 850;
}

.mob-nav-item.active .mob-nav-icon-wrap {
  transform: translateY(-2px) scale(1.12);
}

.mob-nav-item.active .material-symbols-rounded {
  color: var(--primary);
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

.mob-nav-item.active .mob-nav-dot {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 8px var(--primary);
}

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

/* Mobile Bottom Nav User Avatar */
.mob-nav-avatar-wrap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mob-nav-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mob-nav-item.active .mob-nav-avatar-wrap {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.55);
  transform: scale(1.15);
}

/* =========================================================
   Search Page Form Bar & Button
========================================================= */
.search-form-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 5px 5px 5px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-bar-icon {
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.search-bar-input {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.search-bar-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent-gradient);
  color: #ffffff;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-weight: 750;
  font-size: 0.9rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.search-bar-btn .material-symbols-rounded {
  font-size: 16px;
}

.search-bar-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.45);
}

.search-bar-btn:active {
  transform: scale(0.96);
}

@media (max-width: 500px) {
  .search-form-bar {
    padding: 4px 4px 4px 12px;
    gap: 6px;
  }
  .search-bar-icon {
    font-size: 20px;
  }
  .search-bar-input {
    font-size: 0.9rem;
    padding: 6px 2px;
  }
  .search-bar-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 0.82rem;
    gap: 4px;
  }
}

/* =========================================================
   Footer
========================================================= */
.site-footer {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  padding: 42px 0 24px 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 850;
  margin-bottom: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.footer-brand h3 .material-symbols-rounded {
  font-size: 26px;
  width: 26px;
  height: 26px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.2;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  transition: color 0.2s;
}

.footer-links a .material-symbols-rounded {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border-subtle);
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Hide categories and quick links on mobile view */
@media (max-width: 767px) {
  .footer-hide-mobile {
    display: none !important;
  }
  .site-footer {
    padding: 24px 0 16px 0;
    margin-top: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
    text-align: center;
  }
  .footer-brand {
    text-align: center;
  }
  .footer-brand h3 {
    justify-content: center;
  }
  .footer-brand p {
    justify-content: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Reading Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  z-index: 100;
  background: transparent;
}

.progress-bar {
  height: 3.5px;
  background: var(--primary-gradient);
  width: 0%;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
  transition: width 0.1s ease;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Real-Time Live Update Notification Banner */
#live-update-banner {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 90%;
  max-width: 520px;
}

#live-update-banner.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.live-update-inner {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(245, 158, 11, 0.25);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.live-update-pulse {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseGreen 1.5s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.live-update-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.live-update-text strong {
  font-size: 0.88rem;
  color: #fef3c7;
  line-height: 1.2;
}

.live-update-text span {
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-update-btn {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

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

/* =========================================================
   User Account Header Pill & Dropdown Menu
========================================================= */
.header-user-wrap {
  display: none;
}

@media (min-width: 768px) {
  .header-user-wrap {
    display: flex;
    align-items: center;
  }
}

.user-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 750;
  font-size: 0.86rem;
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.user-header-btn:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
  border-color: var(--primary);
}

.user-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: #ffffff;
  display: block;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow-hover);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  animation: dropdownPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-dropdown-menu.show {
  display: flex;
}

@keyframes dropdownPop {
  0% { opacity: 0; transform: translateY(-8px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
}

.user-dropdown-item:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  transform: translateX(3px);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--glass-border-subtle);
  margin: 4px 0;
}

/* =========================================================
   Universal Glassmorphic Auth Modal (Login / Sign Up / Reset)
========================================================= */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 11000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal-card {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 30px var(--primary-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 30px 28px;
  position: relative;
  animation: authPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-main);
}

@keyframes authPop {
  0% { transform: scale(0.92) translateY(16px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 20px;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: rotate(90deg);
}

.auth-tabs-nav {
  display: flex;
  background: var(--glass-bg-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--glass-border-subtle);
}

.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-subtle);
}

.auth-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.auth-form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 20px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.auth-input:focus {
  border-color: var(--primary);
  background: var(--glass-bg-hover);
  box-shadow: 0 0 0 4px var(--primary-subtle);
}

/* Avatar Selection Grid */
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.avatar-preset-item {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  padding: 2px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

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

.avatar-preset-item.selected {
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 16px var(--primary-subtle);
}

/* Password Match Indicator */
.password-match-badge {
  font-size: 0.78rem;
  font-weight: 750;
  margin-top: 4px;
  display: none;
  align-items: center;
  gap: 4px;
}

.password-match-badge.match {
  display: flex;
  color: #10b981;
}

.password-match-badge.mismatch {
  display: flex;
  color: #ef4444;
}

/* OTP Send / Input Row */
.otp-input-row {
  display: flex;
  gap: 8px;
}

.btn-send-otp {
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-send-otp:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-auth-submit {
  width: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px var(--primary-subtle);
  transition: all 0.25s;
  margin-top: 8px;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--primary-subtle);
}

/* =========================================================
   User Dashboard Layout & Reading Progress
========================================================= */
.user-tabs-bar {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 6px;
  margin-bottom: 24px;
  gap: 6px;
  overflow-x: auto;
}

.user-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 750;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  background: transparent;
}

.user-tab-link:hover {
  color: var(--text-main);
  background: var(--glass-bg-hover);
}

.user-tab-link.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-subtle);
}

.reading-progress-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s ease;
}

.reading-progress-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

.reading-bar-track {
  width: 100%;
  height: 8px;
  background: var(--glass-bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.reading-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* =========================================================
   Live Chat System
========================================================= */
.chat-container-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-bg-hover);
}

.chat-body-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}

.chat-bubble.from-user {
  align-self: flex-end;
  background: var(--primary-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.from-admin {
  align-self: flex-start;
  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.chat-bubble-time {
  font-size: 0.72rem;
  opacity: 0.75;
  margin-top: 4px;
  text-align: right;
}

.chat-input-bar {
  padding: 14px 18px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 10px;
  background: var(--glass-bg-hover);
}

.chat-input-bar input {
  flex: 1;
  padding: 12px 18px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.08);
}

/* =========================================================
   Mobile-First Layout Grids & Enhancements
========================================================= */
.user-settings-grid,
.user-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .user-settings-grid,
  .user-shortcuts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .chat-container-card {
    height: calc(100vh - 230px);
    min-height: 420px;
    max-height: 640px;
    border-radius: var(--radius-md);
  }
  
  .chat-header {
    padding: 12px 14px;
  }
  
  .chat-body-messages {
    padding: 14px;
    gap: 10px;
  }
  
  .chat-bubble {
    max-width: 88%;
    font-size: 0.9rem;
    padding: 10px 14px;
  }
  
  .chat-input-bar {
    padding: 10px 12px;
  }
  
  .chat-input-bar input {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .chat-send-btn {
    width: 40px;
    height: 40px;
  }
  
  .auth-modal-card {
    padding: 24px 18px;
    border-radius: 24px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .avatar-preset-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .avatar-preset-item {
    width: 48px;
    height: 48px;
  }
}


