/**
 * Core CSS
 * Variables and base styles
 */

:root {
  /* Base Theme Colors */
  --primary-color: #1a5490;
  --secondary-color: #2c7fb8;
  --text-color: #333333;
  --bg-color: #ffffff;
  --border-color: #002e5e;
  --spacing-unit: 1rem;

  /* Theme Primary Colors */
  --color-primary: #002f5f;
  --color-primary-on-hover: #597898;
  --color-secondary: #acdee6;
  --color-text-base: #4b4b4b;
  --color-text-inverted: #fff;
  --color-text-inverted-on-hover: #9bb2ce;

  /* Header Variables */
  --header-bg-color: var(--bg-color);
  --header-border-color: var(--border-color);
  --header-text-color: var(--text-color);
  --header-height: 116px;
  --header-height-desktop: 116px;
  --header-spacing: var(--spacing-unit);

  /* Font Families */
  --font-family-ar: "Al-Jazeera-Arabic", system-ui, sans-serif;
  --font-family-ar-bold: "Al-Jazeera-Arabic", system-ui, sans-serif;
  --font-family-en: "WorkSans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --heading-font-family: "WorkSans", system-ui, sans-serif;

  /* WorkSans font family for all elements */
  --font-family-worksans: "WorkSans", Arial, sans-serif;

  /* Typography */
  --heading-color: var(--text-color);
  --meta-color: #666666;

  /* Transitions */
  --transition-default: all 0.3s ease;

  /* Colors */
  --color-bg-hover: rgba(0, 47, 95, 0.1);
  --color-bg-light: #f5f5f5;

  /* Navigation disabled state */
  --nav-disabled-opacity: 0.8;
  --nav-disabled-cursor: default;
  --nav-disabled-pointer-events: none;

  /* Branding styles */
  --branding-word-break: keep-all;
  --branding-word-wrap: normal;
  --branding-overflow-wrap: normal;
  --branding-hyphens: none;

  /* Breakpoints - Comprehensive Responsive System */
  /* Mobile - Extra Small (شاشات قديمة) */
  --breakpoint-xs: 320px;
  /* Mobile - Small (Samsung Galaxy, etc.) */
  --breakpoint-sm: 360px;
  /* Mobile - Medium (iPhone 12/13, Pixel 5) */
  --breakpoint-sm-md: 390px;
  /* Mobile - Large */
  --breakpoint-md: 480px;
  /* Tablet - Small */
  --breakpoint-tablet-sm: 576px;
  /* Tablet - Medium (iPad) */
  --breakpoint-tablet: 768px;
  /* Tablet - Large (iPad Air/Pro) */
  --breakpoint-tablet-lg: 810px;
  /* Desktop - Small */
  --breakpoint-lg: 992px;
  /* Desktop - Medium (1366×768) */
  --breakpoint-xl: 1024px;
  /* Desktop - Large (1536×864) */
  --breakpoint-xl-lg: 1366px;
  /* Desktop - Extra Large (1920×1080) */
  --breakpoint-xxl: 1536px;
  /* Desktop - XXL (1920×1080+) */
  --breakpoint-xxxl: 1920px;

  /* Branding */
  --branding-font-size: 30px;
  --branding-logo-size-mobile: 60px;
  --branding-logo-size-desktop: 90px;
  --branding-gap-mobile: 5px;
  --branding-gap-base: 6px;
  --branding-gap-desktop: 6px;

  /* Layout */
  --container-max-width: 1200px;

  /* Navigation */
  --nav-primary-color: #002f5f;
  --nav-text-color: #fff;
  --nav-hover-color: #9bb2ce;
  --nav-font-family: TheSansB2-Light, Verdana, sans-serif;

  /* Footer Variables */
  --footer-bg-color: var(--nav-primary-color);
  --footer-bg-image: url("../img/logo.png");
  --footer-text-color: var(--nav-text-color);
  --footer-heading-color: var(--nav-text-color);
  --footer-link-color: var(--nav-text-color);
  --footer-link-hover-color: var(--nav-hover-color);
  --footer-border-color: rgba(255, 255, 255, 0.2);
  --footer-padding: calc(var(--spacing-unit) * 3);
  --footer-margin-top: calc(var(--spacing-unit) * 2);
  --footer-widget-gap: calc(var(--spacing-unit) * 2.5);
  --footer-bottom-padding: var(--spacing-unit);
  --footer-bottom-border-width: 1px;
  --footer-widget-padding: 0;
  --footer-top-padding: calc(var(--spacing-unit) * 2);
  --footer-top-gap: calc(var(--spacing-unit) * 2);

  /* Bootstrap Style Variables */
  --bs-body-font-size: 1rem;
  --bs-body-color: #4b4b4b;
  --bs-body-bg: #fff;
  --bs-card-bg: #fff;
  --bs-card-color: var(--bs-body-color);
  --bs-card-spacer-y: 1.25rem;
  --bs-card-spacer-x: 1.25rem;
  --bs-card-cap-padding-y: 0.75rem;
  --bs-card-cap-padding-x: 1.25rem;
  --bs-card-border-width: 1px;
  --bs-card-border-color: #dfdfdf;
  --bs-card-cap-bg: #f2f2f2;
  --bs-card-cap-color: var(--bs-body-color);
  --bs-link-color: #0555a4;
  --bs-link-hover-color: #032f5a;
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  --color-text: #4b4b4b;
  --color-grey-light: #f2f2f2;
  --color-link: #0555a4;
  --color-border: #dfdfdf;
  --font-size-regular: var(--bs-body-font-size);
  --font-size-small: calc(var(--bs-body-font-size) * 0.875);
  --font-size-large: calc(var(--bs-body-font-size) * 1.3);
  --space-medium: 1.25rem;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Apply WorkSans to all elements - will be overridden by rtl.css for Arabic */
html
  *:not(.fab):not(.fas):not(.far):not(.fal):not(.fad):not(.fa):not(
    [class*="fa-"]
  ):not(i[class*="fa-"]) {
  font-family: "WorkSans", sans-serif;
}

/* Exception for Font Awesome icons - they need their own font */
html .fab,
html .fas,
html .far,
html .fal,
html .fad,
html .fa,
html [class*="fa-"],
html i[class*="fa-"],
html .social-icon i,
html .social-icon .fab,
html .social-icon .fas,
html .social-icon .far {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands",
    "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome";
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HTML Element
   ============================================ */
/* Force HTML direction to LTR to keep scrollbar on right - Multiple selectors for maximum compatibility */
html,
html:root,
html[dir],
html[dir="rtl"],
html[dir="ltr"] {
  /* Prevent horizontal scrolling */
  width: 100%;
  max-width: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  direction: ltr; /* Keep scrollbar on the right - CRITICAL */
}

/* ============================================
   Body Element
   ============================================ */
body {
  background-color: var(--bs-card-bg);
  font-weight: 400;
  font-style: normal;
  font-size: 1em;
  color: #4b4b4b;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  /* Prevent horizontal 
  overflow-x: hidden;scrolling */
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Font family will be set in rtl.css or ltr.css */
[dir="ltr"] body {
  font-family: "WorkSans", sans-serif;
  text-align: left;
}

[dir="rtl"] body {
  font-family: var(--font-family-ar);
  text-align: right;
}

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

a:hover {
  text-decoration: none;
}

/* Base image styles */
img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* Images inside containers */
.container img,
.entry-content img,
.page-content img,
.site-main img,
article img,
#main-content img,
main img {
  max-width: 100%;
  width: auto;
}

/* Full-width images - use container width */
img.full-width,
.full-width-image-wrapper img,
.container-breakout img,
.container img.full-width,
.entry-content img.full-width,
.page-content img.full-width,
.site-main img.full-width,
article img.full-width,
#main-content img.full-width {
  max-width: 100%;
  width: 100%;
  display: block;
}

/* Large images */
.container img.size-large,
.container img.size-full,
.entry-content img.size-large,
.entry-content img.size-full,
.page-content img.size-large,
.page-content img.size-full,
.site-main img.size-large,
.site-main img.size-full,
article img.size-large,
article img.size-full,
#main-content img.size-large,
#main-content img.size-full {
  max-width: 100%;
  width: 100%;
  display: block;
}

/* WordPress block images */
.wp-block-image img,
.wp-block-image.size-large img,
.wp-block-image.size-full img {
  max-width: 100%;
  width: auto;
}

.wp-block-image.full-width img,
.wp-block-image img.full-width {
  max-width: 100%;
  width: 100%;
  display: block;
}
