/* Agency website (docs/agency-website/PLAN.md). One stylesheet for both directions:
   logical properties only (margin-inline, inset-inline, text-align: start). */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/Inter-400-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/Inter-400-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Tajawal'; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 115%;
  src: url('/assets/fonts/Tajawal-400-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Tajawal'; font-style: normal; font-weight: 500; font-display: swap; size-adjust: 115%;
  src: url('/assets/fonts/Tajawal-500-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Tajawal'; font-style: normal; font-weight: 700; font-display: swap; size-adjust: 115%;
  src: url('/assets/fonts/Tajawal-700-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --brand: #4A5BC2;
  --brand-light: #667EEA;
  --brand-soft: rgba(74, 91, 194, 0.08);
  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #2D3142;
  --muted: #6B7280;
  --border: rgba(26, 26, 26, 0.08);
  --whatsapp: #1FA855;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(26, 26, 26, 0.05), 0 1px 4px rgba(26, 26, 26, 0.02);
  --shadow-lift: 0 18px 40px rgba(74, 91, 194, 0.16), 0 4px 12px rgba(74, 91, 194, 0.08);
  --gutter: clamp(1rem, 3vw, 2rem);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[lang="ar"] { --font: 'Tajawal', 'Inter', 'Segoe UI', Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; }
html[lang="ar"] body { line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px;
  padding: .6rem 1.2rem; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; box-shadow: var(--shadow-lift); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-outline { background: var(--surface); color: var(--brand); border-color: rgba(74, 91, 194, .35); }
.btn-link { background: none; color: var(--muted); min-height: 0; padding-inline: .5rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px); border-block-end: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--text); text-decoration: none; font-weight: 700; min-width: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.brand-initial { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-switch { font-weight: 600; text-decoration: none; padding: .4rem .9rem; border-radius: 999px; background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.header-app { font-weight: 600; text-decoration: none; padding: .4rem .9rem; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); white-space: nowrap; }
.header-app .label-short { display: none; }

/* Hero */
.hero { background: var(--surface); border-block-end: 1px solid var(--border); padding-block: clamp(1.5rem, 5vw, 3rem); }
.hero-inner { display: grid; gap: 1.5rem; }
.hero-identity { display: flex; gap: 1.25rem; align-items: center; }
.hero-logo { width: 96px; height: 96px; flex: none; border-radius: 22px; object-fit: contain; background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-initial { display: grid; place-items: center; font-size: 2.5rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); }
.hero-name { font-size: clamp(1.5rem, 4vw, 2.25rem); }
.hero-alt { margin: .15rem 0 0; color: var(--muted); }
.hero-place { margin: .35rem 0 0; color: var(--text-2); font-weight: 500; }
.hero-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.stat { background: var(--brand-soft); border-radius: var(--radius-sm); padding: .6rem 1rem; min-width: 150px; }
.stat dt { font-size: .85rem; color: var(--muted); }
.stat dd { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--brand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Workers */
.workers { padding-block: clamp(1.5rem, 5vw, 3rem); }
.workers-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin-block-end: 1rem; }
.workers-head h2 { font-size: 1.5rem; }
.workers-count { margin: 0; color: var(--muted); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; align-items: end;
  background: var(--surface); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-block-end: 1.5rem; }
.filter { display: grid; gap: .3rem; font-size: .9rem; color: var(--text-2); font-weight: 500; }
.filter select { font: inherit; min-height: 44px; padding-inline: .75rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(26, 26, 26, .14); background: var(--surface); color: var(--text); }
.filter-actions { display: flex; gap: .5rem; align-items: center; }
.js .filter-apply { display: none; }
.empty { background: var(--surface); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-media { position: relative; aspect-ratio: 4 / 5; background: #E6EAF2; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .badge { position: absolute; inset-block-start: .75rem; inset-inline-start: .75rem; }
.card-media .badge-video { inset-inline-start: auto; inset-inline-end: .75rem; background: rgba(26, 26, 26, .72); color: #fff; }
.card-body { display: grid; gap: .35rem; padding: 1rem; flex: 1; }
.card-name { font-size: 1.1rem; }
.card-meta { margin: 0; color: var(--muted); font-size: .92rem; }
.card-salary { margin: 0; display: flex; justify-content: space-between; gap: .5rem; font-size: .92rem; color: var(--text-2); }
.card-salary strong { color: var(--text); }
.card-cta { margin-block-start: .25rem; font-weight: 600; color: var(--brand); }

/* Phones: two cards per row so a visitor sees several workers at once. */
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .card-body { padding: .7rem; gap: .25rem; }
  .card-name { font-size: .98rem; }
  .card-meta { font-size: .8rem; }
  .card-salary { flex-direction: column; gap: 0; font-size: .82rem; }
  .card-media .badge { inset-block-start: .5rem; inset-inline-start: .5rem; font-size: .7rem; padding: .2rem .55rem; }
  .card-media .badge-video { inset-inline-start: auto; inset-inline-end: .5rem; }
  .card-cta { font-size: .88rem; }
}

.badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status-in-office { background: #DCFCE7; color: #166534; }
.status-on-request { background: #FEF3C7; color: #92400E; }
.status-for-transfer { background: #DBEAFE; color: #1E40AF; }
.status-other { background: #E5E7EB; color: #374151; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-block-start: 2rem; color: var(--muted); }

/* Worker page */
.worker-page { padding-block: 1.5rem 3rem; }
.back { display: inline-block; margin-block-end: 1rem; font-weight: 600; text-decoration: none; }
.back::before { content: '← '; }
html[dir="rtl"] .back::before { content: '→ '; }
.worker-layout { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .worker-layout { grid-template-columns: minmax(280px, 420px) 1fr; align-items: start; }
  .worker-media { position: sticky; top: 88px; } }
.worker-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); background: #E6EAF2; }
.video { margin-block-start: 1.25rem; }
.video-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; background: #1A1A1A; color: #fff; font: inherit; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--brand); font-size: 1.6rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.video-label { position: absolute; inset-inline: 0; inset-block-end: .75rem; text-align: center; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
.worker-info { display: grid; gap: 1rem; align-content: start; }
.worker-info > .badge { justify-self: start; }
.worker-name { font-size: clamp(1.6rem, 4vw, 2.25rem); }
.worker-sub { margin: 0; font-size: 1.1rem; color: var(--text-2); }
.worker-ref { margin: 0; color: var(--muted); font-size: .9rem; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.section-title { font-size: 1.05rem; margin-block-end: .75rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: .75rem 1.25rem; margin: 0; }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.offer { background: linear-gradient(135deg, rgba(74, 91, 194, .07), rgba(102, 126, 234, .03)); }
.contact-panel p { margin: 0 0 .75rem; color: var(--text-2); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { padding: .35rem .85rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .9rem; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.jobs li { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding-block-end: .5rem; border-block-end: 1px solid var(--border); }
.jobs li:last-child { border-block-end: 0; padding-block-end: 0; }
.jobs span { color: var(--muted); }

/* Footer */
.site-footer { background: #1F2550; color: #E6EAF2; padding-block: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: end; }
.footer-name { margin: 0; font-weight: 700; font-size: 1.1rem; color: #fff; }
.footer-place { margin: .25rem 0 .75rem; color: #B8C0E0; }
.footer-contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-contacts a { color: #fff; text-decoration: none; }
.footer-contacts span { color: #B8C0E0; }
.powered { margin: 0; color: #B8C0E0; }
.powered a { color: #fff; font-weight: 700; }

/* 404 */
.not-found-page { min-height: 100vh; display: grid; place-items: center; }
.not-found { max-width: 560px; text-align: center; padding-block: 4rem; }
.not-found h1 { font-size: 2rem; margin-block-end: .75rem; }
.not-found p { color: var(--text-2); }
.nf-agency { font-weight: 700; color: var(--brand); }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-block-start: 1.5rem; }

/* App promotion (PLAN.md §6): never blocks content, no pop-ups */
.app-promo { background: linear-gradient(135deg, rgba(74, 91, 194, .10), rgba(102, 126, 234, .04)); border-block-start: 1px solid var(--border);
  padding-block: clamp(2rem, 5vw, 3rem); }
.app-promo-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.app-promo-text { flex: 1 1 320px; max-width: 560px; }
.app-icon { width: 56px; height: auto; margin-block-end: .75rem; }
.app-promo h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.app-promo p { margin: .5rem 0 1.25rem; color: var(--text-2); }
.store-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.store-btn { display: inline-flex; align-items: center; gap: .65rem; min-height: 52px; padding: .45rem 1.1rem; border-radius: 12px;
  min-width: 172px; background: #1F2550; color: #fff; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.store-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn span { display: grid; line-height: 1.15; text-align: start; }
.store-btn small { font-size: .72rem; color: #C9CFEA; }
.store-btn strong { font-size: 1.05rem; }
.qr-card { margin: 0; background: #fff; border-radius: var(--radius); padding: 1rem 1rem .75rem; box-shadow: var(--shadow); text-align: center; }
.qr-card img { width: 176px; height: 176px; }
.qr-card figcaption { margin-block-start: .5rem; font-size: .85rem; color: var(--muted); }
.app-card { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  background: linear-gradient(135deg, rgba(74, 91, 194, .08), rgba(102, 126, 234, .03)); }
.app-card p { margin: 0 0 .9rem; color: var(--text-2); }
.app-card-qr { width: 120px; height: 120px; flex: none; background: #fff; border-radius: var(--radius-sm); padding: .35rem; }

/* Phones can't scan their own screen: buttons only. */
@media (max-width: 760px) {
  .qr-card, .app-card-qr { display: none; }
}
@media (max-width: 480px) {
  .header-app .label-long { display: none; }
  .header-app .label-short { display: inline; }
}
@media (max-width: 420px) {
  .header-app, .lang-switch { padding: .35rem .7rem; font-size: .88rem; }
  .brand-logo, .brand-initial { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
