/* =========================================================
   🌍 Elementor Global Arabic/English Responsive CSS
   By: Mohamed & ChatGPT
   ========================================================= */

/* -------------------------------
   Global variables & typography
   ------------------------------- */
:root {
  --font-ar: "Cairo", "Tajawal", "Noto Kufi Arabic", system-ui, sans-serif;
  --font-en: "Inter", "Poppins", "Roboto", system-ui, sans-serif;
  --color-primary: #0b74de;
  --color-dark: #1e1e1e;
  --color-light: #fafafa;
  --radius: 0.6rem;
  --transition: 0.25s ease-in-out;
}

/* -------------------------------
   Direction & Base Reset
   ------------------------------- */
html, body {
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--color-light);
  color: var(--color-dark);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Arabic Mode */
html[dir="rtl"], body[dir="rtl"], html[lang="ar"], body.rtl {
  direction: rtl;
  font-family: var(--font-ar);
  text-align: right;
}

/* English Mode */
html[dir="ltr"], body[dir="ltr"], html[lang="en"], body.ltr {
  direction: ltr;
  font-family: var(--font-en);
  text-align: left;
}

/* General Fixes for Elementor */
.elementor, .elementor * {
  box-sizing: border-box;
  font-family: inherit;
}

/* -------------------------------
   Headings
   ------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-block-end: 0.5em;
  line-height: 1.3;
  text-wrap: balance;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* -------------------------------
   Paragraphs & Text Blocks
   ------------------------------- */
p, .elementor-text-editor {
  margin: 0 0 1rem 0;
  word-break: break-word;
  hyphens: auto;
  text-align: start;
  text-wrap: pretty;
}

/* Lists */
ul, ol {
  padding-inline-start: 1.5rem;
}

/* -------------------------------
   Links
   ------------------------------- */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: darkblue; }

/* -------------------------------
   Buttons
   ------------------------------- */
.elementor-button, button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: white;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
}
.elementor-button:hover, button:hover, .btn:hover {
  background-color: #094e9d;
  transform: translateY(-2px);
}

/* RTL Flip icons if needed */
.icon-flip { display: inline-block; transition: transform var(--transition); }
html[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* -------------------------------
   Forms & Inputs
   ------------------------------- */
input, textarea, select {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  text-align: start;
  transition: border var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* -------------------------------
   Logical Spacing Utilities
   ------------------------------- */
.m-start-1 { margin-inline-start: .5rem; }
.m-end-1 { margin-inline-end: .5rem; }
.p-start-1 { padding-inline-start: .5rem; }
.p-end-1 { padding-inline-end: .5rem; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }

/* -------------------------------
   Flex Utilities
   ------------------------------- */
.flex { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.row-reverse-rtl {
  display: flex;
  gap: 1rem;
}
html[dir="rtl"] .row-reverse-rtl { flex-direction: row-reverse; }

/* -------------------------------
   Images & Media
   ------------------------------- */
img, video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* -------------------------------
   Sections & Containers
   ------------------------------- */
.elementor-section {
  padding-block: 3rem;
}
.container {
  width: min(95%, 1200px);
  margin-inline: auto;
}

/* -------------------------------
   Responsive
   ------------------------------- */
@media (max-width: 1024px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .elementor-section { padding-block: 2rem; }
}
@media (max-width: 767px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  body { font-size: 15px; }
}

/* -------------------------------
   Extras / Animation
   ------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.8s ease forwards;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------
   Helper Classes
   ------------------------------- */
.shadow { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.rounded { border-radius: var(--radius); }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
