/* =============================================
   UAE Bank History — style.css
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sand:       #f7f3ec;
  --ink:        #1c2b1e;
  --gold:       #8a6c1e;
  --gold-light: #c9a84c;
  --red:        #c1272d;
}

html { scroll-behavior: smooth; }

body {
  background: var(--sand);
  color: var(--ink);
  font-family: 'Tajawal', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* RTL mode */
html[dir="rtl"] body { font-family: 'Tajawal', sans-serif; }

/* ── Flag motif ── */
.flag-motif {
  position: fixed;
  top: 0; left: 0; bottom: 0; width: 100%;
  pointer-events: none;
  z-index: 0;
}
.flag-red {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 7px;
  background: var(--red);
  opacity: 0.55;
}
.flag-stripes {
  position: absolute;
  top: 0; left: 7px; right: 0; bottom: 0;
  display: flex; flex-direction: column;
}
.stripe-green { flex: 1; background: linear-gradient(90deg, rgba(0,115,47,0.07) 0%, rgba(0,115,47,0.02) 30%, transparent 60%); }
.stripe-white { flex: 1; background: linear-gradient(90deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 30%, transparent 60%); border-top: 0.5px solid rgba(28,43,30,0.05); border-bottom: 0.5px solid rgba(28,43,30,0.05); }
.stripe-black { flex: 1; background: linear-gradient(90deg, rgba(28,28,28,0.07) 0%, rgba(28,28,28,0.02) 30%, transparent 60%); }

/* ── Gold top bar ── */
.gold-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light) 40%, transparent);
  z-index: 100;
}

/* ── Geometric background (homepage only) ── */
.geo-bg {
  position: fixed;
  top: -20px; right: -20px;
  width: 300px; height: 300px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* ── All content above fixed bg ── */
nav, section, div.section-row, div.featured-banks,
div.page-header, div.body-grid, footer.footer {
  position: relative;
  z-index: 1;
}

/* ── Navigation ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px 18px 44px;
  border-bottom: 0.5px solid rgba(28,43,30,0.12);
  background: rgba(247,243,236,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: sticky;
  top: 3px;
  z-index: 50;
}

.logo-wrap {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none;
}
.logo-diamond {
  width: 28px; height: 28px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-diamond-inner { width: 11px; height: 11px; background: var(--gold); }
.logo-text {
  font-size: 13px; letter-spacing: 0.07em;
  color: var(--ink); text-transform: uppercase;
  font-weight: 500; line-height: 1.3;
}
.logo-sub {
  font-family: 'Scheherazade New', serif;
  font-size: 13px; color: var(--gold);
  letter-spacing: 0.02em; display: block;
}

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 13px; color: rgba(28,43,30,0.5);
  text-decoration: none; letter-spacing: 0.04em;
  font-weight: 400;
}
.nav-link:hover { color: var(--ink); }
.nav-back {
  font-size: 12px; color: var(--gold);
  letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 0.5px solid rgba(138,108,30,0.35);
  padding-bottom: 1px;
}

.lang-toggle {
  display: flex;
  border: 0.5px solid rgba(138,108,30,0.4);
  border-radius: 3px; overflow: hidden; margin-left: 8px;
}
.lang-btn {
  padding: 5px 11px; font-size: 12px; cursor: pointer;
  letter-spacing: 0.06em; border: none; background: transparent;
  color: rgba(28,43,30,0.45); font-family: 'Tajawal', sans-serif;
}
.lang-btn.active { background: var(--gold); color: var(--sand); font-weight: 500; }

/* ── Homepage hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 32px;
  padding: 56px 32px 44px 44px;
  align-items: start;
}
.hero-eyebrow {
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::after {
  content: ''; display: block;
  width: 36px; height: 0.5px; background: var(--gold);
}
html[dir="rtl"] .hero-eyebrow { flex-direction: row-reverse; }
html[dir="rtl"] .hero-eyebrow::after { display: none; }
html[dir="rtl"] .hero-eyebrow::before {
  content: ''; display: block;
  width: 36px; height: 0.5px; background: var(--gold);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 40px; font-weight: 400;
  line-height: 1.18; color: var(--ink); margin: 0 0 6px;
}
html[dir="rtl"] .hero-title {
  font-family: 'Scheherazade New', serif;
  font-size: 34px;
}
.hero-title-ar {
  font-family: 'Scheherazade New', serif;
  font-size: 26px; color: rgba(28,43,30,0.35);
  margin: 0 0 22px; display: block; line-height: 1.5;
}
html[dir="rtl"] .hero-title-ar {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
}

.hero-body {
  font-size: 15px; line-height: 1.8;
  color: rgba(28,43,30,0.62); font-weight: 300;
  max-width: 440px; margin-bottom: 30px;
}
.hero-ctas { display: flex; gap: 14px; align-items: center; }
.cta-primary {
  background: var(--ink); color: var(--sand);
  padding: 10px 22px; font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; cursor: pointer;
  font-family: 'Tajawal', sans-serif; border-radius: 2px;
  text-decoration: none; display: inline-block;
}
.cta-primary:hover { background: var(--gold); }
.cta-secondary {
  color: rgba(28,43,30,0.5); font-size: 13px;
  background: none; border: none;
  font-family: 'Tajawal', sans-serif;
  text-decoration: none;
}
.cta-secondary:hover { color: var(--ink); }

.hero-aside { padding-top: 6px; }
.aside-label {
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 14px;
}
.stat-row {
  border-top: 0.5px solid rgba(28,43,30,0.1);
  padding: 12px 0; display: flex;
  justify-content: space-between; align-items: baseline;
}
.stat-num { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--ink); }
.stat-lbl { font-size: 11px; color: rgba(28,43,30,0.45); text-align: right; line-height: 1.4; }
html[dir="rtl"] .stat-lbl { text-align: left; }

/* ── Featured banks grid ── */
.featured-banks {
  border-top: 0.5px solid rgba(28,43,30,0.12);
  padding: 28px 32px 28px 44px;
}
.fb-label {
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 18px;
}
.fb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.fb-card {
  border: 0.5px solid rgba(28,43,30,0.12);
  padding: 14px 14px 12px;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}
.fb-card:hover { border-color: rgba(138,108,30,0.45); background: rgba(138,108,30,0.03); }
.fb-card.fb-coming-soon { opacity: 0.5; cursor: default; }
.fb-card.fb-coming-soon:hover { border-color: rgba(28,43,30,0.12); background: transparent; }
.fb-en { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 3px; line-height: 1.3; }
.fb-ar { font-family: 'Scheherazade New', serif; font-size: 14px; color: rgba(28,43,30,0.38); margin-bottom: 8px; line-height: 1.4; }
.fb-tag { font-size: 9px; letter-spacing: 0.1em; color: var(--gold); text-transform: uppercase; }

/* ── Two-column content section ── */
.section-row {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 0.5px solid rgba(28,43,30,0.12);
}
.section-cell {
  padding: 32px 32px 32px 44px;
  border-right: 0.5px solid rgba(28,43,30,0.1);
}
.section-cell:last-child { border-right: none; padding-left: 32px; }
html[dir="rtl"] .section-cell { border-right: none; border-left: 0.5px solid rgba(28,43,30,0.1); padding: 32px 44px 32px 32px; }
html[dir="rtl"] .section-cell:last-child { border-left: none; padding-right: 32px; }

.sc-label { font-size: 10px; letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; margin-bottom: 12px; }
.sc-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 400; color: var(--ink); margin-bottom: 8px; line-height: 1.3; }
html[dir="rtl"] .sc-title { font-family: 'Scheherazade New', serif; font-size: 20px; }
.sc-body { font-size: 13px; line-height: 1.8; color: rgba(28,43,30,0.58); font-weight: 300; }
.sc-link {
  display: inline-block; margin-top: 14px; font-size: 12px;
  color: var(--ink); letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 0.5px solid rgba(28,43,30,0.3);
  text-decoration: none; padding-bottom: 2px;
}
.sc-link:hover { color: var(--gold); border-color: var(--gold); }

/* ── Bank page header ── */
.page-header {
  padding: 44px 32px 36px 44px;
  border-bottom: 0.5px solid rgba(28,43,30,0.12);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}
.breadcrumb {
  font-size: 10px; letter-spacing: 0.18em;
  color: rgba(28,43,30,0.38); text-transform: uppercase; margin-bottom: 14px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px; font-weight: 400; line-height: 1.15; color: var(--ink); margin: 0 0 6px;
}
html[dir="rtl"] .page-title { font-family: 'Scheherazade New', serif; font-size: 30px; }
.page-title-ar {
  font-family: 'Scheherazade New', serif;
  font-size: 22px; color: rgba(28,43,30,0.32); display: block; line-height: 1.5;
}
html[dir="rtl"] .page-title-ar { font-family: 'Playfair Display', serif; font-size: 16px; font-style: italic; }
.page-meta { text-align: right; }
html[dir="rtl"] .page-meta { text-align: left; }
.meta-item { font-size: 11px; color: rgba(28,43,30,0.4); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.meta-val { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--ink); }
.meta-val-sm { font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 400; }

/* ── Bank page body grid ── */
.body-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
}
.prose-col {
  padding: 36px 32px 48px 44px;
  border-right: 0.5px solid rgba(28,43,30,0.1);
}
html[dir="rtl"] .prose-col { border-right: none; border-left: 0.5px solid rgba(28,43,30,0.1); padding: 36px 44px 48px 32px; }

.section-label { font-size: 10px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; margin-bottom: 14px; }
.prose-body {
  font-size: 14px; line-height: 1.9;
  color: rgba(28,43,30,0.65); font-weight: 300;
  margin-bottom: 24px; max-width: 520px;
}
.prose-body strong { font-weight: 500; color: var(--ink); }

/* ── Timeline ── */
.timeline-col { padding: 36px 28px 48px 28px; }
.tl-heading { font-size: 10px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; margin-bottom: 22px; }
.tl { position: relative; padding-left: 20px; }
.tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 0.5px; background: rgba(28,43,30,0.15); }
html[dir="rtl"] .tl { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .tl::before { left: auto; right: 5px; }

.tl-item { position: relative; margin-bottom: 24px; }
.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute; left: -20px; top: 5px;
  width: 11px; height: 11px;
  border: 1.5px solid rgba(28,43,30,0.25);
  background: var(--sand);
  transform: rotate(45deg);
}
html[dir="rtl"] .tl-dot { left: auto; right: -20px; }
.tl-dot--gold { border-color: var(--gold); background: var(--gold); }
.tl-dot--red { border-color: var(--red); background: var(--sand); }

.tl-year { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.tl-event { font-size: 12px; color: rgba(28,43,30,0.58); line-height: 1.55; font-weight: 300; }
.tl-event strong { font-weight: 500; color: var(--ink); }
.tl-sub { font-size: 11px; color: rgba(138,108,30,0.8); margin-top: 4px; letter-spacing: 0.03em; }

/* ── Related entries box ── */
.related-box {
  margin-top: 28px;
  border: 0.5px solid rgba(28,43,30,0.12);
  border-radius: 2px; overflow: hidden;
}
.related-label {
  font-size: 10px; letter-spacing: 0.16em; color: var(--gold);
  text-transform: uppercase; padding: 10px 14px;
  border-bottom: 0.5px solid rgba(28,43,30,0.08);
  background: rgba(28,43,30,0.02);
}
.related-item {
  padding: 11px 14px;
  border-bottom: 0.5px solid rgba(28,43,30,0.07);
  text-decoration: none; display: block;
  transition: background 0.12s;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { background: rgba(138,108,30,0.04); }
.related-item--soon { opacity: 0.45; pointer-events: none; }
.ri-en { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.ri-ar { font-family: 'Scheherazade New', serif; font-size: 13px; color: rgba(28,43,30,0.38); }
.ri-arrow { float: right; font-size: 14px; color: rgba(28,43,30,0.25); margin-top: 2px; }
html[dir="rtl"] .ri-arrow { float: left; }

/* ── Footer ── */
.footer {
  padding: 18px 32px 18px 44px;
  border-top: 0.5px solid rgba(28,43,30,0.1);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy { font-size: 11px; color: rgba(28,43,30,0.3); letter-spacing: 0.03em; font-weight: 300; }
.footer-ar {
  font-family: 'Scheherazade New', serif;
  font-size: 13px; color: rgba(28,43,30,0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { padding: 14px 20px 14px 28px; }
  .nav-links { gap: 14px; }
  .nav-link:not(.nav-back):not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; padding: 36px 20px 32px 28px; }
  .hero-aside { display: none; }
  .hero-title { font-size: 30px; }
  .fb-grid { grid-template-columns: 1fr 1fr; }
  .featured-banks { padding: 24px 20px 24px 28px; }
  .section-row { grid-template-columns: 1fr; }
  .section-cell, .section-cell:last-child { padding: 24px 20px 24px 28px; border-right: none; border-top: 0.5px solid rgba(28,43,30,0.1); }
  .page-header { grid-template-columns: 1fr; padding: 28px 20px 24px 28px; }
  .page-meta { text-align: left; }
  .body-grid { grid-template-columns: 1fr; }
  .prose-col { padding: 28px 20px 32px 28px; border-right: none; border-bottom: 0.5px solid rgba(28,43,30,0.1); }
  .timeline-col { padding: 28px 20px 32px 28px; }
  .footer { padding: 16px 20px 16px 28px; }
}
