/* ==========================================================================
   Mina Group - Main Design System & Base Variables
   Aesthetic: Ultra-modern Petroleum Engineering, Deep Navy & Golden Amber
   Direction: RTL (Native Arabic with English Technical Subtitles)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Primary Brand Colors (Petroleum Navy & Engineering Blue) */
  --color-primary-950: #060c18;
  --color-primary-900: #0b1528;
  --color-primary-800: #12213d;
  --color-primary-700: #1b315b;
  --color-primary-600: #25447e;
  --color-primary-500: #325ba7;

  /* Accent Brand Colors (Refined Engine Oil Golden Amber) */
  --color-accent-600: #b45309;
  --color-accent-500: #d97706;
  --color-accent-400: #f59e0b;
  --color-accent-300: #fbbf24;
  --color-accent-100: #fef3c7;
  --color-accent-50:  #fffbeb;

  /* Neutral Surfaces & Grays */
  --color-bg-body: #f8fafc;
  --color-bg-card: #ffffff;
  --color-bg-subtle: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;

  /* Typography Colors */
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Status Colors */
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --color-danger: #e11d48;
  --color-danger-bg: #fff1f2;
  --color-info: #0284c7;
  --color-info-bg: #f0f9ff;

  /* Typography */
  --font-heading: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-body: 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Elevations */
  --container-max-width: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.09), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(217, 119, 6, 0.25);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & RTL Defaults */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-950);
  line-height: 1.3;
  font-weight: 700;
  word-break: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Prevent auto-zoom on iOS when focusing inputs */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px;
  }
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Utilities */
.text-center { text-align: center; }
.text-gold { color: var(--color-accent-400); }
.text-muted { color: var(--color-text-muted); }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); direction: ltr; display: inline-block; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Responsive Page Section & Card Defaults */
.page-main-section {
  padding: 3rem 0 5rem;
}

.page-content-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.page-header-title {
  font-size: 2.2rem;
  margin: 0.35rem 0 0.5rem;
  color: var(--color-primary-950);
}

.page-header-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 780px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .page-main-section {
    padding: 1.75rem 0 3rem;
  }
  .page-content-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }
  .page-header-title {
    font-size: 1.55rem;
  }
  .page-header-subtitle {
    font-size: 0.95rem;
  }
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
