 /* --- خط تجوال وإعدادات الألوان العامة --- */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --bg-dark: #070913;
  --card-bg: rgba(16, 20, 36, 0.92);
  --primary: #00f0ff;
  --primary-glow: rgba(0, 240, 255, 0.35);
  --whatsapp: #25d366;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-card: rgba(0, 240, 255, 0.22);
  --font: 'Tajawal', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  font-family: var(--font);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* --- خلفية الفضاء والنجوم المتحركة --- */
#space-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

/* --- الهيدر والتعريف بالمعرض --- */
header {
  text-align: center;
  margin-bottom: 35px;
}

.main-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.25);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- شريط أزرار تصفية الأقسام --- */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 45px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary);
  color: #080a12;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* --- شبكة المشاريع المتناسقة (CSS Grid) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  width: 100%;
}

/* --- بطاقة المشروع --- */
.project-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease;
  backdrop-filter: blur(8px);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 240, 255, 0.65);
  box-shadow: 0 16px 36px rgba(0, 240, 255, 0.22);
}

/* --- شريط المتصفح العلوي في البطاقة --- */
.mockup-header {
  background: rgba(14, 17, 30, 0.95);
  padding: 10px 14px;
  display: none !important;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.browser-url {
  color: #8b9bb4;
  font-size: 11.5px;
  margin-right: auto;
  direction: ltr;
}

/* --- صورة المعاينة (مقاس ثابت ومضبوط نهائياً) --- */
/* إخفاء شريط المتصفح العلوي */
.mockup-header {
  display: none !important;
}
/* 1. ضبط شبكة المشاريع لتعرض بطاقات متجاورة ومنظمة */
.projects-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 25px !important;
    padding: 20px 0 !important;
    width: 100% !important;
}

/* 2. ضبط البطاقة لتكون متناسقة ومرتبة عمودياً */
.project-card {
    display: flex !important;
    flex-direction: column !important;
    background: #111625 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.project-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.15) !important;
}

/* 3. ضبط مقاس الصورة ومنع تداخلها مع النصوص */
.project-img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* 4. مساحة النصوص لمنع تغطيتها للصورة */
.project-content {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    gap: 10px !important;
}

.project-card:hover .project-img {
    transform: scale(1.03);
}

/* تأثير تكبير ناعم للصورة عند التمرير */
.project-card:hover .project-img {
  transform: scale(1.03);
}

/* --- المحتوى والنصوص تحت الصورة --- */
.project-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 12px;
}

.project-category {
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
}

.project-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.project-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
  flex-grow: 1;
}
 /* --- وسوم التقنيات --- */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tech-tags .tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
}

/* --- زر معاينة الموقع --- */
.preview-btn {
  display: block;
  text-align: center;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 11px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: auto;
}

.preview-btn:hover {
  background: var(--primary);
  color: #080a12;
  box-shadow: 0 0 18px var(--primary-glow);
}

/* --- الفوتر مع وسائل التواصل المضيئة --- */
.site-footer {
  margin-top: 75px;
  padding: 45px 20px 30px;
  background: rgba(11, 14, 25, 0.95);
  border-top: 1px solid var(--border-card);
  border-radius: 24px 24px 0 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-title {
  color: #ffffff;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.footer-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.footer-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.whatsapp-pill {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid var(--whatsapp);
  color: var(--whatsapp);
}
.whatsapp-pill:hover {
  background: var(--whatsapp);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(37, 211, 102, 0.45);
  transform: translateY(-3px);
}

.email-pill {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--primary);
  color: var(--primary);
}
.email-pill:hover {
  background: var(--primary);
  color: #080a12;
  box-shadow: 0 0 22px var(--primary-glow);
  transform: translateY(-3px);
}

.contact-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  color: #718096;
  font-size: 13px;
}

/* --- أزرار التواصل العائمة السريعة --- */
.floating-contact {
  position: fixed;
  bottom: 25px;
  left: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.float-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.float-btn.float-whatsapp {
  background: #25d366;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

.float-btn.float-email {
  background: #00f0ff;
  color: #080a12;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.float-btn:hover {
  transform: scale(1.15) translateY(-3px);
}

.float-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* --- التوافق التام مع الجوال --- */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-img {
    height: auto !important;
  }
  .project-content {
    padding: 16px;
  }
  .footer-buttons {
    flex-direction: column;
  }
  .contact-pill {
    width: 100%;
    justify-content: center;
  }
  .floating-contact {
    bottom: 15px;
    left: 15px;
  }
}
/* تفعيل فلترة وإخفاء البطاقات حسب القسم */
.project-card.hidden,
.project-card.hide,
.hidden,
.hide {
  display: none !important;
}
/* ========================================================
   ضبط الأعمدة ومنع تمدد البطاقات المنفردة عند الفلترة
   ======================================================== */

.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
}

/* تقسيم الشبكة إلى 3 أعمدة متناسقة وثابتة */
.projects-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    width: 100% !important;
    padding: 20px 0 !important;
}

/* تثبيت حجم البطاقة ومنعها من التمدد خارج عمودها */
.project-card {
    min-width: 0 !important;
    width: 100% !important;
    background: #111625 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* تجاوب الأعمدة للشاشات الأصغر */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 650px) {
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================================
   طريقة عرض الصور (اختر الحل الأنسب لك):
   ======================================================== */

/* الحل الموصى به: الصورة تملأ الإطار، وعند لمسها بالفأرة تتحرك بنعومة لتكشف كامل الموقع لآخره */
.projects-grid img,
.project-card img,
.project-img {
    width: 100% !important;
    height: 270px !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    background-color: #0b0f19 !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
    transition: object-position 3s ease-in-out !important;
}

/* حركة التمرير لكشف الموقع كاملاً عند التحويم */
.project-card:hover .project-img {
    object-position: bottom center !important;
}
/* --- Hero Section Styling --- */
.hero {
  max-width: 850px;
  margin: 4rem auto 3rem auto;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  font-size: 0.85rem;
  color: #a1a1aa;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* لون أخضر ينبض بالنشاط */
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 1.2rem;
}

.text-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.1rem;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 650px;
  margin: 0 auto 2rem auto;
}

.hero-description strong {
  color: #f1f5f9;
}

/* الأزرار الرئيسية */
.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-2px);
}
html {
  scroll-behavior: smooth;
}