/* ==========================================================================
   NEOM TENTS (نيوم تنتس) - LUXURY STYLING & DESIGN SYSTEM
   Theme: Midnight Obsidian, Royal Desert Gold & Glowing Dome Accents
   ========================================================================== */
:root {
  --color-obsidian-darkest: #162447;
  --color-obsidian-dark: #1F315B;
  --color-obsidian-surface: #283E70;
  --color-obsidian-card: rgba(40, 62, 112, 0.85);
  --color-obsidian-border: rgba(255, 255, 255, 0.22);

  --color-gold-light: #FFFBEA;
  --color-gold-primary: #FFD700;
  --color-gold-dark: #FFC107;
  --color-gold-glow: rgba(255, 215, 0, 0.55);

  --color-neon-cyan: #38BDF8;
  --color-neon-rose: #FF4081;
  --color-neon-teal: #10B981;

  --font-arabic: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-english: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
}

/* Base resets & mobile touch optimizations */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-obsidian-darkest);
  color: #F8FAFC;
  overflow-x: hidden;
  max-width: 100vw;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

/* RTL / LTR Font Families - Uniform & Consistent Across All Elements */
[dir="rtl"], html[lang="ar"] body, html[lang="ar"] input, html[lang="ar"] textarea, html[lang="ar"] select, html[lang="ar"] button {
  font-family: var(--font-arabic) !important;
}

[dir="ltr"], html[lang="en"] body, html[lang="en"] input, html[lang="en"] textarea, html[lang="en"] select, html[lang="en"] button {
  font-family: var(--font-english) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0B1224;
}
::-webkit-scrollbar-thumb {
  background: #253861;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-primary);
}

/* Selection */
::selection {
  background: rgba(255, 213, 79, 0.4);
  color: #000000;
}

/* Glassmorphic Utilities with 3D Depth & Translucency */
.glass-panel {
  background: rgba(26, 42, 78, 0.68);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(56, 189, 248, 0.07);
}

.glass-card {
  background: linear-gradient(135deg, rgba(32, 52, 96, 0.72) 0%, rgba(20, 34, 68, 0.78) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45), 0 0 25px rgba(255, 215, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(255, 215, 0, 0.75);
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 215, 0, 0.22);
}

/* 3D Dimensional Background System (أبعاد وثلاثية انسيابية متناسقة) */
.perspective-space {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.depth-glow-gold {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.14) 0%, rgba(255, 193, 7, 0.06) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events-none;
  z-index: 0;
}

.depth-glow-cyan {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.13) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events-none;
  z-index: 0;
}

.depth-glow-amber {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.05) 50%, transparent 70%);
  filter: blur(85px);
  pointer-events-none;
  z-index: 0;
}

.depth-glow-white {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(241, 245, 249, 0.06) 50%, transparent 70%);
  filter: blur(85px);
  pointer-events-none;
  z-index: 0;
}

/* Architectural Perspective Mesh Grid (خلفية المنظور المعماري المتناسق) */
.bg-dimensional-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Hero Section Video & Layering with Seamless 3D Depth Blending */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.98) contrast(1.08);
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(20, 33, 66, 0.12) 0%, rgba(16, 26, 54, 0.55) 65%, rgba(20, 33, 66, 0.90) 100%),
    linear-gradient(180deg, rgba(20, 33, 66, 0.60) 0%, rgba(20, 33, 66, 0.15) 30%, rgba(20, 33, 66, 0.25) 70%, #142142 100%);
  z-index: 1;
}

.hero-video-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 213, 79, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 2;
  pointer-events: none;
}

/* Canvas ambient particles */
#ambientCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Radiant Gold & Vibrant Gradient Text */
.text-gold-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF2B2 30%, #FFD54F 65%, #FFA000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 213, 79, 0.3));
}

.text-cyan-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #E0FFFF 35%, #26E6FF 70%, #0099FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-brand-gradient {
  background: linear-gradient(135deg, #FFA07A 0%, #FFD54F 50%, #26E6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Luxury Buttons (Bright & High Glow) */
.btn-gold-luxury {
  position: relative;
  background: linear-gradient(135deg, #FFE082 0%, #FFC107 50%, #FFA000 100%);
  color: #0B1224;
  font-weight: 800;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(255, 193, 7, 0.45);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-gold-luxury::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: all 0.75s ease;
}

.btn-gold-luxury:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.55);
}

.btn-gold-luxury:hover::after {
  left: 140%;
}

.btn-outline-luxury {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-cyan-luxury {
  position: relative;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(56, 189, 248, 0.28) 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #E0F2FE;
  font-weight: 700;
  border-radius: 9999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-cyan-luxury:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(56, 189, 248, 0.45) 100%);
  border-color: #38BDF8;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.45);
}

.btn-outline-luxury:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--color-gold-primary);
  color: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* Glowing Badges (Vibrant & Bright) */
.badge-gold {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.22) 0%, rgba(255, 160, 0, 0.18) 100%);
  border: 1px solid rgba(255, 213, 79, 0.55);
  color: #FFFDF0;
  text-shadow: 0 1px 6px rgba(255, 213, 79, 0.4);
}

.badge-cyan {
  background: linear-gradient(135deg, rgba(38, 230, 255, 0.22) 0%, rgba(0, 153, 255, 0.18) 100%);
  border: 1px solid rgba(38, 230, 255, 0.55);
  color: #FFFFFF;
  text-shadow: 0 1px 6px rgba(38, 230, 255, 0.4);
}

/* Partner Logo Card Highlight */
.partner-logo-card {
  position: relative;
  background: rgba(22, 36, 68, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-logo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 213, 79, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.partner-logo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 213, 79, 0.7);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 213, 79, 0.25);
}

.partner-logo-card:hover::before {
  opacity: 1;
}

/* Keyframes */
@keyframes floatAnimation {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: floatAnimation 5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.05);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Shimmer placeholder */
.shimmer-glow {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Modal Styling */
.custom-modal-backdrop {
  background: rgba(11, 18, 36, 0.88);
  backdrop-filter: blur(16px);
}

/* Form controls (Bright & High Contrast) */
.form-input-luxury {
  background: rgba(22, 36, 68, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-radius: 0.75rem;
  padding: 0.85rem 1.2rem;
  transition: all 0.3s ease;
  width: 100%;
}

.form-input-luxury:focus {
  outline: none;
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 20px rgba(255, 213, 79, 0.4);
  background: rgba(28, 44, 82, 0.98);
}

.form-input-luxury::placeholder {
  color: #94A3B8;
}

/* Navbar active state */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold-primary);
  transition: width 0.3s ease;
}

[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Compact Moving Image Slider / Marquee (السليدر المتحرك للصور) */
.logo-slider-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 2rem 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-slider-track {
  display: flex;
  width: max-content;
  gap: 2.75rem;
  animation: logoScroll 32s linear infinite;
}

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

[dir="rtl"] .logo-slider-track {
  animation: logoScrollRTL 32s linear infinite;
}

[dir="rtl"] .logo-slider-track:hover {
  animation-play-state: paused;
}

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

@keyframes logoScrollRTL {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.slider-logo-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 165px;
  background: rgba(14, 21, 36, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  padding: 1rem 1.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .slider-logo-card {
    width: 205px;
    height: 125px;
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
  }
}

.slider-logo-card:hover {
  border-color: rgba(212, 175, 55, 0.85);
  background: rgba(24, 36, 62, 0.98);
  transform: translateY(-6px) scale(1.07);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.4);
}

.slider-logo-card img {
  max-height: 96%;
  max-width: 96%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s ease;
}

.slider-logo-card:hover img {
  transform: scale(1.1);
}

/* ==========================================
   ROBUST MOBILE DRAWER & BACKDROP ANIMATIONS
   ========================================== */
#mobileMenuDrawer {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

html[dir="rtl"] #mobileMenuDrawer {
  right: 0;
  left: auto;
  transform: translateX(105%);
}

html[dir="ltr"] #mobileMenuDrawer {
  left: 0;
  right: auto;
  transform: translateX(-105%);
}

#mobileMenuDrawer.drawer-open {
  transform: translateX(0) !important;
}

#mobileMenuBackdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#mobileMenuBackdrop.backdrop-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  display: block !important;
}

/* ==========================================
   DOME SIZES CONTINUOUS SLIDER (.dome-sizes-slider)
   ========================================== */
.dome-slider-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 1.5rem 0;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.dome-slider-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: domeTicker 45s linear infinite;
}

html[dir="rtl"] .dome-slider-track {
  animation: domeTickerRtl 45s linear infinite;
}

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

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

@keyframes domeTickerRtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.dome-size-card {
  width: 320px;
  flex-shrink: 0;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(38, 62, 114, 0.88) 0%, rgba(26, 44, 88, 0.92) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3);
}

.dome-size-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 215, 0, 0.85);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.3);
}

/* ==========================================
   LIGHTBOX MODAL & INTERACTIVE MICRO-POLISH
   ========================================== */
#imageLightboxModal {
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.25s ease;
}

#lightboxImage {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.2);
}

#backToTopBtn {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#backToTopBtn:hover {
  transform: translateY(-4px) scale(1.05);
}

/* ==========================================
   MOBILE HARMONY, TOUCH ERGONOMICS & SAFE-AREA
   ========================================== */
#floatingConversionBar {
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  -webkit-tap-highlight-color: transparent;
}

/* iOS Safari prevent zoom-on-focus for form inputs */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Tablet & Mobile Tweaks (max-width: 768px) */
@media (max-width: 768px) {
  #floatingSocialDock {
    right: 0.25rem !important;
    padding: 0.25rem !important;
    gap: 0.35rem !important;
    border-radius: 1rem !important;
  }
  
  #floatingSocialDock a {
    width: 2.1rem !important;
    height: 2.1rem !important;
    min-width: 2.1rem !important;
    border-radius: 0.65rem !important;
  }
  
  #floatingSocialDock a i {
    font-size: 0.875rem !important;
  }

  /* Compact quick actions */
  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile Screens (max-width: 640px) */
@media (max-width: 640px) {
  body, html {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
  
  h1 {
    font-size: clamp(1.75rem, 5.5vw, 2.5rem) !important;
    line-height: 1.25 !important;
  }
  
  h2 {
    font-size: clamp(1.35rem, 4.5vw, 2rem) !important;
    line-height: 1.3 !important;
  }

  h3 {
    font-size: clamp(1.15rem, 3.5vw, 1.5rem) !important;
  }

  .glass-card, .glass-panel {
    border-radius: 1.25rem;
  }
  
  #backToTopBtn {
    bottom: 4.8rem !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 0.85rem !important;
  }
  
  /* Safe touch areas on mobile */
  button, a.btn-gold-luxury, a.btn-outline-luxury, a.btn-cyan-luxury {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Extra small phones (<= 390px, e.g. iPhone SE, iPhone 12/13 Mini) */
@media (max-width: 390px) {
  h1 {
    font-size: 1.65rem !important;
  }
  
  h2 {
    font-size: 1.3rem !important;
  }
  
  .portal-card {
    padding: 1.25rem !important;
  }
}

/* ==========================================================================
   MOBILE DISPLAY & COMPLETE TEXT READABILITY (ظهور كامل للمشاريع والنصوص على الهاتف)
   ========================================================================== */
#projects,
#gallery-grid {
  display: block !important;
}

/* حل مشكلة اقتصاص وبتر الكلام على شاشات الهاتف */
@media (max-width: 768px) {
  /* إظهار كافة الأسطر بدون أي تقطيع أو ثلاث نقاط ... */
  .line-clamp-1,
  .line-clamp-2,
  .line-clamp-3,
  .line-clamp-4 {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-height: none !important;
    white-space: normal !important;
  }

  p, span, h1, h2, h3, h4, h5, li {
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  /* ضبط بطاقات المشاريع لتكون مريحة وكاملة المحتوى على شاشة الهاتف */
  #gallery-grid .gallery-item {
    display: block !important;
    width: 100% !important;
    margin-bottom: 1.25rem;
  }

  #gallery-grid .glass-card,
  #projects .glass-card {
    border-radius: 1.25rem !important;
    overflow: hidden !important;
  }

  /* أزرار الفلترة للمشاريع على الهاتف بدون قص أو اختفاء */
  .gallery-tab-btn {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }

  /* ضبط الشارة الملكية في الهيرو لتتسع لأي شاشة جوال */
  .badge-gold {
    white-space: normal !important;
    max-width: 95% !important;
    text-align: center !important;
    line-height: 1.4 !important;
  }
}
