/* ==========================================================================
   معامل الثقة للتحاليل الطبية - ملف التنسيقات الرئيسي (Mobile-First)
   Identity: Primary: #1B3A5C | Accent: #F5821F | Gradient: #2C4A6E | BG: #F7F8FA
   ========================================================================== */

:root {
  --primary-color: #1B3A5C;
  --primary-light: #2C4A6E;
  --primary-dark: #0f2338;
  --accent-color: #F5821F;
  --accent-hover: #e07214;
  --bg-light: #F7F8FA;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Tajawal', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
}

/* Fix iOS form zoom by enforcing 16px minimum font size on mobile */
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Active Nav Links */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link.active {
  color: #F5821F !important;
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  left: 0;
  height: 2px;
  background-color: #F5821F;
  border-radius: 2px;
}

.mobile-nav-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.mobile-nav-link.active {
  background-color: rgba(245, 130, 31, 0.15) !important;
  color: #F5821F !important;
  font-weight: 700;
  border-right: 4px solid #F5821F;
}

/* Glassmorphism & Navy Gradient */
.bg-navy-gradient {
  background: linear-gradient(135deg, #1B3A5C 0%, #2C4A6E 100%);
}

.bg-navy-dark {
  background-color: var(--primary-color);
}

.bg-navy-pattern {
  background-color: #1B3A5C;
  background-image: radial-gradient(rgba(245, 130, 31, 0.08) 1px, transparent 0), radial-gradient(rgba(255, 255, 255, 0.04) 1px, #1B3A5C 0);
  background-size: 30px 30px, 60px 60px;
  background-position: 0 0, 30px 30px;
}

/* Page Hero for Internal Pages */
.page-hero {
  background: linear-gradient(135deg, #1B3A5C 0%, #2C4A6E 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 130, 31, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Soft Cards & Shadows */
.soft-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 16px -2px rgba(27, 58, 92, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  .soft-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -4px rgba(27, 58, 92, 0.12);
    border-color: rgba(245, 130, 31, 0.3);
  }
}

/* Touch Friendly Buttons (Min 44px height for mobile accessibility) */
.btn-accent {
  background-color: var(--accent-color);
  color: #ffffff;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(245, 130, 31, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(245, 130, 31, 0.45);
}

.btn-outline-navy {
  border: 2px solid #ffffff;
  color: #ffffff;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
}

.btn-outline-navy:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Floating WhatsApp Pulse */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-pulse {
  animation: pulse-ring 2s infinite;
}

/* Badges */
.badge-accent {
  background-color: rgba(245, 130, 31, 0.12);
  color: #c95e04;
  border: 1px solid rgba(245, 130, 31, 0.25);
}

.badge-navy {
  background-color: rgba(27, 58, 92, 0.08);
  color: #1B3A5C;
  border: 1px solid rgba(27, 58, 92, 0.18);
}

/* Custom Tabs Active State */
.filter-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.filter-tab.active {
  background-color: #1B3A5C !important;
  color: #ffffff !important;
  border-color: #1B3A5C !important;
  box-shadow: 0 4px 12px rgba(27, 58, 92, 0.2);
}

/* Modal Transitions */
.modal-backdrop {
  background: rgba(15, 35, 56, 0.8);
  backdrop-filter: blur(4px);
}

/* Animation for cards appearance */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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