/* Recruitment offices directory: the styles of the [recruit_directory] shortcode. RTL first, phone first. */
:root {
  /* Palette: change these lines only. */
  --rd-ink: #1c2b3a;          /* text */
  --rd-muted: #5a6878;        /* secondary text */
  --rd-primary: #1f5f99;      /* headings, selected chip, call button */
  --rd-primary-soft: #e5f0fa; /* office initial background */
  --rd-msg: #1f6fb2;          /* message button (white text on it) */
  --rd-accent: #8cbbe6;       /* band accent, keyboard focus */
  --rd-band-dark: #1f5f99;    /* band second colour */
  --rd-surface: #e8f2fb;      /* band base, city tag */
  --rd-tint: #f2f8fd;         /* hero background */
  --rd-line: #dbe6f0;
  --rd-bg: #ffffff;
  --rd-radius: 20px;          /* cards */
  --rd-pill: 999px;           /* buttons, chips, city tag */
  --rd-font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

.rd { font-family: var(--rd-font); color: var(--rd-ink); background: var(--rd-bg); line-height: 1.6; }
.rd *, .rd *::before, .rd *::after { box-sizing: border-box; }
:where(.rd) a { color: inherit; }
.rd-hero h1, .rd-hero p, .rd-bio { text-wrap: pretty; }
/* Same content edge as the Blocksy header and footer (its edge variable: 90vw on desktop, 88vw on phones) */
.rd-wrap {
  --rd-edge: calc((100vw - var(--theme-container-edge-spacing, 90vw)) / 2);
  max-width: calc(var(--theme-normal-container-max-width, 1290px) + 2 * var(--rd-edge)); margin: 0 auto; padding: 0 var(--rd-edge);
}

/* Header */
.rd-head { border-bottom: 1px solid var(--rd-line); }
.rd-head .rd-wrap { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.rd-mark { width: 30px; height: 30px; flex: none; }
.rd-brand { font-size: 1.15rem; font-weight: 700; text-decoration: none; }

/* Hero */
.rd-hero { padding: 28px 0 18px; background: var(--rd-tint); }
.rd-hero h1 { margin: 0 0 6px; font-size: clamp(1.55rem, 5.2vw, 2.4rem); line-height: 1.6; font-weight: 700; color: var(--rd-primary); }
.rd-hero p { margin: 0; color: var(--rd-muted); font-size: 1rem; max-width: 34em; }

/* City filter: plain links, works without JavaScript */
.rd-cities { display: flex; gap: 8px; margin: 18px calc(-1 * var(--rd-edge)) 0; padding: 2px var(--rd-edge) 6px; overflow-x: auto; scrollbar-width: none; list-style: none; }
@media (min-width: 1152px) { .rd-cities { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.rd-cities::-webkit-scrollbar { display: none; }
.rd-cities a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--rd-pill);
  border: 1px solid var(--rd-line); background: #fff; white-space: nowrap; text-decoration: none; font-size: .95rem;
}
.rd-cities a[aria-current="page"] { background: var(--rd-primary); border-color: var(--rd-primary); color: #fff; font-weight: 700; }
.rd-cities a:focus-visible, .rd-btn:focus-visible { outline: 3px solid var(--rd-accent); outline-offset: 2px; }

/* The Sadu weave band: the one decorative element */
.rd-sadu {
  height: 14px; margin: 6px 0 0;
  background:
    linear-gradient(135deg, var(--rd-accent) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(225deg, var(--rd-accent) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(315deg, var(--rd-band-dark) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(45deg, var(--rd-band-dark) 25%, transparent 25%) 0 0 / 14px 14px,
    var(--rd-surface);
}

/* List */
.rd-list { padding: 18px 0 40px; }
.rd-count { margin: 0 0 12px; color: var(--rd-muted); font-size: .95rem; }
.rd-grid { display: grid; grid-template-columns: 1fr; gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 720px) { .rd-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1040px) { .rd-grid { grid-template-columns: repeat(3, 1fr); } }

/* Office card */
.rd-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--rd-line); border-radius: var(--rd-radius); background: #fff; }
.rd-card-top { display: flex; align-items: flex-start; gap: 12px; }
.rd-initial {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: var(--rd-primary-soft); color: var(--rd-primary); font-weight: 700; font-size: 1.15rem;
}
.rd-initial img { width: 100%; height: 100%; object-fit: cover; }
.rd-name { margin: 0; font-size: 1.08rem; line-height: 1.45; font-weight: 700; }
.rd-city { display: inline-block; margin-top: 4px; padding: 1px 12px; border-radius: var(--rd-pill); background: var(--rd-surface); font-size: .85rem; color: var(--rd-ink); }
.rd-bio { margin: 0; color: var(--rd-muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 4px; }
.rd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 12px;
  border-radius: var(--rd-pill); font-weight: 700; font-size: .98rem; text-decoration: none; border: 1px solid transparent;
}
.rd-btn svg { width: 20px; height: 20px; flex: none; }
.rd-btn-msg { background: var(--rd-msg); color: #fff; }
.rd-btn-call { background: #fff; color: var(--rd-primary); border-color: var(--rd-primary); }
.rd-empty { padding: 28px 16px; border: 1px dashed var(--rd-line); border-radius: var(--rd-radius); text-align: center; color: var(--rd-muted); }

/* Footer */
.rd-foot { border-top: 1px solid var(--rd-line); padding: 20px 0 28px; color: var(--rd-muted); font-size: .9rem; }
.rd-foot strong { color: var(--rd-ink); }

@media (prefers-reduced-motion: no-preference) { .rd-btn { transition: filter .15s; } .rd-btn:hover { filter: brightness(.94); } }

/* Theme guard: theme content-link rules (Blocksy: .entry-content a) must not recolour the directory. */
.rd .rd-cities a { color: var(--rd-ink); text-decoration: none; }
.rd .rd-cities a[aria-current="page"] { color: #fff; }
.rd .rd-btn { text-decoration: none; }
.rd .rd-btn-msg, .rd .rd-btn-msg:hover { color: #fff; }
.rd .rd-btn-call, .rd .rd-btn-call:hover { color: var(--rd-primary); }
.rd h1, .rd h2 { font-family: var(--rd-font); letter-spacing: normal; }
.rd.alignfull { margin-block: 0; }

/* The theme (Blocksy) uses the same self-hosted font on every page. */
:root { --theme-font-stack-default: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
