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

/* ==================== LANGUAGE TOGGLE ==================== */

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
}

.lang-toggle:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  transform: scale(1.05);
}

.lang-toggle svg {
  color: rgba(245, 158, 11, 0.7);
}

.lang-toggle-label {
  font-family: 'Inter', sans-serif;
}

/* LTR mode adjustments */
html[dir="ltr"] body {
  font-family: 'Inter', 'Cairo', sans-serif;
}


/* ==================== CSS VARIABLES ==================== */
:root {
  --primary: 245 158 11;
  --background: hsl(0 0% 100%);
  --foreground: hsl(222.2 47.4% 11.2%);
  --muted: hsl(210 40% 96.1%);
  --muted-foreground: hsl(215.4 16.3% 46.9%);
  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(222.2 47.4% 11.2%);
  --border: hsl(214.3 31.8% 91.4%);
  --input: hsl(214.3 31.8% 91.4%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(222.2 47.4% 11.2%);
  --primary: hsl(222.2 47.4% 11.2%);
  --primary-foreground: hsl(210 40% 98%);
  --secondary: hsl(210 40% 96.1%);
  --secondary-foreground: hsl(222.2 47.4% 11.2%);
  --accent: hsl(210 40% 96.1%);
  --accent-foreground: hsl(222.2 47.4% 11.2%);
  --destructive: hsl(0 100% 50%);
  --destructive-foreground: hsl(210 40% 98%);
  --ring: hsl(215 20.2% 65.1%);
  --radius: 0.5rem;
}

:root[class~="dark"] {
  --background: hsl(224 71% 4%);
  --foreground: hsl(213 31% 91%);
  --muted: hsl(223 47% 11%);
  --muted-foreground: hsl(215.4 16.3% 56.9%);
  --accent: hsl(216 34% 17%);
  --accent-foreground: hsl(210 40% 98%);
  --popover: hsl(224 71% 4%);
  --popover-foreground: hsl(215 20.2% 65.1%);
  --border: hsl(216 34% 17%);
  --input: hsl(216 34% 17%);
  --card: hsl(224 71% 4%);
  --card-foreground: hsl(213 31% 91%);
  --primary: hsl(210 40% 98%);
  --primary-foreground: hsl(222.2 47.4% 1.2%);
  --secondary: hsl(222.2 47.4% 11.2%);
  --secondary-foreground: hsl(210 40% 98%);
  --destructive: hsl(0 63% 31%);
  --destructive-foreground: hsl(210 40% 98%);
  --ring: hsl(216 34% 17%);
  --radius: 0.5rem;
}

/* ==================== SMOOTH SCROLLING ==================== */
html {
  scroll-behavior: smooth;
}

/* ==================== CORE ANIMATIONS ==================== */

/* Fade In Up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fade In Right (for RTL) */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Fade In Left (for RTL) */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Scale In */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* Gradient Text Animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Float Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Pulse Glow */
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
  50% { filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8)); }
}

/* Particle drift */
@keyframes particleDrift {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* Shimmer border */
@keyframes shimmerBorder {
  0% { border-color: rgba(245, 158, 11, 0.2); }
  50% { border-color: rgba(245, 158, 11, 0.6); }
  100% { border-color: rgba(245, 158, 11, 0.2); }
}

/* WhatsApp float pulse */
@keyframes whatsappPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==================== ANIMATION CLASSES ==================== */

.animate-fade-in {
  animation: fadeInUp 1.2s ease forwards;
}

.cta-button {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}
.cta-button:hover::before {
  left: 100%;
}
.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -8px rgb(245 158 11 / 0.4),
              0 8px 16px -6px rgb(245 158 11 / 0.3);
}

.whatsapp-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.whatsapp-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37,211,102,0.15), transparent);
  transition: left 0.6s ease;
}
.whatsapp-btn:hover::before {
  left: 100%;
}
.whatsapp-btn:hover {
  background-color: #1e2937;
  border-color: #25D366;
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -8px rgba(37, 211, 102, 0.3);
}

/* ==================== SERVICE CARDS ==================== */

.service-card {
  transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.8), transparent);
  transform: scaleX(0);
  transition: transform 0.5s ease;
}
.service-card:hover::after {
  transform: scaleX(1);
}
.service-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px -15px rgb(245 158 11 / 0.15),
              0 10px 20px -10px rgba(0, 0, 0, 0.08);
}

/* ==================== ABOUT IMAGE ==================== */

.about-image {
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.about-image:hover {
  transform: scale(1.05);
}

/* Shimmer line on about section image */
.shimmer-line {
  position: relative;
  overflow: hidden;
}
.shimmer-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.8), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

/* ==================== FLOATING WHATSAPP ==================== */

.whatsapp-float {
  animation: whatsappPulse 2s infinite;
}

/* ==================== PARTICLE STYLES ==================== */

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(245, 158, 11, 0.3);
  border-radius: 50%;
  pointer-events: none;
  animation: particleDrift linear infinite;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 516px) {
  .text-vsm {
    font-size: 2.2vw;
  }
}

/* Mobile: hide service descriptions, show only icon + title */
@media (max-width: 767px) {
  .service-desc {
    display: none;
  }

  .service-card {
    cursor: pointer;
  }

  /* Tap indicator dot */
  .service-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    background: rgba(245, 158, 11, 0.7);
    border-radius: 50%;
    z-index: 20;
    animation: pulseGlow 2s ease-in-out infinite;
  }
}


/* ==================== SERVICE MODAL ==================== */

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.service-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.service-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
  animation: modalFadeIn 0.3s ease;
}

.service-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: white;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.service-modal-overlay.active .service-modal {
  transform: translateY(0);
  animation: modalSlideUp 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.service-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.service-modal-close:hover {
  background: #f1f5f9;
  transform: rotate(90deg);
}

.service-modal-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.service-modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-modal-body {
  padding: 24px;
  direction: rtl;
  text-align: right;
}

/* Desktop: larger modal centered */
@media (min-width: 768px) {
  .service-modal-overlay {
    align-items: center;
  }

  .service-modal {
    border-radius: 24px;
    max-width: 520px;
    max-height: 80vh;
  }

  .service-modal-img {
    height: 260px;
  }
}

/* ==================== COUNTER ANIMATION ==================== */

.counter {
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

/* ==================== CUSTOM SCROLLBAR ==================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

/* ==================== SELECTION HIGHLIGHT ==================== */

::selection {
  background: rgba(245, 158, 11, 0.3);
  color: white;
}
