/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Color Variables for Dark and Light Modes */
:root {
  --font-primary: 'Outfit', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  
  /* Dark Mode Default Theme Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-card: rgba(22, 22, 22, 0.75);
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --brand-primary: #ff0000;
  --brand-secondary: #990000;
  --glow-color: rgba(255, 0, 0, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --navbar-bg: rgba(10, 10, 10, 0.8);
  --accent-soft: rgba(255, 0, 0, 0.1);
  --button-text: #ffffff;
}

[data-theme="light"] {
  /* Light Mode Theme Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --brand-primary: #dc2626;
  --brand-secondary: #991b1b;
  --glow-color: rgba(220, 38, 38, 0.25);
  --border-color: rgba(0, 0, 0, 0.08);
  --navbar-bg: rgba(248, 250, 252, 0.8);
  --accent-soft: rgba(220, 38, 38, 0.08);
  --button-text: #ffffff;
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.6;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--brand-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-secondary);
}

/* Typography Custom Rules */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Animated Neon Gradients & Custom Layouts */
.gradient-text-red {
  background: linear-gradient(135deg, #ffffff 30%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text-red {
  background: linear-gradient(135deg, #0f172a 30%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-brand {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
}

.glow-btn {
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--glow-color);
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--brand-primary);
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(255, 0, 0, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Red Glow Spot Background Elements (Highly Optimized) */
.glow-spot {
  position: absolute;
  width: 40vw;
  height: 40vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.15) 0%, rgba(255, 0, 0, 0) 70%);
  filter: blur(80px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: pulse-glow 8s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.1) translate(3%, 3%); opacity: 1; }
}

/* Floating Animation */
.floating-element {
  animation: float-slow 6s infinite ease-in-out;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Custom Image Slider (Before / After) */
.before-after-container {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  user-select: none;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-after {
  z-index: 1;
}

.slider-before {
  z-index: 2;
  /* Custom clip path to mask image. Will be dynamically controlled by JS */
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: var(--brand-primary);
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 15px var(--brand-primary);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 3px solid var(--brand-primary);
  color: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.slider-label {
  position: absolute;
  bottom: 20px;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 4;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.label-before {
  left: 20px;
}

.label-after {
  right: 20px;
}

/* Custom interactive inputs styling */
.custom-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

[data-theme="light"] .custom-input {
  background: rgba(0, 0, 0, 0.02);
}

.custom-input:focus {
  border-color: var(--brand-primary);
  outline: none;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

/* Custom select options styling to prevent invisible text in system menus */
select.custom-input option {
  background-color: #121212 !important;
  color: #ffffff !important;
}

[data-theme="light"] select.custom-input option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Page animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* Floating custom notification widget for premium experience */
.premium-alert {
  position: fixed;
  bottom: 24px;
  right: -400px;
  max-width: 360px;
  z-index: 50;
  transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-alert.show {
  right: 24px;
}

/* Hero Section Overlay Grid */
.hero-grid-overlay {
  background-image: linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

[data-theme="light"] .hero-grid-overlay {
  background-image: linear-gradient(to right, rgba(0,0,0,0.015) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0,0,0,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* BMI Gauge animation */
.bmi-bar-fill {
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   Premium Animated Theme Toggle
   ========================================== */
.theme-toggle-capsule {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-track {
  position: relative;
  width: 64px;
  height: 30px;
  border-radius: 100px;
  background: linear-gradient(135deg, #1a1a3e 0%, #0d0d2b 40%, #0a0a1f 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4), 0 0 12px rgba(100, 100, 255, 0.08);
  transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Light mode track */
.theme-toggle-capsule.is-light .theme-toggle-track {
  background: linear-gradient(135deg, #87CEEB 0%, #FDB813 60%, #f59e0b 100%);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: inset 0 2px 6px rgba(251, 191, 36, 0.15), 0 0 16px rgba(251, 191, 36, 0.15);
}

/* The sliding orb */
.theme-toggle-orb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9d1d9, #e8ecf1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 0 -1px 2px rgba(0,0,0,0.1);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.5s ease,
              box-shadow 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.theme-toggle-capsule.is-light .theme-toggle-orb {
  transform: translateX(34px);
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5), 0 2px 4px rgba(0,0,0,0.15);
}

/* Icon SVGs */
.orb-icon {
  width: 14px;
  height: 14px;
  position: absolute;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode: Moon visible, Sun hidden */
.orb-moon {
  color: #6366f1;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.orb-sun {
  color: #ffffff;
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Light mode: Sun visible, Moon hidden */
.theme-toggle-capsule.is-light .orb-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.theme-toggle-capsule.is-light .orb-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Twinkling Stars (dark mode) */
.theme-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.theme-toggle-capsule.is-light .theme-stars {
  opacity: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffffff;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out alternate;
}

@keyframes twinkle {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* Sun Rays (light mode) */
.theme-sun-rays {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.theme-toggle-capsule.is-light .theme-sun-rays {
  opacity: 1;
}

.ray {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: ray-float 3s infinite ease-in-out alternate;
}

.ray:nth-child(1) { top: 8px; left: 10px; animation-delay: 0s; }
.ray:nth-child(2) { top: 18px; left: 22px; animation-delay: 0.5s; }
.ray:nth-child(3) { top: 6px; left: 35px; animation-delay: 1s; }
.ray:nth-child(4) { top: 20px; left: 46px; animation-delay: 1.5s; }

@keyframes ray-float {
  0% { opacity: 0.4; transform: scale(0.8) translateY(0px); }
  100% { opacity: 0.9; transform: scale(1.4) translateY(-2px); }
}

/* Hover glow effect */
.theme-toggle-capsule:hover .theme-toggle-track {
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4), 0 0 20px rgba(100, 100, 255, 0.15);
}

.theme-toggle-capsule.is-light:hover .theme-toggle-track {
  box-shadow: inset 0 2px 6px rgba(251, 191, 36, 0.15), 0 0 24px rgba(251, 191, 36, 0.25);
}

/* Active press effect */
.theme-toggle-capsule:active .theme-toggle-orb {
  transform: scale(0.9);
}

.theme-toggle-capsule.is-light:active .theme-toggle-orb {
  transform: translateX(34px) scale(0.9);
}

/* ==========================================
   New Premium Landing Page Sections Styling
   ========================================== */

/* Mindset Old vs New Column cards */
.comparison-card-old {
  border-left: 4px solid #ef4444; /* red border */
}
.comparison-card-new {
  border-left: 4px solid #10b981; /* green border */
}

/* Phase Flow Timeline Layout */
.phase-card {
  position: relative;
  overflow: hidden;
}
.phase-number {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  font-weight: 800;
  opacity: 0.05;
  position: absolute;
  right: 16px;
  top: 8px;
  user-select: none;
}
.phase-card:hover .phase-number {
  opacity: 0.12;
  transform: scale(1.1);
  transition: all 0.3s ease;
}

/* Pricing Card Glow Outline */
.pricing-glow-card {
  border: 2px solid var(--brand-primary);
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.15);
  animation: pulse-glow-border 3s infinite alternate ease-in-out;
}

@keyframes pulse-glow-border {
  0% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.1); border-color: rgba(255, 0, 0, 0.4); }
  100% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.25); border-color: rgba(255, 0, 0, 0.8); }
}

/* Accordion Elements with smooth transitions */
.faq-accordion-item {
  border-bottom: 1px solid var(--border-color);
}
.faq-accordion-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  transition: color 0.3s ease;
}
.faq-accordion-header:hover {
  color: var(--brand-primary);
}
.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), opacity 0.4s ease;
}
.faq-accordion-item.active .faq-accordion-content {
  max-height: 1000px; /* high value to fit content */
  opacity: 1;
  padding-bottom: 20px;
  transition: max-height 0.4s cubic-bezier(1, 0, 1, 0), opacity 0.4s ease;
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-accordion-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

/* ==========================================
   Client Success Carousel & Lightbox Modal
   ========================================== */

/* Carousel Track & Slides */
.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.carousel-item {
  width: 100%;
  flex-shrink: 0;
}

/* Lightbox Modal Styles */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000; /* Ensure it is on top of everything, including header */
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}

.lightbox-close-btn {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: scale(1.1);
}

.lightbox-caption {
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Indicators and Slide Buttons */
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--brand-primary);
  width: 24px;
  border-radius: 100px;
}

/* Image Clickable Preview Cursor Hint */
.preview-trigger {
  cursor: zoom-in;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.preview-trigger:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

/* Hide scrollbar for Chrome, Safari and Opera in Rabeet's thumbnails */
#rabeet-thumb-viewport::-webkit-scrollbar {
  display: none;
}
