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

:root {
  --primary-emerald: #000000;
  --primary-emerald-dark: #18181b;
  --primary-emerald-light: #f4f4f5;
  --accent-gold: #000000;
  --accent-gold-light: #e4e4e7;
  --bg-dark: #ffffff;
  --bg-dark-card: #ffffff;
  --text-light: #0f172a;
  --text-muted: #475569;
}

/* Dynamic typography based on lang */
html[lang="ar"] {
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
}

html[lang="en"] {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Organic Blob Morphing Carousel Wrapper */
@keyframes morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

.blob-frame {
  animation: morph 12s ease-in-out infinite alternate;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.02);
  border: 2px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blob-frame:hover {
  transform: scale(1.02);
}

/* Float Animations */
@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(3deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes float-reverse {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(15px) rotate(-3deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.floating-el {
  animation: float 6s ease-in-out infinite;
}

.floating-el-delay {
  animation: float-reverse 8s ease-in-out infinite;
}

/* Infinite Marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  position: relative;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.03) 50%, rgba(0, 0, 0, 0.01) 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.marquee-inner {
  display: flex;
  min-width: 100%;
  flex-shrink: 0;
}

/* LTR Marquee Animation */
@keyframes marquee-ltr {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* RTL Marquee Animation */
@keyframes marquee-rtl {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(50%, 0, 0); }
}

html[lang="en"] .marquee-inner {
  animation: marquee-ltr 25s linear infinite;
}

html[lang="ar"] .marquee-inner {
  animation: marquee-rtl 25s linear infinite;
}

/* Custom Scroll Reveals */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.glass-navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Category Cards Interactive Scaling & Overlays */
.category-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card .card-bg {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .card-bg {
  transform: scale(1.08);
}

.category-card .card-overlay {
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s;
}

.category-card:hover .card-overlay {
  background-color: rgba(0, 0, 0, 0.85);
}

/* Premium Button Glow */
.gold-glow {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gold-glow:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.emerald-glow {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.emerald-glow:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Switcher Slide Toggle Styles */
.lang-toggle-bg {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Language toggle button custom slide */
.lang-slider {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Carousel transition effects */
.carousel-slide {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide.active {
  opacity: 1;
}

/* Branch card glowing borders on hover */
.branch-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.branch-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-5px);
}
