/* ==================== ATHR PLATFORM - BASE STYLES ==================== */
/* 
 * الخلفية + الألوان + Typography + الأساسيات فقط
 * بدون أي مميزات (المميزات في features.css)
 */

/* ==================== ROOT VARIABLES ==================== */
:root {
  --color-primary: #16a34a;
  --color-primary-dark: #4d7c0f;
  --color-primary-medium: #22c55e;
  --color-ai: #f59e0b;
  --color-business: #2563eb;
  --color-finance: #059669;
  --color-accounting: #dc2626;
  --color-economics: #7c3aed;
  --glass-bg: rgba(240, 253, 244, 0.25);
  --glass-border: rgba(255, 255, 255, 0.4);
  --text-color: #0f172a;
  --border-radius: 24px;
  --font-arabic: 'IBM Plex Sans Arabic', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-english: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;
}

/* ==================== ANIMATIONS ==================== */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes waveFlow {
  0%, 100% { transform: translateX(-25%) scaleY(1) scaleX(1); }
  33% { transform: translateX(-10%) scaleY(1.1) scaleX(0.9); }
  66% { transform: translateX(10%) scaleY(0.9) scaleX(1.1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

html { 
  font-size: clamp(0.9rem, 2.5vw, 1.05rem); 
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-arabic);
  background: #f0fdf4;
  color: var(--text-color);
  line-height: 1.8;
  overflow-x: hidden;
  direction: rtl;
  padding: clamp(10px, 3vw, 20px);
  font-weight: 400;
  touch-action: manipulation;
}

body[dir="ltr"] { 
  direction: ltr; 
  font-family: var(--font-english);
}

/* ==================== BACKGROUND WAVES ==================== */
.background-waves {
  position: fixed; 
  inset: 0; 
  z-index: -2;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 25%, #fefce8 50%, #ecfccb 75%, #f0fdf4 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

.wave-layer {
  position: absolute; 
  bottom: -10%; 
  left: -10%; 
  width: 120%; 
  height: 300px;
  background: linear-gradient(90deg, rgba(22,163,74,0.08), rgba(77,124,15,0.08), rgba(34,197,94,0.08));
  border-radius: 60% 40% 0 0;
  animation: waveFlow 15s ease-in-out infinite;
}

.wave-layer:nth-child(2) {
  bottom: -5%; 
  height: 250px; 
  animation-delay: -5s;
  background: linear-gradient(90deg, rgba(77,124,15,0.06), rgba(34,197,94,0.06));
  border-radius: 40% 60% 0 0;
}

.wave-layer:nth-child(3) {
  bottom: 0%; 
  height: 200px; 
  animation-delay: -10s;
  background: linear-gradient(90deg, rgba(34,197,94,0.04), rgba(22,163,74,0.04));
  border-radius: 80% 20% 0 0;
}

/* ==================== MAIN CONTENT ==================== */
.main-content { 
  max-width: 1200px; 
  margin: 90px auto 0; 
  padding: clamp(20px, 5vw, 40px); 
}

.glassy-card {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: clamp(20px, 5vw, 30px);
  margin-bottom: clamp(25px, 5vw, 35px);
  backdrop-filter: blur(25px);
  transition: all 0.4s ease;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1), inset 0 2px 0 rgba(255,255,255,0.5);
}

.glassy-card:hover { 
  transform: translateY(-5px) scale(1.01); 
  border-color: rgba(255,255,255,0.7); 
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5 { 
  font-weight: 700; 
  text-shadow: 0 2px 8px rgba(255,255,255,0.8);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  text-align: center;
  margin-bottom: clamp(20px, 4vw, 30px);
  color: #14532d;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  border-bottom: 3px solid rgba(22,163,74,0.3);
  padding-bottom: clamp(10px, 2vw, 15px);
  margin-bottom: clamp(20px, 4vw, 30px);
  color: #166534;
  font-weight: 700;
}

h3 {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  margin-bottom: clamp(15px, 3vw, 20px);
  color: #15803d;
  font-weight: 600;
}

h4 {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  color: var(--color-primary);
  margin-bottom: clamp(12px, 2vw, 15px);
  font-weight: 600;
}

h5 {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--color-primary);
  margin-bottom: clamp(10px, 2vw, 12px);
  font-weight: 600;
}

p, li { 
  color: #475569; 
  margin-bottom: clamp(10px, 2vw, 12px);
  line-height: 1.85;
}

strong { 
  color: #14532d; 
  font-weight: 600; 
}

em {
  font-style: italic;
  color: var(--text-color);
}

ul, ol { 
  padding-right: clamp(20px, 4vw, 25px); 
  margin-bottom: 20px; 
}

body[dir="ltr"] ul, 
body[dir="ltr"] ol { 
  padding-right: 0; 
  padding-left: clamp(20px, 4vw, 25px); 
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-medium);
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  background: rgba(124,58,237,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-economics);
}

pre {
  background: rgba(30,41,59,0.95);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  line-height: 1.6;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

blockquote {
  border-right: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(22,163,74,0.08);
  border-radius: 12px;
  font-style: italic;
  color: #475569;
}

body[dir="ltr"] blockquote {
  border-right: none;
  border-left: 4px solid var(--color-primary);
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: 2rem 0;
}

/* ==================== HIGHLIGHTERS ==================== */
mark {
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 500;
  border: none;
}

.highlight-green { 
  background: rgba(22,163,74,0.2); 
  color: #14532d; 
}

.highlight-blue { 
  background: rgba(59,130,246,0.2); 
  color: #1e3a8a; 
}

.highlight-yellow { 
  background: rgba(234,179,8,0.2); 
  color: #713f12; 
}

.highlight-orange { 
  background: rgba(249,115,22,0.2); 
  color: #7c2d12; 
}

.highlight-pink { 
  background: rgba(236,72,153,0.2); 
  color: #831843; 
}

.highlight-business { 
  background: rgba(37,99,235,0.2); 
  color: #1e3a8a; 
}

.highlight-finance { 
  background: rgba(5,150,105,0.2); 
  color: #064e3b; 
}

.highlight-accounting { 
  background: rgba(220,38,38,0.2); 
  color: #7f1d1d; 
}

.highlight-economics { 
  background: rgba(124,58,237,0.2); 
  color: #4c1d95; 
}

/* ==================== IMAGES ==================== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { 
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(22, 163, 74, 0.5);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 163, 74, 0.7);
}

/* ==================== SELECTION ==================== */
::selection {
  background: rgba(22,163,74,0.3);
  color: var(--text-color);
}

::-moz-selection {
  background: rgba(22,163,74,0.3);
  color: var(--text-color);
}

/* ==================== FOCUS STYLES ==================== */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* ==================== BUTTONS (Base) ==================== */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ==================== INPUTS (Base) ==================== */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .main-content {
    margin-top: 70px;
    padding: 15px;
  }
  
  h2 { 
    border-bottom-width: 2px; 
  }
  
  blockquote {
    padding: 0.8rem 1rem;
  }
  
  pre {
    padding: 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    margin-top: 60px;
    padding: 10px;
  }
  
  .glassy-card {
    padding: 15px;
  }
  
  h1 {
    margin-bottom: 1rem;
  }
  
  h2 {
    margin-top: 20px;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  body {
    background: white;
  }
  
  .background-waves {
    display: none;
  }
  
  .glassy-card {
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .wave-layer {
    animation: none;
  }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
  body {
    background: white;
  }
  
  .glassy-card {
    background: white;
    border: 2px solid black;
  }
  
  h2 {
    border-bottom-width: 4px;
  }
}
