/* رأي مصر - نمط مخصص */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

* {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  direction: rtl;
  text-align: right;
}

/* حركات مخصصة */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .7;
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

/* تنسيقات مخصصة */
.admin-tab {
  transition: all 0.3s ease;
}

.admin-tab.active {
  border-bottom: 2px solid #1e3a8a;
  color: #1e3a8a;
}

/* تحسين المدخلات */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* تخصيص شريط التمرير */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* تأثيرات الظل */
.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* أزرار مخصصة */
.btn-primary {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* بطاقات */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* جداول محسنة */
table {
  border-collapse: separate;
  border-spacing: 0;
}

table thead tr {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

table tbody tr {
  transition: all 0.2s ease;
}

table tbody tr:hover {
  background-color: #f8fafc;
  transform: scale(1.01);
}

/* نوافذ منبثقة */
.modal-backdrop {
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  animation: fadeIn 0.3s ease-out, slideIn 0.3s ease-out;
}

/* إشعارات */
.notification {
  animation: slideIn 0.3s ease-out;
}

/* شريط التقدم */
.progress-bar {
  transition: width 0.5s ease;
}

/* تحسين الأيقونات */
.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.icon-wrapper:hover {
  transform: rotate(10deg) scale(1.1);
}

/* تخصيص الطباعة */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  table {
    font-size: 0.875rem;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* تأثيرات التحميل */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* تنسيقات إضافية للشكل الاحترافي */
.gradient-text {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
