﻿/* PureVitality Guide - Custom Aesthetics & High-Conversion Styles */

:root {
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --accent-500: #0284c7;
  --accent-600: #0369a1;
  --gold-500: #f59e0b;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  scroll-behavior: smooth;
  color: #1e293b;
  background-color: #f8fafc;
}

/* Glassmorphism Navigation */
.glass-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Hero Gradient & Patterns */
.hero-gradient {
  background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.08) 0%, transparent 40%),
              #ffffff;
}

/* High-Converting CTA Pulsing Glow */
.cta-glow-btn {
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4), 0 8px 10px -6px rgba(16, 185, 129, 0.2);
}

.cta-glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px -10px rgba(16, 185, 129, 0.5), 0 10px 15px -5px rgba(16, 185, 129, 0.3);
}

.cta-glow-btn:active {
  transform: translateY(0);
}

/* Card Hover Elevate */
.card-hover {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  border-color: #cbd5e1;
}

/* Rating Stars */
.star-filled {
  color: #f59e0b;
}

/* Score Progress Bar */
.score-progress {
  height: 8px;
  border-radius: 9999px;
  background-color: #e2e8f0;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transition: width 1s ease-in-out;
}

/* Verified Badge */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Outbound Redirect Modal Animation */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-pop {
  animation: fadeInScale 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sticky TOC */
.sticky-toc {
  position: sticky;
  top: 6rem;
}

/* Article Typography Styling */
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  letter-spacing: -0.02em;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-body p {
  color: #334155;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #334155;
  line-height: 1.75;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ol {
  list-style-type: decimal;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body strong {
  color: #0f172a;
  font-weight: 600;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Tag Pills */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.tag-pill:hover {
  background-color: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.tag-pill.active {
  background-color: #10b981;
  color: #ffffff;
}

/* Reading Progress Bar */
#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, #059669 50%, #0284c7 100%);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Audio Player Pulse Wave Animation */
@keyframes soundWave {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.wave-bar {
  width: 3px;
  background-color: #10b981;
  border-radius: 9999px;
  animation: soundWave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; }

/* Frozen Mobile Bottom Navigation Menu Bar */
#mobile-bottom-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100% !important;
  height: 64px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  z-index: 9999 !important; /* Always on top of all page content */
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  padding: 0 4px max(env(safe-area-inset-bottom, 0px), 4px) 4px !important;
  margin: 0 !important;
  transform: translate3d(0, 0, 0) !important;
  -webkit-transform: translate3d(0, 0, 0) !important;
  pointer-events: auto !important;
}

@media (min-width: 1024px) {
  #mobile-bottom-bar {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  body {
    padding-bottom: 76px !important;
  }
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border-radius: 12px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
  color: #059669;
}

.mobile-nav-item.active {
  color: #059669 !important;
}

.mobile-nav-item.active i, .mobile-nav-item.active svg {
  color: #059669 !important;
  stroke: #059669 !important;
  transform: scale(1.1);
}

.mobile-nav-center-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
  border: 3px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-nav-center-btn:active {
  transform: scale(0.92);
}

/* Sticky Mobile Fast-Track Order Bar */
.sticky-mobile-order-bar {
  position: fixed;
  bottom: 64px; /* Above the frozen bottom nav bar */
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 9990;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-mobile-order-bar.visible {
  transform: translateY(0);
}

/* Mobile Slide-Out Drawer Navigation */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  box-shadow: -10px 0 25px -5px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer-panel.active {
  transform: translateX(0);
}

/* Print Optimization for Clinical Fact Sheets */
@media print {
  header, footer, nav, .glass-header, .sticky-mobile-order-bar, #reading-progress-bar, .no-print, button, .cta-glow-btn, .mobile-drawer-panel, .mobile-drawer-backdrop {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt !important;
  }
  .article-body, article {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .print-header {
    display: block !important;
    border-bottom: 2px solid #059669;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }
}

/* ========================================================================
   HOMEPAGE HERO 4-BANNER SLIDER CAROUSEL
   ========================================================================== */

.hero-slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-slides-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.hero-slide-item {
  flex: 0 0 100%;
  width: 100%;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease;
  display: none;
}

.hero-slide-item.active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.slider-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.slider-nav-arrow:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 15px 30px -5px rgba(5, 150, 105, 0.4);
}

.slider-nav-prev {
  left: 16px;
}

.slider-nav-next {
  right: 16px;
}

@media (max-width: 768px) {
  .slider-nav-arrow {
    display: none;
  }
}

.slider-indicators-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 4px 0;
}

.slider-pill-indicator {
  cursor: pointer;
  height: 8px;
  border-radius: 9999px;
  background: #cbd5e1;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  width: 24px;
}

.slider-pill-indicator:hover {
  background: #94a3b8;
}

.slider-pill-indicator.active {
  width: 52px;
  background: #059669;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

.slide-glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* ==========================================================================\n+   COOKIE CONSENT — MOBILE SAFE AREA\n+   Keep the consent actions above the fixed mobile navigation and within the\n+   viewport so both preference choices remain visible and tappable.\n+   ========================================================================== */
#cookie-consent-banner {
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

@media (max-width: 767px) {
  #cookie-consent-banner {
    bottom: calc(5.75rem + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 6.25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #cookie-consent-banner > div {
    max-height: calc(100dvh - 7.75rem);
    overflow-y: auto;
    padding: 1rem;
    gap: 0.875rem;
  }

  #cookie-consent-banner > div > div:first-child {
    min-width: 0;
  }

  #cookie-consent-banner > div > div:first-child > div:last-child > p:first-child {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  #cookie-consent-banner > div > div:last-child {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
  }

  #cookie-consent-banner button {
    min-height: 2.75rem;
    font-size: 0.8125rem;
    white-space: normal;
  }
}
