/* Daleel member website. Tokens and components from design/Directory Website.dc.html. */
:root {
  --ink: #17201D;
  --bg: #F5F2EC;
  --surface: #fff;
  --brand: #0E5A4A;
  --brand-dark: #0A4236;
  --mint: #E3EEE9;
  --sand: #F1E6D3;
  --sand-ink: #6B4A12;
  --gold: #8A5F1F;
  --muted: #5B625E;
  --muted-2: #4A524E;
  --label: #3A423E;
  --line: #E2DDD3;
  --line-strong: #CFC8BB;
  --line-soft: #EFEBE4;
  --hover: #EAE5DC;
  --soft: #F0ECE4;
  --placeholder: #EAE5DC;
  --danger: #A23B2A;
  --danger-line: #E9C3BA;
  --error-bg: #F7E1DC;
  --error-ink: #6E2318;
  --warn-bg: #FBF0DA;
  --warn-line: #EBD9B0;
  --warn-ink: #5A3E0E;
  --disabled: #A39D92;
  --gutter: clamp(16px, 4vw, 48px);
  --font-en: 'Schibsted Grotesk', 'IBM Plex Sans Arabic', sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'Schibsted Grotesk', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
html[lang="ar"] body { font-family: var(--font-ar); }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; align-items: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-40 { gap: 40px; }
.push-end { margin-inline-start: auto; }

/* Brand mark */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { height: 44px; width: auto; display: block; }

/* Buttons */
.btn { height: 44px; padding: 0 18px; border: 0; border-radius: 6px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-primary:disabled { background: var(--disabled); cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--bg); color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger-line); }
.btn-ghost { background: transparent; color: var(--ink); height: 40px; padding: 0 14px; }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-sm { height: 36px; padding: 0 12px; }
.btn-lg { height: 48px; font-size: 16px; padding: 0 24px; }
.btn-xl { height: 52px; font-size: 16px; padding: 0 28px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; text-decoration: none; }
.link-btn:hover { color: var(--brand-dark); }
.back-link { align-self: flex-start; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--label); }
.field-note { font-weight: 400; color: var(--muted); }
.input, .select, .textarea { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); width: 100%; font-size: 15px; font-weight: 400; }
.select { padding: 0 10px; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.input[readonly] { border-color: var(--line); background: var(--bg); color: var(--muted-2); cursor: not-allowed; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.field-error { font-weight: 400; color: var(--danger); font-size: 13px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; font-weight: 400; color: var(--ink); }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Alerts */
.alert { border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.alert-success { background: var(--mint); color: var(--brand-dark); }
.alert-error { background: var(--error-bg); color: var(--error-ink); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.card-pad { padding: clamp(18px, 3vw, 28px); }
.card-link { display: flex; flex-direction: column; gap: 6px; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; color: inherit; text-decoration: none; width: 100%; }
.card-link:hover { border-color: var(--brand); color: inherit; }
.empty { background: #fff; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 32px; text-align: center; color: var(--muted); }
.section-title { font-size: 20px; font-weight: 700; }
.page-title { font-size: 30px; font-weight: 700; line-height: 1.2; }
.card-title { font-size: 18px; font-weight: 700; }

/* Tags */
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.tag-purchase { background: var(--mint); color: var(--brand); }
.tag-partnership { background: var(--sand); color: var(--sand-ink); }
.tag-outline { border: 1px solid var(--line-strong); color: var(--label); }
.tag-soft { background: var(--soft); color: var(--label); font-size: 13px; padding: 3px 10px; }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); padding: 3px 10px; }

/* Image placeholders */
.media { position: relative; overflow: hidden; background: var(--placeholder); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-16x9 { aspect-ratio: 16 / 9; }
.media-4x3 { aspect-ratio: 4 / 3; border-radius: 10px; }
.media-cover { aspect-ratio: 4 / 1; min-height: 160px; border-radius: 12px; }

/* Logo tile */
.logo-tile { flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }

/* Contact icon buttons */
.icon-btn { width: 38px; height: 38px; flex: none; border-radius: 19px; border: 1px solid var(--line-strong); background: #fff; display: grid; place-items: center; color: var(--brand); }
.icon-btn:hover { background: var(--mint); border-color: var(--brand); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Public header and landing */
.public-header { padding-block: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-eyebrow { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .04em; }
.hero-title { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; max-width: 15ch; text-wrap: balance; }
html[lang="ar"] .hero-title { line-height: 1.3; letter-spacing: 0; }
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted-2); max-width: 58ch; text-wrap: pretty; }
.hero-art { position: relative; width: 100%; max-width: 540px; justify-self: center; }
.hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-chip { position: absolute; padding: 7px 12px; border-radius: 6px; font-size: clamp(10px, 1.05vw, 12px); font-weight: 700; white-space: nowrap; box-shadow: 0 6px 16px -8px rgba(23, 32, 29, .3); }

/* Banner carousel */
.banner { position: relative; }
.banner-slide { display: flex; flex-wrap: wrap; border-radius: 12px; overflow: hidden; color: #fff; min-height: 280px; text-decoration: none; }
.banner-slide[hidden] { display: none; }
.banner-slide:hover { color: #fff; }
.banner-copy { flex: 1 1 360px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 10px; padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 52px; }
.banner-sponsor { font-size: 12px; font-weight: 600; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 4px; }
.banner-title { font-size: clamp(24px, 3vw, 38px); font-weight: 700; line-height: 1.15; max-width: 24ch; text-wrap: balance; }
.banner-sub { font-size: 16px; max-width: 56ch; }
.banner-cta { font-weight: 600; margin-top: 6px; display: flex; gap: 8px; }
.banner-media { flex: 1 1 320px; min-height: 260px; position: relative; }
.banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 22px; inset-inline-start: clamp(24px, 4vw, 48px); display: flex; gap: 6px; }
.banner-dot { width: 6px; height: 6px; border-radius: 3px; border: 0; background: #fff; opacity: .5; cursor: pointer; padding: 0; transition: width .2s; }
.banner-dot[aria-current="true"] { width: 22px; opacity: 1; }
.banner--compact .banner-slide { min-height: 220px; }
.banner--compact .banner-copy { padding: clamp(24px, 4vw, 36px) clamp(24px, 4vw, 36px) 52px; }
.banner--compact .banner-title { font-size: clamp(22px, 2.4vw, 30px); }
.banner--compact .banner-sub { font-size: 15px; }
.banner--compact .banner-media { min-height: 200px; }
.banner--compact .banner-dots { inset-inline-start: clamp(24px, 4vw, 36px); }

/* Featured ads */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.featured-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.featured-body { flex: 1; padding: 16px 18px 12px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.featured-body:hover { color: inherit; }
.featured-kicker { font-size: 12px; font-weight: 600; color: var(--gold); }
.featured-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.featured-text { color: var(--muted); font-size: 14px; }
.featured-actions { display: flex; align-items: center; gap: 6px; padding: 4px 18px 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.site-footer .container { padding-block: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }

/* Auth pages */
.auth-main { flex: 1; display: grid; place-items: center; padding: 24px 16px 80px; }
.auth-card { width: 100%; max-width: 420px; padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; gap: 20px; }
.auth-title { font-size: 26px; font-weight: 700; }
.auth-foot { border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); }

/* Member header */
.member-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.member-header .container { min-height: 60px; display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); flex-wrap: wrap; }
.member-header .brand-logo { height: 36px; }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.main-nav a { height: 60px; padding: 0 12px; display: flex; align-items: center; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--ink); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 20px; background: #fff; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .avatar { width: 28px; height: 28px; border-radius: 14px; background: var(--mint); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px; overflow: hidden; }
.user-menu .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu .name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.menu-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(23, 32, 29, .12); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.menu-panel a, .menu-panel button { text-align: start; padding: 10px 12px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--ink); font-size: 14px; text-decoration: none; width: 100%; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--bg); }
.menu-panel hr { border: 0; height: 1px; background: var(--line); margin: 4px 0; }
.menu-panel .danger { color: var(--danger); font-weight: 600; }

.notice-bar { border-bottom: 1px solid; font-size: 14px; }
.notice-bar .container { padding-block: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.notice-bar.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.notice-bar.error { background: var(--error-bg); border-color: var(--danger-line); color: var(--error-ink); }

.member-main { padding-block: 32px 96px; flex: 1; }

/* Search bar on home */
.search-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; padding: 12px; }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cat-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; color: inherit; text-decoration: none; }
.cat-card:hover { border-color: var(--brand); color: inherit; }
.cat-name { font-weight: 700; font-size: 16px; }
.cat-count { font-size: 13px; color: var(--brand); font-weight: 600; margin-top: 4px; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: start; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.news-list { display: flex; flex-direction: column; }
.news-list a { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--line-soft); padding: 16px 18px; color: inherit; text-decoration: none; }
.news-list a:last-child { border-bottom-color: transparent; }
.news-list a:hover { background: #FAF8F4; color: inherit; }

/* Opportunity cards */
.opp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.opp-close { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.opp-title { font-weight: 700; font-size: 15px; }
.opp-sub { font-size: 13px; color: var(--muted); }

/* Directory */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.crumbs a { font-weight: 600; text-decoration: none; }
.crumbs .current { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: var(--disabled); }
.split { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.filters { flex: 1 1 240px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.results { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pill { display: inline-flex; gap: 8px; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 20px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.pill:hover { border-color: var(--brand); color: var(--ink); }
.pill .count { color: var(--muted); font-weight: 500; }
.company-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.company-row-main { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
.company-row-main:hover { color: inherit; }
.company-row-name { font-weight: 700; font-size: 16px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; }
.pager .disabled { opacity: .5; pointer-events: none; }

/* Company profile */
.profile-head { padding: clamp(20px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.profile-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.profile-aside { flex: 1 1 280px; padding: clamp(18px, 3vw, 24px); display: flex; flex-direction: column; gap: 14px; }
.detail-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.detail-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.detail-value { font-size: 15px; word-break: break-word; }
a.detail-value { font-weight: 600; text-decoration: none; }
.prose { font-size: 16px; line-height: 1.65; max-width: 68ch; text-wrap: pretty; white-space: pre-wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.social-pill { height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 18px; display: flex; align-items: center; font-size: 13px; font-weight: 600; text-decoration: none; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.article-title { font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; text-wrap: balance; }
.article-body { font-size: 17px; line-height: 1.7; display: flex; flex-direction: column; gap: 20px; }
.article-body p { margin: 0; text-wrap: pretty; }

/* Opportunities */
.segmented { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.segmented a { height: 36px; padding: 0 14px; border-radius: 5px; color: var(--label); font-weight: 600; font-size: 14px; display: flex; align-items: center; text-decoration: none; }
.segmented a[aria-current="true"] { background: var(--ink); color: #fff; }
.type-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.type-choice label { height: 48px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice input:checked + span { color: var(--ink); }
.type-choice label:has(input:checked) { border-color: var(--brand); background: var(--mint); }
.type-choice label:has(input:focus-visible) { outline: 2px solid var(--brand); }

/* Account */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { height: 44px; padding: 0 14px; display: flex; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--ink); }
.progress { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.toggle-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-chips label { height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 18px; background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; }
.toggle-chips input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-chips label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.toggle-chips label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.upload-btn { align-self: flex-start; height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 6px; display: flex; align-items: center; font-weight: 600; cursor: pointer; background: #fff; }
.upload-btn input { display: none; }

@media (max-width: 640px) {
  .member-header .container { padding-block: 8px; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .main-nav a { height: 44px; white-space: nowrap; }
}
