/* ============================================================
   ELEUTHERIA INTERNATIONAL PLACEMENT SERVICES
   Shared identity system — navy & gold, classical / institutional
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Navy scale */
  --navy-900: #081325;
  --navy-850: #0a1729;
  --navy-800: #0e1f3a;
  --navy-700: #15294a;
  --navy-600: #1e375e;
  --navy-500: #2c4a78;

  /* Gold scale */
  --gold-700: #8c6a23;
  --gold-600: #a8842f;
  --gold-500: #c2992f;
  --gold-400: #d4ad4e;
  --gold-300: #e3c878;
  --gold-100: #f1e3bd;

  /* Warm neutrals / paper */
  --paper: #fbf8f1;
  --cream: #f3ecdd;
  --cream-deep: #e9dec7;
  --ink: #1c2230;
  --ink-soft: #43495a;
  --ink-mute: #6b7184;

  /* On-navy text */
  --on-navy: #ece6d6;
  --on-navy-soft: #b7bdcb;
  --on-navy-mute: #818aa0;

  --line-gold: rgba(196, 153, 47, 0.38);
  --line-dark: rgba(20, 31, 58, 0.12);
  --line-light: rgba(255, 255, 255, 0.10);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Archivo", -apple-system, system-ui, sans-serif;

  --shadow-card: 0 1px 2px rgba(8, 19, 37, 0.06), 0 18px 44px -22px rgba(8, 19, 37, 0.30);
  --shadow-float: 0 30px 80px -40px rgba(8, 19, 37, 0.55);

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.08; }
p { margin: 0; }
::selection { background: var(--gold-300); color: var(--navy-900); }

/* ---------- Type helpers ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-500);
  display: inline-block;
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-500);
  display: inline-block;
}
.on-navy .eyebrow { color: var(--gold-300); }

.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 400;
}
.on-navy .lede { color: var(--on-navy-soft); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(64px, 9vw, 124px); }
.on-navy { background: var(--navy-800); color: var(--on-navy); }
.on-cream { background: var(--cream); }
.on-paper { background: var(--paper); }

.section-head { max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-top: 22px;
}
.section-title em { font-style: italic; color: var(--gold-600); }
.on-navy .section-title em { color: var(--gold-300); }
.section-sub { margin-top: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid transparent;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn .ar { transition: transform 0.28s ease; }
.btn:hover .ar { transform: translateX(4px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  color: var(--navy-900);
  box-shadow: 0 10px 26px -12px rgba(168, 132, 47, 0.7);
}
.btn-gold:hover { filter: brightness(1.06); box-shadow: 0 14px 32px -12px rgba(168, 132, 47, 0.85); }
.btn-outline {
  background: transparent;
  border-color: var(--gold-500);
  color: var(--gold-600);
}
.btn-outline:hover { background: var(--gold-500); color: var(--navy-900); }
.on-navy .btn-outline { border-color: rgba(212, 173, 78, 0.55); color: var(--gold-300); }
.on-navy .btn-outline:hover { background: var(--gold-400); color: var(--navy-900); border-color: var(--gold-400); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--navy-800); }

/* ---------- Top contact bar ---------- */
.topbar {
  background: var(--navy-900);
  color: var(--on-navy-soft);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line-light);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 20px;
}
.topbar a { color: var(--on-navy-soft); transition: color 0.2s; }
.topbar a:hover { color: var(--gold-300); }
.topbar .tb-left { display: flex; gap: 26px; align-items: center; }
.topbar .tb-item { display: inline-flex; gap: 8px; align-items: center; }
.topbar .tb-item svg { width: 14px; height: 14px; stroke: var(--gold-400); }
.topbar .tb-right { display: inline-flex; gap: 8px; align-items: center; color: var(--gold-300); font-weight: 600; }
@media (max-width: 880px) { .topbar .tb-left .tb-item.hide-sm { display: none; } }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 31, 58, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-light);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 54px; width: auto; }
.brand .bd-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand .bd-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-300);
  letter-spacing: 0.02em;
}
.brand .bd-sub {
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--on-navy-soft);
  font-weight: 500;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--on-navy);
  padding: 10px 16px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 1px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav-links a:hover { color: var(--gold-300); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--gold-300); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gold-300); margin: 5px 0; transition: transform 0.25s ease, opacity 0.25s ease; transform-origin: center; }

/* Hamburger to 'X' animations */
.nav.open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav.open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 940px) {
  .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 78px; left: 0; right: 0;
    background: var(--navy-850);
    padding: 14px var(--gut) 26px;
    gap: 2px;
    border-bottom: 1px solid var(--line-gold);
    
    /* Animation on opening and closing */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links a { padding: 14px 4px; }
}

/* ---------- Hairline divider ---------- */
.rule-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  border: 0;
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--on-navy-soft); }
.footer-top { padding-block: clamp(56px, 8vw, 88px); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 48px;
}
.footer-brand .brand .bd-name { font-size: 24px; }
.footer-about { margin-top: 22px; max-width: 320px; font-size: 14.5px; line-height: 1.75; color: var(--on-navy-mute); }
.footer-col h4 {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 22px;
  font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.footer-col a, .footer-col li { font-size: 14.5px; color: var(--on-navy-soft); transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-300); }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.55; }
.footer-contact svg { width: 16px; height: 16px; stroke: var(--gold-400); flex-shrink: 0; margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid var(--line-light);
  padding-block: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--on-navy-mute);
  flex-wrap: wrap;
}
.footer-bottom .lic { color: var(--on-navy-soft); }
.footer-bottom .lic b { color: var(--gold-300); font-weight: 600; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2,0.7,0.2,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Badge / chip ---------- */
.seal-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-gold);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-600);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================================
   RTL / ARABIC TYPOGRAPHY & LAYOUT OVERHAUL
   Cairo renders taller and wider than Cormorant Garamond.
   Arabic glyphs connect — never compress letter-spacing.
   ============================================================ */
[dir="rtl"] {
  --font-sans: 'Cairo', sans-serif !important;
  --font-display: 'Cairo', sans-serif !important;
  text-align: right;
  direction: rtl;
}

/* --- Global type adjustments --- */
[dir="rtl"] body {
  line-height: 1.85;
  word-spacing: 0.02em;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
}

/* --- Headings that sit on image backgrounds --- */
[dir="rtl"] .hero h1,
[dir="rtl"] .hero-monument h1,
[dir="rtl"] .hero-bleed h1,
[dir="rtl"] .page-hero h1 {
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  font-weight: 700 !important;
  text-shadow:
    0 2px 8px rgba(8, 19, 37, 0.9),
    0 4px 24px rgba(8, 19, 37, 0.7),
    0 0 60px rgba(8, 19, 37, 0.5);
}

/* Stronger scrim for hero-monument & hero-bleed so Arabic text is always legible */
[dir="rtl"] .hero-monument .mono-bg { opacity: 0.05; }
[dir="rtl"] .hero-bleed .bleed-scrim {
  background:
    linear-gradient(270deg, rgba(8,19,37,0.96) 0%, rgba(8,19,37,0.9) 45%, rgba(8,19,37,0.55) 100%),
    linear-gradient(0deg, rgba(8,19,37,0.92), transparent 55%);
}

/* --- Section titles --- */
[dir="rtl"] .section-title {
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 600 !important;
  padding-top: 0.1em;
}

/* Prevent Arabic glyph clipping — Arabic ascenders sit taller */
[dir="rtl"] .hero,
[dir="rtl"] .page-hero,
[dir="rtl"] .cta-band {
  overflow: visible;
}

[dir="rtl"] .section-head {
  overflow: visible;
}

/* --- Eyebrows & uppercase labels --- */
/* Arabic has no uppercase; reduce letter-spacing which breaks Arabic kerning */
[dir="rtl"] .eyebrow,
[dir="rtl"] .wkr-card .wc-role,
[dir="rtl"] .cat-body .cat-link,
[dir="rtl"] .deploy-card .dc-flag,
[dir="rtl"] .footer-col h4,
[dir="rtl"] .status,
[dir="rtl"] .admin-badge,
[dir="rtl"] .admin-stat .stat-label,
[dir="rtl"] .admin-field label,
[dir="rtl"] .result-line,
[dir="rtl"] .field label,
[dir="rtl"] .wcard .wc-id,
[dir="rtl"] .wcard .cat-tag {
  letter-spacing: 0.04em !important;
  word-spacing: 0.05em;
}

/* --- Body / paragraph text --- */
[dir="rtl"] .lede {
  line-height: 1.9;
  font-size: clamp(17px, 2vw, 20px);
}

[dir="rtl"] p {
  line-height: 1.8;
}

[dir="rtl"] .pillar p,
[dir="rtl"] .value p,
[dir="rtl"] .tl p,
[dir="rtl"] .step p,
[dir="rtl"] .feat-list .fl p,
[dir="rtl"] .leader .lead-bio,
[dir="rtl"] .cat-body .roles,
[dir="rtl"] .footer-about {
  line-height: 1.85;
  font-size: 15px;
}

/* --- Hero split layout --- */
[dir="rtl"] .hero-split h1 {
  font-size: clamp(34px, 5vw, 62px);
}

[dir="rtl"] .hero-split .lede {
  max-width: none;
}

[dir="rtl"] .hero-trust-strip .ht b {
  font-size: 28px;
  line-height: 1.2;
}

[dir="rtl"] .hero-trust-strip .ht span {
  letter-spacing: 0.04em;
}

/* --- Hero monument layout --- */
[dir="rtl"] .hero-monument h1 {
  font-size: clamp(34px, 6vw, 74px);
  line-height: 1.35 !important;
}

[dir="rtl"] .hero-monument .mono-pillars span {
  letter-spacing: 0.06em;
}

/* --- Hero bleed layout --- */
[dir="rtl"] .hero-bleed h1 {
  font-size: clamp(32px, 5.5vw, 68px);
  line-height: 1.35 !important;
}

[dir="rtl"] .hero-bleed .bleed-inner {
  margin-right: 0;
  margin-left: auto;
}

/* --- Pillar headings --- */
[dir="rtl"] .pillar h3,
[dir="rtl"] .cat-body h3 {
  font-size: 21px;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}

[dir="rtl"] .pillar .p-num {
  right: auto;
  left: 30px;
}

/* --- Feature list (why direct) --- */
[dir="rtl"] .feat-list .fl h4 {
  font-size: 19px;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}

[dir="rtl"] .feat-list .fl .fl-ico {
  margin-top: 5px;
}

/* --- Process steps --- */
[dir="rtl"] .step h4 {
  font-size: 19px;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}

[dir="rtl"] .step .step-no {
  font-size: 20px;
}

[dir="rtl"] .step p {
  padding-right: 0;
  padding-left: 8px;
}

/* --- Stats --- */
[dir="rtl"] .stat b {
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.2;
}

[dir="rtl"] .stat span {
  letter-spacing: 0.04em;
}

/* --- CTA band --- */
[dir="rtl"] .cta-inner h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.35 !important;
}

[dir="rtl"] .cta-band::before {
  background: radial-gradient(70% 120% at 0% 0%, rgba(212,173,78,0.18), transparent 60%);
}

/* --- Deploy cards --- */
[dir="rtl"] .deploy-card .dc-name {
  line-height: 1.3;
}

[dir="rtl"] .deploy-card .dc-year {
  right: auto;
  left: 16px;
}

[dir="rtl"] .deploy-card .dc-flag {
  left: auto;
  right: 14px;
}

[dir="rtl"] .deploy-card .dc-dest .deployed::before {
  /* keep the green dot */
}

/* --- Page hero (About, Workers, Contact) --- */
[dir="rtl"] .page-hero h1 {
  font-size: clamp(34px, 5.5vw, 60px);
}

[dir="rtl"] .page-hero::before {
  background: radial-gradient(90% 90% at 10% -20%, rgba(212,173,78,0.14), transparent 55%);
}

/* --- About page --- */
[dir="rtl"] .mission-text .meaning {
  border-left: none;
  border-right: 2px solid var(--gold-500);
}

[dir="rtl"] .mission-media .badge-float {
  right: auto;
  left: -22px;
  border-left: none;
  border-right: 2px solid var(--gold-500);
}

[dir="rtl"] .value h3 {
  font-size: 24px;
  line-height: 1.4 !important;
}

[dir="rtl"] .tl .yr {
  font-size: 28px;
  line-height: 1.3;
}

[dir="rtl"] .leader .lead-body h3 {
  font-size: 24px;
  line-height: 1.3 !important;
}

[dir="rtl"] .leader .lead-role {
  letter-spacing: 0.04em;
}

/* --- Workers page --- */
[dir="rtl"] .wcard h3 {
  font-size: 22px;
  line-height: 1.35 !important;
}

[dir="rtl"] .search svg {
  left: auto;
  right: 16px;
}

[dir="rtl"] .search input {
  padding: 14px 46px 14px 16px;
}

[dir="rtl"] .modal-head h2 {
  font-size: 34px;
  line-height: 1.25 !important;
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 18px;
}

[dir="rtl"] .empty b {
  font-size: 26px;
  line-height: 1.3;
}

/* --- Contact page --- */
[dir="rtl"] .director .dir-name {
  font-size: 28px;
  line-height: 1.3;
}

[dir="rtl"] .form-card h2 {
  line-height: 1.3 !important;
}

[dir="rtl"] .hours {
  border-left: none;
  border-right: 2px solid var(--gold-500);
}

[dir="rtl"] .map-wrap .map-info h3 {
  line-height: 1.3 !important;
}

/* --- Buttons --- */
[dir="rtl"] .btn {
  letter-spacing: 0.06em;
}

[dir="rtl"] .btn .ar {
  transform: scaleX(-1);
}

[dir="rtl"] .btn:hover .ar {
  transform: scaleX(-1) translateX(4px);
}

[dir="rtl"] .btn svg {
  transform: scaleX(-1);
}

/* --- Navbar --- */
[dir="rtl"] .topbar-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links a::after {
  transform-origin: right;
}

[dir="rtl"] .brand .bd-name {
  font-size: 20px;
  line-height: 1.3;
}

/* --- Footer --- */
[dir="rtl"] .footer-grid {
  text-align: right;
}

[dir="rtl"] .footer-col ul li a {
  justify-content: flex-start;
}

[dir="rtl"] .footer-contact svg {
  margin-top: 5px;
}

[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

/* --- Eyebrow decorative lines (mirror) --- */
[dir="rtl"] .eyebrow::before {
  order: 1;
}

[dir="rtl"] .eyebrow.center::after {
  order: -1;
}

/* --- Worker card on hero --- */
[dir="rtl"] .wkr-card .wc-name::after {
  display: none;
}

[dir="rtl"] .wkr-card .wc-info {
  text-align: right;
}

/* --- Category card overlay label --- */
[dir="rtl"] .cat-card .cat-count {
  left: auto;
  right: 14px;
}

/* --- Admin dashboard --- */
[dir="rtl"] .admin-card-body.admin-form-grid {
  text-align: right;
}

[dir="rtl"] .admin-sidebar {
  border-right: none;
  border-left: 1px solid var(--line-light);
}

[dir="rtl"] .admin-nav a,
[dir="rtl"] .admin-nav button {
  text-align: right;
}

[dir="rtl"] .admin-table th {
  text-align: right;
  letter-spacing: 0.04em;
}

[dir="rtl"] .admin-table .td-actions {
  justify-content: flex-start;
}

[dir="rtl"] .admin-search svg {
  left: auto;
  right: 12px;
}

[dir="rtl"] .admin-search input {
  padding: 10px 38px 10px 14px;
}

[dir="rtl"] .admin-field select {
  background-position: left 14px center;
  padding-left: 36px;
  padding-right: 14px;
}

[dir="rtl"] .admin-filter select {
  background-position: left 12px center;
  padding-left: 36px;
  padding-right: 14px;
}

[dir="rtl"] .admin-toast {
  right: auto;
  left: 24px;
}

[dir="rtl"] .admin-exp-item .admin-exp-remove {
  right: auto;
  left: 8px;
}

[dir="rtl"] .admin-modal-actions {
  justify-content: flex-start;
}

/* --- Breadcrumbs --- */
[dir="rtl"] .crumbs {
  letter-spacing: 0.02em;
}

/* --- Seal badge --- */
.on-navy .seal-badge { color: var(--gold-300); background: rgba(212, 173, 78, 0.08); }
.seal-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }

