/* ===========================================
   نجم المزاحن - ملف الأنماط الرئيسي
   جميع الحقوق محفوظة © 2026
   =========================================== */

/* الأساسيات */
html { 
  scroll-behavior: smooth; 
}

body { 
  font-family: 'Cairo', sans-serif; 
  background: #F8FAFC; 
  overflow-x: hidden; 
}

/* ===========================================
   Ticker Animation (شريط الأسعار المتحرك)
   =========================================== */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 35s linear infinite;
}

.ticker-track:hover { 
  animation-play-state: paused; 
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}

[dir="rtl"] .ticker-track { 
  animation-direction: reverse; 
}

/* ===========================================
   Floating Animation (حركة الطفو)
   =========================================== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* ===========================================
   Skeleton Loading Effect (تأثير التحميل)
   =========================================== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #e0e0e0 20%,
    #f0f0f0 40%,
    #e0e0e0 60%,
    #f0f0f0 80%,
    #e0e0e0 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

.skeleton-text {
  height: 1em;
  border-radius: 4px;
  display: inline-block;
  width: 100%;
}

.skeleton-title {
  height: 1.5em;
  border-radius: 6px;
  margin-bottom: 0.5em;
}

.skeleton-paragraph {
  height: 1em;
  border-radius: 4px;
  margin-bottom: 0.5em;
}

.skeleton-paragraph:last-child {
  margin-bottom: 0;
}

.skeleton-image {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.skeleton-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e5e7eb;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-badge {
  height: 24px;
  width: 60px;
  border-radius: 12px;
}

/* ===========================================
   Lattice Grid Pattern (نمط الشبكة)
   =========================================== */
.lattice {
  background-image:
    linear-gradient(rgba(242, 169, 59, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 169, 59, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===========================================
   Reveal on Scroll (ظهور عند التمرير)
   =========================================== */
.reveal { 
  opacity: 0; 
  transform: translateY(20px); 
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); 
}

.reveal.in { 
  opacity: 1; 
  transform: translateY(0); 
}

/* ===========================================
   No Scrollbar (إخفاء شريط التمرير)
   =========================================== */
.no-scrollbar::-webkit-scrollbar { 
  display: none; 
}

.no-scrollbar { 
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}

/* ===========================================
   3D Phone Mockup Styles (نموذج الهاتف ثلاثي الأبعاد)
   =========================================== */
:root {
  --phone-frame: #0f172a;
  --screen-bg: #ffffff;
  --ease-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.phone-3d-container {
  perspective: 2000px;
}

.phone-3d {
  position: relative;
  width: 320px;
  height: 650px;
  background: var(--phone-frame);
  border-radius: 50px;
  transform-style: preserve-3d;
  transform: rotateX(20deg) rotateY(20deg) rotateZ(-5deg);
  box-shadow: 30px 40px 80px rgba(0,0,0,0.3);
  border: 4px solid #334155;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.phone-3d .screen {
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  background: var(--screen-bg);
  border-radius: 42px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.phone-3d .screen-content {
  position: relative;
  z-index: 1;
}

.phone-3d .header-img {
  width: 100%;
  padding: 20px 15px;
  opacity: 0.9;
  display: block;
}

.phone-3d .card-spacer {
  width: 100%;
  padding: 0 15px;
  margin-top: 6px;
}

.phone-3d .card-spacer img {
  width: 100%;
  border-radius: 20px;
  display: block;
  visibility: hidden;
}

.phone-3d .quick-actions {
  width: 100%;
  padding: 0 15px;
  margin-top: -5px;
}

.phone-3d .quick-actions img {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.phone-3d .card-floater {
  position: absolute;
  top: 85px;
  left: 8px; right: 8px;
  padding: 0 15px;
  z-index: 200;
  pointer-events: none;
}

.phone-3d .card-shadow {
  position: absolute;
  bottom: -6px;
  left: 25px; right: 25px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 72%);
  filter: blur(3px);
  transform-origin: center;
  animation: shadowTrail 6s var(--ease-smooth) infinite;
  will-change: transform, opacity;
}

.phone-3d .card-image {
  position: relative;
  width: 100%;
  border-radius: 20px;
  display: block;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: cardPopOut 6s var(--ease-smooth) infinite;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

@keyframes cardPopOut {
  0%, 100% {
    transform: translateZ(0px) translateY(0) scale(1);
  }
  45%, 55% {
    transform: translateZ(140px) translateY(-26px) scale(1.08);
  }
}

@keyframes shadowTrail {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.45; }
  45%, 55% { transform: scale(1.5) translateY(16px); opacity: 0.15; }
}

.phone-3d .services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 10px 20px;
  margin-top: 5px;
  transform-style: preserve-3d;
}

.phone-3d .service-item {
  width: 100%;
  position: relative;
}

.phone-3d .service-img {
  width: 160% !important;
  display: block;
  border-radius: 15px;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.08));
  transform: translateZ(0px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* جميع الخدمات: حركة تسلسلية متتابعة */
.phone-3d .service-item:nth-child(1) .service-img {
  animation: floatUp 6s var(--ease-smooth) infinite;
  animation-delay: 0s;
}

.phone-3d .service-item:nth-child(2) .service-img {
  animation: floatUp 6s var(--ease-smooth) infinite;
  animation-delay: 0.5s;
}

.phone-3d .service-item:nth-child(3) .service-img {
  animation: floatUp 6s var(--ease-smooth) infinite;
  animation-delay: 1s;
}

.phone-3d .service-item:nth-child(4) .service-img {
  animation: floatUp 6s var(--ease-smooth) infinite;
  animation-delay: 1.5s;
}

.phone-3d .service-item:nth-child(5) .service-img {
  animation: floatUp 6s var(--ease-smooth) infinite;
  animation-delay: 2s;
}

.phone-3d .service-item:nth-child(6) .service-img {
  animation: floatUp 6s var(--ease-smooth) infinite;
  animation-delay: 2.5s;
}

@keyframes floatUp {
  0%, 100% { transform: translateZ(0px) translateY(0) scale(1); }
  45%, 55% { transform: translateZ(140px) translateY(-26px) scale(1.08); }
}

@keyframes floatDown {
  0%, 100% { transform: translateZ(0px) translateY(0) scale(1); }
  45%, 55% { transform: translateZ(140px) translateY(-26px) scale(1.08); }
}

.phone-3d .trans-list {
  padding: 0 15px;
  margin-top: 5px;
  transform: translateZ(10px);
}

.phone-3d .trans-list img { 
  width: 100%; 
  border-radius: 15px; 
  display: block; 
}

.phone-3d .bottom-nav-fixed {
  position: absolute;
  bottom: 8px;
  width: 90%;
  left: 5%;
  z-index: 50;
  animation: navFloat 5s ease-in-out infinite;
}

.phone-3d .nav-img {
  width: 100%;
  display: block;
  transform: translateZ(50px);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes navFloat {
  0%, 100% { transform: translateZ(50px) scale(1); }
  50% { transform: translateZ(70px) scale(1.02); }
}

.phone-3d .glass-finish {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(145deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 40%);
  z-index: 300;
  pointer-events: none;
  border-radius: 42px;
}

/* ===========================================
   Simple Phone Mockup Styles (نموذج هاتف بسيط)
   =========================================== */
.simple-phone-body {
  background: transparent;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* ===========================================
   Back to Top Button (زر العودة للأعلى)
   =========================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #F2A93B, #EF8618);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(242, 169, 59, 0.4);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(135deg, #EF8618, #F2A93B);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(242, 169, 59, 0.6);
}

.back-to-top:active {
  transform: translateY(-2px);
}
