/* ═══════════════════════════════════════════════════════════════════
   CBEX — shared styles for the policy / support pages
   Brand: navy #1E253E · red #D04A4B · gold #C69228
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --primary:     #1E253E;
  --primary-2:   #283254;
  --primary-3:   #3A4D6E;
  --accent:      #D04A4B;
  --accent-dark: #B23E3F;
  --accent-soft: #FDEFF0;
  --on-accent:   #FFFFFF;
  --gold:        #C69228;
  --bg:          #FFFFFF;
  --bg-soft:     #F4F6FA;
  --text:        #1E253E;
  --text-soft:   #4B5568;
  --muted:       #7B829C;
  --border:      #D6DDEB;
  --radius-sm:   8px;
  --radius:      14px;
  --shadow:      0 2px 14px rgba(30, 37, 62, .07);
  --shadow-lg:   0 10px 40px rgba(30, 37, 62, .14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-3); text-decoration: none; transition: color .2s; word-break: break-word; }
a:hover { color: var(--accent); }

/* ── Top bar ─────────────────────────────────────────────────────── */
.topbar {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 32px;
  font-size: .85rem;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .02em; }
.topbar .brand img { height: 26px; width: auto; display: block; }

.lang-switch { display: flex; gap: 6px; flex-shrink: 0; }
.lang-switch button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: .8rem;
  font-family: inherit;
  font-weight: 600;
  transition: all .2s;
}
.lang-switch button.active,
.lang-switch button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(208, 74, 75, .28), transparent 46%),
    radial-gradient(circle at 82% 82%, rgba(58, 77, 110, .40), transparent 46%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  text-align: center;
  padding: 72px 24px 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero .kicker {
  display: inline-block;
  background: rgba(208, 74, 75, .22);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  margin-bottom: 18px;
  text-transform: uppercase;
  position: relative;
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; position: relative; }
.hero p.sub { font-size: 1rem; opacity: .86; max-width: 680px; margin: 0 auto; position: relative; }
.hero .wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--bg-soft);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 60%);
}

/* ── Main / layout ───────────────────────────────────────────────── */
main { background: var(--bg-soft); padding: 50px 20px 80px; }
.container { max-width: 920px; margin: 0 auto; }

.meta-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 26px;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--accent);
  font-size: .88rem;
}
html[dir="rtl"] .meta-card { border-left: none; border-right: 4px solid var(--accent); }
.meta-card .meta-item { display: flex; align-items: center; gap: 8px; color: var(--text-soft); }
.meta-card .meta-item strong { color: var(--primary); }

/* ── Table of contents ───────────────────────────────────────────── */
.toc {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.toc h3 { font-size: 1rem; color: var(--primary); margin-bottom: 14px; letter-spacing: .04em; text-transform: uppercase; }
.toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 4px 16px;
}
.toc ol li { counter-increment: toc; position: relative; padding: 6px 0; font-size: .9rem; }
.toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-weight: 700;
  margin-inline-end: 10px;
  font-size: .85rem;
}
.toc ol li a { color: var(--text-soft); }
.toc ol li a:hover { color: var(--primary); }

/* ── Sections ────────────────────────────────────────────────────── */
.section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
  margin-bottom: 20px;
  transition: box-shadow .2s;
}
.section:hover { box-shadow: var(--shadow-lg); }
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px dashed var(--border);
}
.section-num {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--on-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(208, 74, 75, .32);
}
.section-head h2 { font-size: 1.28rem; color: var(--primary); font-weight: 700; padding-top: 8px; }

.section p, .section li { color: var(--text-soft); font-size: .96rem; }
.section p { margin-bottom: 12px; }
.section ul { margin: 8px 0 14px; }
html[dir="rtl"] .section ul { padding-right: 24px; }
html[dir="ltr"] .section ul { padding-left: 24px; }
.section li { margin-bottom: 8px; list-style: none; position: relative; }
.section li::before {
  content: "";
  position: absolute;
  top: 12px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
html[dir="rtl"] .section li::before { right: -18px; }
html[dir="ltr"] .section li::before { left: -18px; }

.sub-title {
  font-weight: 700;
  color: var(--primary);
  margin: 18px 0 6px;
  font-size: .98rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sub-title .badge {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--primary-3);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

/* ── Callouts ────────────────────────────────────────────────────── */
.callout, .callout-info, .callout-warning {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  font-size: .93rem;
  border-left: 4px solid;
}
html[dir="rtl"] .callout,
html[dir="rtl"] .callout-info,
html[dir="rtl"] .callout-warning { border-left: none; border-right: 4px solid; }

.callout         { background: var(--accent-soft); border-color: var(--accent);   color: #7B2E2F; }
.callout-info    { background: #EEF1F8;            border-color: var(--primary-3); color: var(--primary); }
.callout-warning { background: #FBF3E0;            border-color: var(--gold);      color: #6B4E12; }

/* ── Data table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: .9rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid var(--border);
}
.data-table th { background: var(--primary); color: #fff; font-weight: 600; font-size: .85rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { font-weight: 600; color: var(--primary); }

/* ── Contact card ────────────────────────────────────────────────── */
.contact-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  margin-top: 36px;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: -60px; inset-inline-end: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(208, 74, 75, .45), transparent 70%);
  pointer-events: none;
}
.contact-card h2 { font-size: 1.4rem; margin-bottom: 8px; position: relative; }
.contact-card .lead { font-size: .95rem; opacity: .86; margin-bottom: 24px; position: relative; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  position: relative;
}
.contact-cell {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background .2s;
}
.contact-cell:hover { background: rgba(255, 255, 255, .16); }
.contact-cell .ico {
  width: 38px; height: 38px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-cell .info { display: flex; flex-direction: column; line-height: 1.4; }
.contact-cell .info .label { font-size: .72rem; opacity: .78; text-transform: uppercase; letter-spacing: .08em; }
.contact-cell .info a, .contact-cell .info span { color: #fff; font-size: .9rem; font-weight: 600; word-break: break-word; }
.contact-cell .info a:hover { color: #FFD9DA; }

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, .75);
  text-align: center;
  padding: 28px 20px;
  font-size: .85rem;
}
footer .copyright { margin-bottom: 6px; }
footer a { color: #F0A2A3; }
footer a:hover { color: #fff; }

/* ── Language visibility ─────────────────────────────────────────── */
.lang-ar, .lang-en { display: none; }
.lang-ar.active, .lang-en.active { display: block; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .hero { padding: 54px 20px 72px; }
  .hero h1 { font-size: 1.7rem; }
  .section { padding: 22px 20px; }
  .section-head h2 { font-size: 1.08rem; }
  .section-num { width: 40px; height: 40px; font-size: 1rem; }
  .contact-card { padding: 28px 22px; }
  .topbar { padding: 8px 16px; }
  .topbar .brand img { height: 22px; }
  .meta-card { padding: 16px; }
  .data-table { font-size: .82rem; }
  .data-table th, .data-table td { padding: 10px 8px; }
}

@media print {
  .topbar, .hero .kicker, .lang-switch, footer { display: none; }
  body { background: #fff; }
  main { background: #fff; padding: 0; }
  .section, .contact-card, .meta-card, .toc { box-shadow: none; border: 1px solid #e5e5e5; page-break-inside: avoid; }
}
