/* =============================================
   ADT EXPORT — DESIGN SYSTEM (main.css)
   Design tokens, reset, typography, base
   ============================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --color-primary: #1a5c2a;
  --color-primary-dark: #134520;
  --color-secondary: #2d8a45;
  --color-accent: #c8922a;
  --color-accent-light: #e4b464;

  /* Backgrounds */
  --color-bg: #f9fafb;
  --color-bg-alt: #e8f5ec;
  --color-white: #ffffff;

  /* Text */
  --color-heading: #1a1a1a;
  --color-body: #4a4a4a;
  --color-muted: #7a7a7a;

  /* Footer */
  --color-footer-bg: #1a5c2a;
  --color-footer-text: #ffffff;

  /* WhatsApp */
  --color-whatsapp: #25d366;

  /* Placeholder */
  --color-ph-bg: #d0e8d8;
  --color-ph-border: #a8ccb4;
  --color-ph-text: #3a6b46;

  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-arabic: 'Cairo', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(26, 92, 42, 0.08);
  --shadow-md: 0 4px 20px rgba(26, 92, 42, 0.12);
  --shadow-lg: 0 8px 40px rgba(26, 92, 42, 0.18);
  --shadow-xl: 0 16px 60px rgba(26, 92, 42, 0.22);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --container-max: 1280px;
  --navbar-height: 80px;

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-floating: 500;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-body);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Arabic font override */
[lang="ar"] body,
body.lang-ar {
  font-family: var(--font-arabic);
}

/* RTL support */
body.rtl {
  direction: rtl;
  text-align: right;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: 1.2rem;
}

p {
  color: var(--color-body);
  font-size: 1rem;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  /* High quality rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  /* Modern performance optimization */
  content-visibility: auto;
}

ul,
ol {
  list-style: none;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---------- Section Base ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.section__title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
  border-radius: var(--radius-pill);
  margin: var(--space-xs) auto 0;
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.975rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-align: center;
  font-family: inherit;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(26, 92, 42, 0.3);
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 24px rgba(26, 92, 42, 0.35);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.btn--primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  transform: scale(0);
  transition: transform 0.6s ease-out;
  pointer-events: none;
}

.btn--primary:active::after {
  transform: scale(1);
  transition: 0s;
  opacity: 0;
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn--accent {
  background: linear-gradient(135deg, var(--color-accent), #b07820);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(200, 146, 42, 0.3);
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 146, 42, 0.45);
}

.btn--sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.875rem;
}

/* ---------- Image Placeholder ---------- */
.img-placeholder {
  width: 100%;
  background: var(--color-ph-bg);
  border: 2px dashed var(--color-ph-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-ph-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  padding: 1.5rem;
  user-select: none;
}

.img-placeholder__icon {
  font-size: 2rem;
  opacity: 0.7;
}

.img-placeholder__label {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ---------- Grid Utilities ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- Flex Utilities ---------- */
.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--gap-sm {
  gap: var(--space-sm);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.animate-fade-up {
  animation: fadeInUp 0.7s ease both;
}

.animate-fade {
  animation: fadeIn 0.6s ease both;
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Divider ---------- */
.divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
  border-radius: var(--radius-pill);
  margin: var(--space-sm) auto var(--space-lg);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color-accent);
  color: var(--color-white);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }

  .grid--4,
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
}