/* ===============================================
   NEW STAGE — Recruitment Agency Website (Bilingual)
   Theme colors match the original godaddysites design
   =============================================== */

:root {
  --primary: #204788;
  --primary-hover: #123369;
  --accent: #0CA789;
  --bg: #FCFEFA;
  --bg-alt: #E5F1D9;
  --text: #07214B;
  --text-muted: #516483;
  --on-primary: #FCFEFA;
  --border: #85D3C4;
  --border-subtle: rgba(133, 211, 196, 0.4);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 6px 20px rgba(0, 0, 0, 0.08);

  --font-heading: "Golos Text", "Cairo", system-ui, sans-serif;
  --font-body: "Kumbh Sans", "Cairo", system-ui, sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
  --pill-radius: 50rem;

  --container: 80rem;
  --section-pad-y: 4rem;
  --section-pad-x: 2rem;
  --nav-height: 72px;
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}
p { margin: 0; }

button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute; top: -40px; left: 0;
  padding: 8px 16px;
  background: var(--primary); color: #fff;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; outline: 2px solid var(--primary); outline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--section-pad-x);
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--pill-radius);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-elevated);
  color: var(--on-primary);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-block { width: 100%; }

/* ===== Language toggle ===== */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: var(--pill-radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  margin-inline-start: 0.5rem;
  white-space: nowrap;
  line-height: 1;
}
.lang-toggle:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.lang-toggle:active { transform: scale(0.97); }
.lang-toggle-icon { width: 16px; height: 16px; flex-shrink: 0; }
.lang-toggle-label { line-height: 1; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  height: 48px;
  flex-shrink: 0;
}
.nav-logo img { height: 48px; width: auto; }
.nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  margin-right: 1rem;
}
[dir="rtl"] .nav-links { margin-left: 1rem; margin-right: auto; }
.nav-link {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--primary); text-decoration: none; }
.nav-link.current { color: var(--primary); }
.nav-link.current::after {
  content: "";
  position: absolute;
  left: 0.25rem; right: 0.25rem;
  bottom: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.nav-cta-link {
  background: var(--primary);
  color: var(--on-primary) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--pill-radius);
}
.nav-cta-link:hover { background: var(--primary-hover); }
.nav-cta-link.current::after { display: none; }
.nav-hamburger, .nav-mobile-spacer { display: none; }

/* Mobile drawer */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 998;
}
.nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(85vw, 360px);
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
}
[dir="rtl"] .nav-drawer {
  right: auto; left: 0;
  transform: translateX(-100%);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.15);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.drawer-header .nav-logo { height: 48px; }
.drawer-header .nav-logo img { height: 48px; }
.drawer-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
}
.drawer-close:hover { background: var(--bg-alt); }
.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 0.25rem;
}
.drawer-nav .nav-link {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  border-radius: 0;
}
.drawer-nav .nav-link.current {
  background: var(--bg-alt);
}
.drawer-nav .nav-link.current::after { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger, .nav-mobile-spacer { display: flex; }
  .nav-hamburger {
    background: transparent;
    border: none;
    width: 40px; height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    margin-right: auto;
  }
  [dir="rtl"] .nav-hamburger { margin-right: 0; margin-left: auto; }
  .nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: var(--bg);
}
.hero-inset {
  position: relative;
  width: 100%;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 33, 75, 0.75) 0%, rgba(32, 71, 136, 0.55) 100%);
  z-index: 1;
}
[dir="rtl"] .hero-overlay {
  background: linear-gradient(225deg, rgba(7, 33, 75, 0.75) 0%, rgba(32, 71, 136, 0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 56rem;
  margin: 0 auto;
  padding: 7rem var(--section-pad-x) 9rem;
  text-align: center;
  color: #fff;
}
.hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.hero-subheadline {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  max-width: 44rem;
  margin: 0 auto 2.25rem;
}
.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.hero-ctas .btn-primary { background: #fff; color: var(--primary); }
.hero-ctas .btn-primary:hover { background: var(--bg-alt); }

.wave-divider, .wave-divider-flat {
  position: relative;
  width: 100%;
  line-height: 0;
  margin-top: -1px;
}
.wave-divider { height: clamp(40px, 5vw, 80px); }
.wave-divider-flat { height: clamp(35px, 4.3vw, 70px); }
.wave-divider svg, .wave-divider-flat svg {
  width: 100%; height: 100%;
  display: block;
}
.wave-flip svg { transform: scaleY(-1); }

/* ===== Section Headlines ===== */
.section-headline {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: var(--text);
  text-align: center;
}

/* ===== About ===== */
.about {
  padding: 4rem 0 0;
  background: var(--bg-alt);
}
.about .container {
  padding-top: 2rem;
  padding-bottom: calc(clamp(40px, 5vw, 80px) + 2rem);
}
.about .section-headline { margin-bottom: 2rem; }
.about-body {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

/* ===== Services ===== */
.services {
  padding: calc(clamp(40px, 5vw, 80px) * 0.86) 0 0;
  background: var(--bg);
}
.services .container {
  padding-top: 1rem;
  padding-bottom: calc(clamp(35px, 4.3vw, 70px) + 2rem);
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.services-headline-col .section-headline {
  text-align: left;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0;
}
[dir="rtl"] .services-headline-col .section-headline { text-align: right; }
.services-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
}
.service-item { display: flex; flex-direction: column; gap: 0.625rem; }
.service-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.service-desc {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9375rem;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .services-headline-col .section-headline { text-align: center; }
  [dir="rtl"] .services-headline-col .section-headline { text-align: center; }
  .services-items { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===== FAQ ===== */
.faq {
  padding: calc(clamp(40px, 5vw, 80px) * 0.98) 0 0;
  background: var(--bg-alt);
}
.faq .container {
  padding-top: 2rem;
  padding-bottom: calc(clamp(40px, 5vw, 80px) + 2rem);
}
.faq-header { text-align: center; margin-bottom: 3rem; }
.faq-header .section-headline { margin-bottom: 0.5rem; }
.faq-subheadline {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-top: 0.5rem;
}
.faq-items {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.faq-item:hover { border-color: var(--border); box-shadow: var(--shadow-card); }
.faq-item[open] { box-shadow: var(--shadow-elevated); }
.faq-question {
  list-style: none;
  cursor: pointer;
  padding: 1.125rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-question::after { content: "−"; }
.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* ===== Jobs ===== */
.jobs {
  padding: calc(clamp(40px, 5vw, 80px) * 0.86) 0 0;
  background: var(--bg);
}
.jobs .container {
  padding-top: 1rem;
  padding-bottom: calc(clamp(35px, 4.3vw, 70px) + 2rem);
}
.jobs-header { text-align: center; margin-bottom: 2rem; }
.jobs-header .section-headline { margin-bottom: 0.5rem; }
.jobs-subheadline {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-top: 0.5rem;
}
.jobs-cta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ===== Contact ===== */
.contact {
  padding: calc(clamp(40px, 5vw, 80px) * 0.86) 0 calc(clamp(35px, 4.3vw, 70px) + 2rem);
  background: var(--bg);
}
.contact-header { text-align: center; margin-bottom: 2.5rem; }
.contact-header .section-headline { margin-bottom: 0.5rem; }
.contact-subheadline {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-top: 0.5rem;
}
.contact-info {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.contact-item { display: flex; gap: 0.5rem; align-items: center; }
.contact-label { font-weight: 600; color: var(--text); }
.contact-item a { color: var(--primary); font-weight: 500; }

.contact-form {
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.375rem; }
.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.required { color: #c0392b; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--pill-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.form-field textarea { border-radius: 1.25rem; resize: vertical; min-height: 7.5rem; }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 71, 136, 0.12);
}
.form-field input.invalid,
.form-field textarea.invalid {
  border-color: #c0392b;
}
.form-error {
  color: #c0392b;
  font-size: 0.8125rem;
  min-height: 0;
}
.form-error:not(:empty) { padding-top: 0.125rem; }
.form-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  display: none;
}
.form-status.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-status.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-alt);
  padding: 3rem var(--section-pad-x) 2rem;
  color: var(--text);
}
.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer-company {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}
.footer-nav a {
  color: var(--text);
  font-size: 0.9375rem;
  transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--primary); text-decoration: none; }
.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.footer-socials a {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.footer-socials a:hover {
  background: var(--primary);
  color: var(--on-primary);
  transform: translateY(-2px);
}
.footer-socials svg { width: 20px; height: 20px; }
.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
  z-index: 50;
}
[dir="rtl"] .back-to-top { right: auto; left: 2rem; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-hover); }

/* ===== Scroll reveal ===== */
.reveal[data-reveal="up"],
.reveal[data-reveal="fade"],
.reveal[data-reveal="scale"] {
  /* visible by default */
}
.reveal-init {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-init[data-reveal="up"] { transform: translateY(24px); }
.reveal-init[data-reveal="fade"] { transform: translateY(8px); }
.reveal-init[data-reveal="scale"] { transform: scale(0.96); }
.reveal-init.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================================================
   ARABIC / RTL
   ========================================================= */
html[lang="ar"], html[dir="rtl"] {
  --font-heading: "Cairo", "Golos Text", system-ui, sans-serif;
  --font-body: "Cairo", "Kumbh Sans", system-ui, sans-serif;
}

html[lang="ar"] body,
html[dir="rtl"] body {
  /* Cairo looks best with slightly heavier weight in headings */
  font-weight: 400;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-weight: 700;
}
html[lang="ar"] .hero-headline,
html[dir="rtl"] .hero-headline {
  font-weight: 700;
  letter-spacing: 0;
}

/* Arabic-style numerals: keep Latin digits for forms/contact info (email, phone, year),
   but display Arabic-Indic numerals where appropriate (e.g. copyright year is fine in Latin) */
html[lang="ar"] .hero-headline,
html[lang="ar"] .section-headline,
html[lang="ar"] .service-title,
html[lang="ar"] .faq-question,
html[lang="ar"] .nav-link,
html[lang="ar"] .footer-company,
html[lang="ar"] .footer-nav a {
  font-feature-settings: "kern" 1;
}

/* Tighter line-height for Arabic headlines */
html[lang="ar"] .hero-headline { line-height: 1.25; }
html[lang="ar"] .section-headline { line-height: 1.3; }
html[lang="ar"] .service-title { line-height: 1.4; }

/* Underline accent for current nav link in RTL: keep symmetric */
html[dir="rtl"] .nav-link.current::after {
  left: 0.25rem;
  right: 0.25rem;
}

/* Lang toggle in RTL: place where it makes sense (left of nav-links in LTR becomes right of nav in RTL) */
html[dir="rtl"] .lang-toggle {
  margin-inline-start: 0;
  margin-inline-end: 0.5rem;
}

/* FAQ open marker keeps same side in RTL (the ::after stays flex-end which is correct) */

/* Mobile drawer RTL handled above */

/* Make sure the language toggle wraps nicely on smaller screens */
@media (max-width: 1100px) {
  .lang-toggle { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }
}
@media (max-width: 900px) {
  .lang-toggle { margin-inline-start: 0; margin-inline-end: auto; }
  html[dir="rtl"] .lang-toggle { margin-inline-end: 0; margin-inline-start: auto; }
}