/* Hamdan Jobs - public styles. Logical properties keep one sheet for RTL (Arabic) and LTR (English). */
:root {
  --ink: #16241d;
  --muted: #56655d;
  --green: #0b6b4b;
  --green-deep: #07402e;
  --mint: #edf4f0;
  --line: #d6e2db;
  --gold: #d9a441;
  --gold-ink: #3b2a05;
  --white: #fff;
  --danger: #a12626;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --display: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --r: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.75; color: var(--ink); background: var(--white); }
html[lang="en"] body { font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; top: 8px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 780px; }
.sec { padding-block: 36px; }

/* buttons */
.btn { display: inline-block; background: var(--green); color: var(--white); border: 2px solid var(--green); border-radius: var(--r); padding: 9px 20px; font: 600 1rem var(--body); cursor: pointer; text-align: center; }
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); text-decoration: none; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: #c8922b; border-color: #c8922b; }
.btn-line { background: transparent; color: var(--green); }
.btn-line:hover { background: var(--mint); color: var(--green-deep); }
.btn-wa { background: #128c4b; border-color: #128c4b; }
.btn-big { padding: 13px 28px; font-size: 1.05rem; }

/* header */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.35rem var(--display); color: var(--green-deep); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.brand-mark { width: 26px; height: 26px; background: var(--green); position: relative; transform: rotate(45deg); border-radius: 3px; }
.brand-mark::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: rotate(45deg) scale(.55); border-radius: 2px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); padding: 8px 12px; border-radius: var(--r); font-weight: 500; }
.nav a:hover { background: var(--mint); text-decoration: none; }
.nav a[aria-current] { color: var(--green); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.nav .lang { border: 1px solid var(--line); margin-inline: 6px; font-size: .92rem; }
.nav .btn { color: var(--gold-ink); padding: 8px 18px; }
.nav .btn:hover { background: #c8922b; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; font: 600 1rem var(--body); color: var(--ink); cursor: pointer; }

/* hero: the one loud element. Eight-point star lattice over deep green */
.hero { background-color: var(--green-deep); color: var(--white); padding-block: 52px 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.5'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3Cpath d='M0 48h20M76 48h20M48 0v20M48 76v20'/%3E%3C/g%3E%3C/svg%3E"); }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); margin-bottom: .25em; max-width: 18ch; }
.hero-sub { font-size: 1.1rem; color: #d3e6dc; max-width: 56ch; margin-bottom: 26px; }
.hero-cities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero-cities a { display: block; color: var(--white); border: 1px solid rgba(255, 255, 255, .35); border-radius: 99px; padding: 3px 16px; font-size: .95rem; }
.hero-cities a:hover { background: var(--white); color: var(--green-deep); text-decoration: none; }

/* search */
.search { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; background: var(--white); padding: 12px; border-radius: 12px; align-items: end; }
.search-full { grid-template-columns: 2fr 1fr 1fr 1fr auto; border: 1px solid var(--line); margin-top: 18px; }
.search label { display: block; }
.search span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1px solid #b4c4bb; border-radius: var(--r); padding: 10px 12px; min-height: 46px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 2px solid rgba(11, 107, 75, .25); }
.search .btn { min-height: 46px; white-space: nowrap; }

/* page head */
.page-head { background: var(--mint); border-bottom: 1px solid var(--line); padding-block: 22px 26px; }
.page-head h1 { margin: 0; }
.page-head h1 small { font: 500 1rem var(--body); color: var(--muted); }
.count { color: var(--muted); margin: 4px 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.crumbs li + li::before { content: "/"; margin-inline: 8px; color: #9fb0a7; }
.crumbs li:last-child { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding-block: 32px 44px; align-items: start; }
.col-side { display: grid; gap: 20px; position: sticky; top: 84px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font-size: 1.5rem; }
.sec-head a { font-weight: 600; white-space: nowrap; }
.more { margin-top: 20px; }

/* job rows: a ruled list, not a card grid */
.job-list { border-top: 2px solid var(--ink); }
.job { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 6px; border-bottom: 1px solid var(--line); position: relative; }
.job:hover { background: var(--mint); }
.job.is-featured { background: #fdf6e7; box-shadow: inset 4px 0 0 var(--gold); }
html[dir="rtl"] .job.is-featured { box-shadow: inset -4px 0 0 var(--gold); }
.job-logo { width: 56px; height: 56px; border-radius: var(--r); background: var(--mint); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; font: 700 1.4rem var(--display); color: var(--green); flex: none; }
.job-logo img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.job-logo.big { width: 72px; height: 72px; font-size: 1.8rem; background: var(--white); }
.job h3 { margin: 0 0 2px; font: 600 1.12rem var(--body); }
.job h3 a { color: var(--ink); }
.job h3 a::after { content: ""; position: absolute; inset: 0; }
.job:hover h3 a { color: var(--green); text-decoration: none; }
.job-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; color: var(--muted); font-size: .93rem; }
.job-meta span + span { border-inline-start: 1px solid #b9c8c0; margin-inline-start: 10px; padding-inline-start: 10px; }
.job-meta .m-city, .job-meta .m-city a { color: var(--green); font-weight: 600; }
.job-meta .m-sal { color: var(--ink); font-weight: 600; }
.job-side { text-align: end; font-size: .86rem; color: var(--muted); display: grid; gap: 4px; justify-items: end; }
.badge { background: var(--gold); color: var(--gold-ink); border-radius: 4px; padding: 0 8px; font-weight: 600; font-size: .8rem; }

/* tiles */
.band { background: var(--mint); padding-block: 36px; border-block: 1px solid var(--line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tiles-cat { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tiles a { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; color: var(--ink); height: 100%; }
.tiles-cat a { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
.tiles a:hover { border-color: var(--green); text-decoration: none; color: var(--green); }
.tiles span { font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* side boxes */
.side-box { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.side-box h2 { font-size: 1.1rem; }
.side-links li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.side-links li:last-child { border: 0; }
.side-links span { color: var(--muted); font-size: .85rem; }
.cta { background: var(--green-deep); color: var(--white); border-radius: var(--r); padding: 22px; }
.cta h2 { font-size: 1.2rem; }
.cta p { color: #d3e6dc; font-size: .95rem; }

/* job view */
.job-head { display: flex; gap: 16px; align-items: center; }
.job-view > section { margin-bottom: 30px; }
.job-view h2 { font-size: 1.3rem; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 14px; }
.facts dl { display: grid; grid-template-columns: max-content 1fr; margin: 0; }
.facts dt, .facts dd { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); padding-inline-end: 28px; }
.facts dd { font-weight: 600; }
.prose { max-width: 70ch; }
.prose ul { list-style: disc; padding-inline-start: 22px; margin-bottom: 1em; }
.prose li { margin-bottom: 4px; }
.prose h2 { margin-top: 1.4em; }
.prose.intro { margin-bottom: 22px; }
.apply-btns, .share-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.apply-plain { margin-bottom: 14px; }
.apply-plain li { padding: 3px 0; }
.warn, .notice { background: #fdf6e7; border: 1px solid #ecd49b; border-radius: var(--r); padding: 10px 14px; font-size: .93rem; }
.notice { background: #fdecec; border-color: #f0b4b4; color: var(--danger); font-weight: 600; }
.share-btns a, .share-btns button { color: var(--white); border: 0; border-radius: var(--r); padding: 7px 16px; font: 600 .93rem var(--body); cursor: pointer; min-height: 40px; }
.share-btns a:hover { text-decoration: none; filter: brightness(.9); }
.s-wa { background: #128c4b; } .s-fb { background: #1463d8; } .s-x { background: #111; } .s-li { background: #0a66c2; } .s-tg { background: #1d8fc7; }
.share-btns .s-copy { background: var(--mint); color: var(--ink); border: 1px solid var(--line); }

/* faq */
.faq { margin-top: 30px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: inside; }
.faq details[open] summary { color: var(--green); }
.faq details div { padding-bottom: 12px; color: #2c3b33; }

/* forms */
.form .row { margin-bottom: 16px; }
.form label, .form legend { display: block; font-weight: 600; margin-bottom: 4px; }
.form small { color: var(--muted); font-weight: 400; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 2px; margin: 0 0 18px; }
.form legend { padding-inline: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cap input { max-width: 140px; }
.hint { color: var(--muted); font-size: .9rem; margin-top: -8px; }
.hp { position: absolute; inset-inline-start: -9999px; height: 0; overflow: hidden; }
.errors { background: #fdecec; border: 1px solid #f0b4b4; color: var(--danger); border-radius: var(--r); padding: 12px 34px; list-style: disc; margin-bottom: 20px; }
.empty { border: 1px dashed #a9bdb2; border-radius: var(--r); padding: 36px 20px; text-align: center; }
.empty.ok { border-style: solid; border-color: var(--green); background: var(--mint); }

/* pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding-inline: 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); font-weight: 600; }
.pager a:hover { background: var(--mint); text-decoration: none; }
.pager .cur { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ads: no reserved box when a slot is empty */
.ad { margin: 18px auto; text-align: center; overflow: hidden; max-width: 100%; }
.col-side .ad { margin: 0; }

/* footer */
.site-foot { background: var(--ink); color: #c5d2cb; margin-top: 30px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-block: 40px 24px; }
.site-foot h2 { font-size: 1.05rem; color: var(--white); }
.site-foot a { color: #c5d2cb; }
.site-foot a:hover { color: var(--white); }
.site-foot li { padding: 3px 0; }
.foot-brand { font: 700 1.3rem var(--display); color: var(--white); margin-bottom: 6px; }
.foot-social { display: flex; flex-wrap: wrap; gap: 14px; }
.foot-bottom { border-top: 1px solid #2f4138; padding-block: 16px; font-size: .88rem; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 28px; }
  .col-side { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .search, .search-full { grid-template-columns: 1fr 1fr; }
  .search .f-q, .search .btn { grid-column: 1 / -1; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .lang { margin: 6px 0; text-align: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-block: 34px 30px; }
  .job { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding-inline: 2px; }
  .job-logo { width: 44px; height: 44px; font-size: 1.1rem; }
  .job-side { grid-column: 2; display: flex; gap: 10px; justify-items: start; text-align: start; }
  .grid2, .foot-grid { grid-template-columns: 1fr; }
  .search, .search-full { grid-template-columns: 1fr; }
  .facts dt { padding-inline-end: 16px; }
  .job-head { align-items: flex-start; }
  .job-logo.big { width: 56px; height: 56px; }
  .apply-btns .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-head, .site-foot, .col-side, .share, .ad, .search { display: none; } }

/* fixes */
ol { margin: 0; padding: 0; list-style: none; }
.job-view .prose { max-width: none; }
.job-view .prose p, .job-view .prose ul { max-width: 70ch; }
.related .job-list, .faq + .related .job-list { border-top: 0; }
.share-btns a, .share-btns button { display: inline-flex; align-items: center; }
@media (max-width: 560px) {
  .job-meta { gap: 2px 14px; }
  .job-meta span + span { border: 0; margin: 0; padding: 0; }
}

/* job advertisement image + thumbnails */
.job-logo.is-thumb img { object-fit: cover; }
.job-ad { margin: 0 0 30px; }
.job-ad img { display: block; max-width: 100%; max-height: 900px; margin-inline: auto; border: 1px solid var(--line); border-radius: var(--r); }
input[type="file"] { padding: 8px; min-height: 0; }

/* PDF shown inside the job page */
.pdf-view { border: 1px solid var(--line); border-radius: var(--r); background: #e9eeeb; padding: 8px; max-height: 85vh; overflow-y: auto; margin-bottom: 14px; }
.pdf-view canvas { display: block; width: 100%; height: auto; background: var(--white); }
.pdf-view canvas + canvas { margin-top: 8px; }
.pdf-view iframe { display: block; width: 100%; height: 75vh; border: 0; background: var(--white); }
.pdf-loading { margin: 0; padding: 30px; text-align: center; color: var(--muted); }

/* site logo (icon with the name underneath) */
.head-in { min-height: 80px; }
.brand img { height: 64px; }
.col-side { top: 100px; }
@media (max-width: 560px) { .head-in { min-height: 68px; } .brand img { height: 54px; } }
