/* واحة الريان التعليمية - نظام التصميم */
/* Tajawal: ملف fonts-tajawal.css (محلي، woff2، 400+700) يُحمَّل من التخطيط قبل هذا الملف */

:root {
  --hero-dark: #0F3D3E;
  --hero-mid: #1A5F63;
  --primary: #1A5F63;
  --primary-light: #14B8A6;
  --primary-dark: #0F766E;
  --primary-foreground: #FFFFFF;
  --secondary: #F1F5F9;
  --secondary-foreground: #0F3D3E;
  --accent: #FB923C;
  --accent-dark: #EA580C;
  --accent-foreground: #FFFFFF;
  --background: #F8FAFC;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #0F172A;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --border: #E2E8F0;
  --destructive: #EF4444;
  --radius: 0.75rem;
  --status-pending: #F59E0B;
  --status-approved: #14B8A6;
  --status-rejected: #EF4444;
  --status-returned: #38BDF8;
  --bs-primary: #1A5F63;
  --bs-primary-rgb: 26, 95, 99;
  --gradient-cta: linear-gradient(135deg, var(--accent), #FDBA74);
  --gradient-hero: linear-gradient(135deg, #0F3D3E 0%, #1A5F63 55%, #0D4A4D 100%);
}

* {
  font-family: 'Tajawal', sans-serif;
}

html {
  font-size: 14px;
  direction: rtl;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Tajawal', sans-serif;
}

.site-brand-logo {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .site-brand-logo {
    height: 36px;
    max-width: 180px;
  }
}

/* Primary button override */
.btn-primary {
  background: var(--gradient-cta);
  border: none;
  color: white;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 146, 60, 0.35);
  background: var(--gradient-cta);
  color: white;
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: rgba(26, 95, 99, 0.08);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Cards */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(26, 95, 99, 0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Form inputs */
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(26, 95, 99, 0.15);
}

/* Badges */
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-returned { background: #DBEAFE; color: #1E40AF; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-draft { background: #F3F4F6; color: #374151; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-completed { background: #DBEAFE; color: #1E40AF; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hover shadow للبطاقات */
.hover-shadow {
  transition: box-shadow 0.3s ease;
}
.hover-shadow:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ===== القائمة الجانبية (Sidebar) ===== */
.sidebar-user-card {
  background: linear-gradient(135deg, var(--secondary) 0%, #fff 100%);
}

.sidebar-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--hero-mid), var(--primary-light));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-link {
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
  background: var(--muted);
  color: var(--primary) !important;
}

.sidebar-link-active {
  background: rgba(26, 95, 99, 0.12) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.sidebar-logout .logout-btn {
  color: var(--muted-foreground);
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-logout .logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--destructive) !important;
}

.sidebar-logout .logout-icon {
  width: 1.25rem;
  font-size: 1.1rem;
}

/* زر الخروج خارج القائمة الجانبية (مثل لوحة المتدرب) */
.logout-btn {
  color: var(--destructive);
}

.logout-btn:hover {
  color: var(--destructive);
  opacity: 0.9;
}

.logout-btn .logout-icon {
  width: 1rem;
  font-size: 0.95rem;
}

/* ===== الشريط السفلي للموبايل ===== */
@media (max-width: 767.98px) {
  .pb-mobile-nav {
    padding-bottom: 5rem !important;
  }
}

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1030;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.5rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.2s ease;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
  color: var(--primary);
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 600;
}

.mobile-bottom-nav--5 .mobile-nav-item {
  padding: 0.35rem 0.15rem;
  font-size: 0.62rem;
}

.mobile-bottom-nav--5 .mobile-nav-item i {
  font-size: 1.1rem;
}

.mobile-nav-item--account.active {
  color: var(--primary);
}

/* ===== كاردات المشاريع - تمييز لوني وتأثيرات ===== */
.project-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.project-card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.project-card-status-active {
  border-top: 4px solid var(--status-approved);
}

.project-card-status-inprogress {
  border-top: 4px solid #3B82F6;
}

.project-card-status-completed {
  border-top: 4px solid var(--muted-foreground);
}

.project-card-status-cancelled {
  border-top: 4px solid var(--destructive);
}

.project-card-status-draft {
  border-top: 4px solid #F59E0B;
}

/* ===== صفحة قالوا عنا (Testimonials) ===== */
.testimonials-page {
  position: relative;
}

.testimonials-hero {
  background: linear-gradient(135deg, rgba(26, 95, 99, 0.08) 0%, rgba(20, 184, 166, 0.06) 50%, rgba(241, 245, 249, 0.95) 100%);
  border: 1px solid rgba(26, 95, 99, 0.12);
  box-shadow: 0 8px 32px rgba(15, 61, 62, 0.06);
}

.testimonials-hero-deco {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(26, 95, 99, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(251, 146, 60, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.testimonials-badge {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(26, 95, 99, 0.15);
}

.testimonials-lead {
  max-width: 36rem;
}

.testimonial-empty {
  background: var(--card);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.testimonial-empty-icon {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, rgba(27, 122, 61, 0.12), rgba(34, 197, 94, 0.1));
  color: var(--primary);
  font-size: 2.25rem;
}

.testimonial-card {
  border-radius: 1rem !important;
  background: var(--card);
  border: 1px solid rgba(27, 122, 61, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(27, 122, 61, 0.12);
  border-color: rgba(27, 122, 61, 0.22) !important;
}

.testimonial-card-quote-bg {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 5rem;
  line-height: 1;
  color: rgba(27, 122, 61, 0.07);
  pointer-events: none;
}

[dir="rtl"] .testimonial-card-quote-bg {
  left: auto;
  right: 0.75rem;
}

.testimonial-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(27, 122, 61, 0.35);
}

.testimonial-card-title {
  color: var(--foreground);
}

.testimonial-card-body {
  font-size: 0.95rem;
  line-height: 1.75;
}

.testimonial-card-footer {
  border-top: 1px solid var(--border);
}

.testimonial-meta-name {
  color: var(--foreground);
  font-size: 0.9rem;
}

.testimonial-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-foreground);
  opacity: 0.5;
}

.testimonial-meta-project {
  flex: 1 1 auto;
  min-width: 0;
}

/* زر الدعم العائم — الصفحة العامة */
.support-fab-wrap {
  position: fixed;
  z-index: 1040;
  inset-inline-start: max(1rem, env(safe-area-inset-left, 0));
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0));
}

@media (min-width: 768px) {
  .support-fab-wrap {
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  }
}

.support-fab {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-fab:hover {
  transform: scale(1.06);
}

/* تفاصيل المشروع العامة */
.project-details-hero {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary) 0%, #fff 55%);
  border: 1px solid var(--border);
}

.project-details-hero-img {
  min-height: 200px;
  max-height: 360px;
  object-fit: cover;
}

@media (min-width: 992px) {
  .project-details-hero-img {
    min-height: 280px;
  }
}

.project-details-section {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}

/* الأسئلة الشائعة */
.faq-section .accordion-button:not(.collapsed) {
  background: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: none;
  border-inline-start: 3px solid var(--accent);
}

.faq-section .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(26, 95, 99, 0.2);
}

/* إشعارات المنصة (جرس + قائمة) */
.masar-notif-item-unread {
  background: rgba(26, 95, 99, 0.06);
}
.masar-notif-header {
  background: #fafafa;
}
.masar-notif-subheader {
  background: #f8f9fa;
}
.masar-notif-btn-sidebar {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.5rem;
}
.masar-notif-dropdown-sidebar {
  min-width: 280px;
  z-index: 1080;
}
