/* ==========================================================================
   حلولك حالا (Holoulak Halan) - Design System & Futuristic Stylesheet
   Palette: Deep Royal (#031A6B), Midnight (#041E68), Dark Navy (#020C3B)
   Neon Accents: Electric Cyan (#00C2FF), Violet (#8A2BE2), Magenta (#E11D9A)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --bg-deep-royal: #031A6B;
  --bg-midnight: #041E68;
  --bg-dark-navy: #020C3B;
  
  --neon-cyan: #00C2FF;
  --neon-violet: #8A2BE2;
  --neon-magenta: #E11D9A;
  --soft-green: #7AC143;
  --pure-white: #FFFFFF;
  --text-muted: #94A3B8;

  --card-bg: rgba(4, 30, 104, 0.45);
  --card-border: rgba(0, 194, 255, 0.2);
  --card-border-hover: rgba(225, 29, 154, 0.5);
  --glass-reflect: rgba(255, 255, 255, 0.07);

  --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-heading: 'Tajawal', 'Cairo', sans-serif;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-deep-royal: #F0F4FF;
  --bg-midnight: #E8EEFA;
  --bg-dark-navy: #D9E4FF;
  
  --neon-cyan: #0088CC;
  --neon-violet: #6A1B9A;
  --neon-magenta: #C2185B;
  --soft-green: #2E7D32;
  --pure-white: #0B132B;
  --text-muted: #475569;

  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 136, 204, 0.25);
  --card-border-hover: rgba(194, 24, 91, 0.5);
  --glass-reflect: rgba(0, 0, 0, 0.03);
}

html {
  scroll-behavior: auto !important; /* Lenis handles smooth scrolling */
  direction: rtl;
  font-family: var(--font-main);
  background-color: var(--bg-dark-navy);
  color: var(--pure-white);
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, var(--bg-deep-royal) 0%, var(--bg-midnight) 45%, var(--bg-dark-navy) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-navy);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-violet), var(--neon-magenta));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-magenta), var(--neon-cyan));
}

/* Custom Cursor Elements */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.custom-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--neon-cyan);
  background: radial-gradient(circle, rgba(0, 194, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
              height 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
              border-color 0.3s ease, 
              background 0.3s ease;
}

.custom-cursor-glow.active {
  width: 68px;
  height: 68px;
  border-color: var(--neon-magenta);
  background: radial-gradient(circle, rgba(225, 29, 154, 0.25) 0%, transparent 70%);
  box-shadow: 0 0 25px rgba(225, 29, 154, 0.4);
}

@media (max-width: 1024px) {
  .custom-cursor-dot, .custom-cursor-glow {
    display: none !important;
  }
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px 0 rgba(2, 12, 59, 0.37);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 16px 40px -10px rgba(225, 29, 154, 0.25), 0 0 25px rgba(0, 194, 255, 0.2);
  transform: translateY(-4px);
}

/* Futuristic Neon Border Gradient */
.neon-border-gradient {
  position: relative;
  background: var(--card-bg);
  border-radius: 1.25rem;
  z-index: 1;
}

.neon-border-gradient::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet), var(--neon-magenta));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.65;
  transition: opacity 0.35s ease;
}

.neon-border-gradient:hover::before {
  opacity: 1;
}

/* Neon Text Gradient */
.text-gradient-neon {
  background: linear-gradient(135deg, #00C2FF 0%, #B358F5 50%, #E11D9A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #FFFFFF 20%, #00C2FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glowing Neon Buttons */
.btn-neon-primary {
  position: relative;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-violet) 50%, var(--neon-magenta) 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.85rem 2rem;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 194, 255, 0.35), 0 0 45px rgba(225, 29, 154, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.btn-neon-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 35px rgba(0, 194, 255, 0.6), 0 0 60px rgba(225, 29, 154, 0.4);
}

.btn-neon-secondary {
  position: relative;
  background: rgba(4, 30, 104, 0.6);
  color: var(--pure-white);
  border: 1px solid rgba(0, 194, 255, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.85rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.btn-neon-secondary:hover {
  border-color: var(--neon-magenta);
  background: rgba(225, 29, 154, 0.15);
  box-shadow: 0 0 25px rgba(225, 29, 154, 0.3);
  transform: translateY(-2px);
}

/* Pulsing Badge & Dots */
.pulse-green {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--soft-green);
  box-shadow: 0 0 0 0 rgba(122, 193, 67, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(122, 193, 67, 0.8);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(122, 193, 67, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(122, 193, 67, 0);
  }
}

/* Floating WhatsApp Magnetic CTA */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45), 0 0 20px rgba(0, 194, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.floating-whatsapp:hover {
  transform: scale(1.1) rotate(6deg);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.65), 0 0 30px rgba(225, 29, 154, 0.5);
}

.floating-whatsapp::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(37, 211, 102, 0.6);
  animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
  100% { transform: rotate(360deg); }
}

/* Ticker & Marquee Animations */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* Before / After Slider Component */
.before-after-container {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: 1.25rem;
  user-select: none;
}

.before-after-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.before-image {
  background-color: #10162F;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.after-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  background-color: #031A6B;
  border-left: 2px solid var(--neon-cyan);
  z-index: 2;
  box-shadow: 4px 0 20px rgba(0, 194, 255, 0.5);
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: ew-resize;
  box-shadow: 0 0 20px var(--neon-cyan);
}

/* Interactive Hotspot Pulses */
.hotspot-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--neon-cyan);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.hotspot-dot:hover {
  transform: scale(1.3);
  background: var(--neon-magenta);
  box-shadow: 0 0 20px var(--neon-magenta);
}

.hotspot-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(0, 194, 255, 0.35);
  animation: pulse-ring 2.2s infinite;
}

/* Interactive Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 12, 59, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #041E68 0%, #020C3B 100%);
  border: 1px solid rgba(0, 194, 255, 0.4);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 194, 255, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

/* Floating Audio / Theme Controls */
.top-util-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(4, 30, 104, 0.6);
  border: 1px solid rgba(0, 194, 255, 0.3);
  color: var(--pure-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.top-util-btn:hover {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 15px rgba(225, 29, 154, 0.4);
  transform: scale(1.08);
}

/* Background Cyber Grid */
.cyber-grid-bg {
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(0, 194, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 194, 255, 0.05) 1px, transparent 1px);
}
