/* ========================================
   COMPONENTS.CSS - المكونات
   ========================================
   الملف دا فيه:
   - الأزرار (Buttons)
   - الشارات (Badges, Pills, Tags)
   - عناوين الأقسام (Section Headers)
   - رسائل التنبيه (Toast)
   ======================================== */

/* ===== الأزرار - Buttons ===== */
.btn {
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== View My Work - Liquid Fill ===== */
.btn-primary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary:hover {
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.btn-primary:active { 
  transform: scale(0.96); 
}

/* ===== Get in Touch - Glitch Hover ===== */
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.btn-ghost:hover {
  border-color: var(--primary);
  text-shadow: 
    2px 0 var(--secondary),
    -2px 0 var(--primary);
  animation: glitchText 0.3s ease;
}

@keyframes glitchText {
  0%, 100% { text-shadow: none; }
  25% { text-shadow: -2px 0 var(--primary), 2px 0 var(--secondary); }
  50% { text-shadow: 2px 0 var(--primary), -2px 0 var(--secondary); }
  75% { text-shadow: -1px 0 var(--secondary), 1px 0 var(--primary); }
}

/* ===== Resume - Neon Flicker ===== */
.nav-cta {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  transition: all 0.3s;
  user-select: none;
}

.nav-cta:hover {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 
    0 0 10px var(--primary),
    0 0 20px var(--primary),
    0 0 40px var(--primary);
  animation: neonFlicker 0.15s ease 2;
}

@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ===== Live Demo - Ripple Wave ===== */
.project-actions .primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
}

.project-actions .primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s, opacity 0.6s;
  opacity: 0;
}

.project-actions .primary:hover::after {
  width: 300px;
  height: 300px;
  opacity: 0;
  animation: rippleWave 0.6s ease-out;
}

@keyframes rippleWave {
  0% { width: 0; height: 0; opacity: 0.5; }
  100% { width: 300px; height: 300px; opacity: 0; }
}

.project-actions .primary:hover {
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

/* ===== Source Code - Typewriter Underline ===== */
.project-actions .secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.project-actions .secondary::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.project-actions .secondary:hover {
  color: var(--primary);
  border-color: transparent;
}

.project-actions .secondary:hover::after {
  width: 60%;
  animation: typewriterLine 0.4s steps(10);
}

@keyframes typewriterLine {
  from { width: 0; }
  to { width: 60%; }
}

/* ===== Send Message - Arrow Shoot ===== */
.btn-full {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
}

.btn-full i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-full:hover i {
  animation: arrowShoot 0.5s ease;
}

@keyframes arrowShoot {
  0% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(20px); opacity: 0; }
  51% { transform: translateX(-10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

.btn-full:hover {
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* ===== Scroll to Top - Bounce Up ===== */
.scroll-top {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.scroll-top:hover {
  animation: bounceUp 0.5s ease;
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

@keyframes bounceUp {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
  50% { transform: translateY(-4px); }
  70% { transform: translateY(-6px); }
}

/* ===== الشارات - Badges ===== */

/* Pill - الشارة المستديرة (زي "Open to Opportunities") */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(123, 97, 255, 0.1));
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.pill:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  border-color: rgba(0, 212, 255, 0.6);
}

/* النقطة المتحركة جوا الـ Pill */
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 
    0 0 10px var(--glow-accent),
    0 0 20px rgba(0, 212, 255, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

/* Badge - شارة صغيرة (زي "Available") */
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(123, 97, 255, 0.08));
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

/* Tag - للتقنيات في المشاريع */
.tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(123, 97, 255, 0.08));
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
}

.tag:hover {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateY(-2px);
}

/* ===== Chips - للمهارات في الـ Hero Card ===== */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.chip {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 212, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 97, 255, 0.08));
  box-shadow: 0 0 25px var(--glow-primary);
  transform: translateY(-3px);
}

/* ===== عناوين الأقسام - Section Headers ===== */
.section-header { 
  margin-bottom: var(--space-12);
  text-align: center;
}

/* Eyebrow - النص الصغير فوق العنوان */
.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: inline-block;
  position: relative;
}

/* الخطوط على جنب الـ Eyebrow */
.eyebrow::before,
.eyebrow::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.eyebrow::before {
  right: calc(100% + 12px);
  background: linear-gradient(90deg, transparent, var(--primary));
}

.eyebrow::after { left: calc(100% + 12px); }

/* العنوان الرئيسي للقسم */
.section-title {
  font-size: clamp(32px, 5vw, 48px); /* حجم متجاوب */
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* الوصف تحت العنوان */
.section-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== رسالة التنبيه - Toast ===== */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px); /* مخفية تحت */
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  font-size: 14px;
  opacity: 0;
  transition: all 0.4s;
  z-index: 9999;
}

/* لما تظهر */
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* رسالة نجاح */
.toast.success { 
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--glow-accent);
}

/* رسالة خطأ */
.toast.error {
  border-color: var(--pink);
  box-shadow: 0 0 30px rgba(255, 0, 110, 0.5);
}


/* ===== شارة Coming Soon ===== */
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.1), rgba(0, 212, 255, 0.1));
  border: 1px dashed rgba(255, 255, 255, 0.15);
  letter-spacing: 0.05em;
}

.coming-soon-badge i {
  font-size: 14px;
  color: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
