/* ============================================================================
   ATLAS VITA — BASE STYLES & DESIGN SYSTEM (assets/css/base.css)
   Mobile-First, Full RTL (dir="rtl"), Conversion-Focused Moroccan COD Theme
   ============================================================================ */

:root {
  /* Primary Brand Colors — Change once here or override per product in <style> */
  --color-primary: #0f766e;         /* Deep Emerald Teal */
  --color-primary-dark: #115e59;
  --color-primary-light: #ccfbf1;
  --color-primary-glow: rgba(15, 118, 110, 0.28);

  /* Accent Color (Warm Moroccan Terracotta / Orange) */
  --color-accent: #ea580c;
  --color-accent-dark: #c2410c;
  --color-accent-light: #ffedd5;
  --color-accent-glow: rgba(234, 88, 12, 0.30);

  /* Neutral & Surface Palette */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-dark: #0f172a;
  --color-dark-surface: #1e293b;

  /* Text Hierarchy */
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #64748b;

  /* Borders */
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  /* Status & Conversion Colors */
  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-danger: #dc2626;
  --color-danger-bg: #fee2e2;
  --color-warning: #d97706;
  --color-warning-bg: #fef3c7;
  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1da851;
  --color-gold: #f59e0b;

  /* Typography */
  --font-sans: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radii (16-24px rounded corners) */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Soft Shadows */
  --shadow-xs: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 20px 44px rgba(15, 23, 42, 0.13);
  --shadow-cta: 0 12px 28px -4px var(--color-primary-glow);

  /* Layout Dimensions */
  --container-max: 1120px;
  --container-narrow: 780px;
}

/* Reset & Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

ul,
ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Western Digits (0-9) Helper */
.num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  display: inline-block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 16px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .container,
  .container-narrow {
    padding-inline: 24px;
  }
}

/* Section Utilities */
.section {
  padding-block: 40px;
}

@media (min-width: 768px) {
  .section {
    padding-block: 68px;
  }
}

.section-alt {
  background-color: var(--color-surface-alt);
}

.section-surface {
  background-color: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin-inline: auto;
  margin-bottom: 32px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 900;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

/* Top Announcement Bar */
.top-bar {
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  padding: 9px 12px;
}

.top-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--color-primary-dark);
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: var(--shadow-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Dark Simple Footer */
.site-footer {
  background-color: var(--color-dark);
  color: #cbd5e1;
  padding-top: 48px;
  padding-bottom: 36px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 360px;
  margin-bottom: 16px;
}

.footer-title {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
}

.social-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: #94a3b8;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 var(--color-primary-glow);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(15, 118, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  }
}

.btn-pulse {
  animation: pulseGlow 2.2s infinite;
}
