/* ============================================================
   AELAANY — GLOBAL CSS
   Design tokens, typography, base styles, utility classes
   ============================================================ */

/* ── Google Fonts Preload (loaded via functions.php) ───── */
/* Inter (EN body) | Poppins (EN headings) | Tajawal (AR) */

/* ── CSS Custom Properties (Design Tokens) ──────────────── */
:root {
  /* Brand Colors */
  --clr-primary:       #1B4FD8;
  --clr-primary-light: #0EA5E9;
  --clr-primary-dark:  #1E3A8A;
  --clr-primary-hover: #1540B8;

  /* Gradients */
  --gradient-main:     linear-gradient(135deg, #1B4FD8 0%, #0EA5E9 100%);
  --gradient-dark:     linear-gradient(135deg, #1E3A8A 0%, #1B4FD8 100%);
  --gradient-hero:     linear-gradient(135deg, #0f2460 0%, #1B4FD8 50%, #0EA5E9 100%);

  /* Neutral Colors */
  --clr-white:         #FFFFFF;
  --clr-bg-light:      #F0F6FF;
  --clr-bg-section:    #F8FBFF;
  --clr-text-dark:     #1E293B;
  --clr-text-body:     #334155;
  --clr-text-muted:    #64748B;
  --clr-border:        #E0EEFF;
  --clr-card-border:   #D1E4FF;

  /* Typography — English */
  --font-en-heading:   'Poppins', sans-serif;
  --font-en-body:      'Inter', sans-serif;

  /* Typography — Arabic */
  --font-ar-heading:   'Tajawal', sans-serif;
  --font-ar-body:      'Tajawal', sans-serif;

  /* Font Sizes */
  --fs-hero:    clamp(2.2rem, 5vw, 3.8rem);
  --fs-h1:      clamp(2rem, 4vw, 3rem);
  --fs-h2:      clamp(1.6rem, 3vw, 2.2rem);
  --fs-h3:      clamp(1.2rem, 2vw, 1.5rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-xs:      0.75rem;

  /* Spacing */
  --section-py:        80px;
  --section-py-mobile: 48px;
  --container-max:     1200px;
  --gap-card:          24px;

  /* Border Radius */
  --radius-card:   12px;
  --radius-btn:    8px;
  --radius-pill:   50px;
  --radius-circle: 50%;

  /* Shadows */
  --shadow-card:   0 4px 24px rgba(27, 79, 216, 0.08);
  --shadow-hover:  0 12px 40px rgba(27, 79, 216, 0.18);
  --shadow-btn:    0 4px 16px rgba(27, 79, 216, 0.3);
  --shadow-header: 0 2px 20px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition:    all 0.3s ease;
  --transition-fast: all 0.18s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-en-body);
  font-size: var(--fs-body);
  color: var(--clr-text-body);
  line-height: 1.7;
  background-color: var(--clr-white);
  -webkit-font-smoothing: antialiased;
}

body.lang-ar {
  font-family: var(--font-ar-body);
  direction: rtl;
  text-align: right;
}

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

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

a:hover {
  color: var(--clr-primary-dark);
}

ul {
  list-style: none;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-en-heading);
  color: var(--clr-text-dark);
  line-height: 1.25;
  font-weight: 700;
}

body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4,
body.lang-ar h5,
body.lang-ar h6 {
  font-family: var(--font-ar-heading);
  font-weight: 800;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p {
  margin-bottom: 1rem;
  color: var(--clr-text-body);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn,
.elementor-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  font-family: var(--font-en-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-main);
  color: var(--clr-white);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--gradient-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 79, 216, 0.4);
  color: var(--clr-white);
}

.btn-secondary {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn-secondary:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--clr-white);
  color: var(--clr-primary);
  box-shadow: var(--shadow-btn);
}
.btn-white:hover {
  background: var(--clr-bg-light);
  transform: translateY(-2px);
}

/* ── Container ───────────────────────────────────────────── */
.aelaany-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section Wrapper ─────────────────────────────────────── */
.aelaany-section {
  padding: var(--section-py) 0;
}

.aelaany-section-bg {
  background-color: var(--clr-bg-light);
}

.aelaany-section-dark {
  background: var(--gradient-dark);
  color: var(--clr-white);
}

/* ── Section Titles ──────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--clr-primary-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--fs-h2);
  color: var(--clr-text-dark);
  margin-bottom: 16px;
}

.section-title span {
  color: var(--clr-primary);
}

.section-title--white {
  color: var(--clr-white);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  max-width: 600px;
  line-height: 1.8;
}

.section-subtitle--white {
  color: rgba(255, 255, 255, 0.85);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

/* ── Cards ───────────────────────────────────────────────── */
.aelaany-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--radius-card);
  padding: 32px;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.aelaany-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--clr-primary-light);
}

.aelaany-card__icon {
  width: 60px;
  height: 60px;
  background: var(--clr-bg-light);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--clr-primary);
  font-size: 28px;
  transition: var(--transition);
}

.aelaany-card:hover .aelaany-card__icon {
  background: var(--gradient-main);
  color: var(--clr-white);
}

.aelaany-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-text-dark);
  margin-bottom: 10px;
}

.aelaany-card__text {
  font-size: var(--fs-small);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Grid Layouts ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-card); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-card); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-card); }

/* ── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blue-badge {
  display: inline-block;
  background: var(--clr-bg-light);
  color: var(--clr-primary);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Divider */
.divider-blue {
  width: 60px;
  height: 4px;
  background: var(--gradient-main);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ── Hide WordPress default page title on Elementor pages ── */
.elementor-page .page-header,
.elementor-page .entry-header,
.elementor-page .page-title,
.elementor-page .entry-title,
.site-main > article > .entry-header,
.post-type-page .page-header {
  display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-py: var(--section-py-mobile);
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .section-header {
    margin-bottom: 36px;
  }
}
