/* Octa Land public site — brand blues from the logo. Arabic RTL first, English LTR. */
:root {
  --ground: #F3F6FA; --tone: #E3EAF4; --line: #C3D2E9; --surface: #FFFFFF;
  --ink: #12203F; --soft: #4A5670; --deep: #172B57; --navy: #233D78;
  --royal: #014E9C; --royal-deep: #013E7D; --sky: #2267B4;
  --on-deep: #F3F6FA; --on-deep-soft: #B8C6DF; --wa: #1F7A4D;
  --radius: 12px; --wrap: 1200px; --gutter: clamp(16px, 4vw, 24px);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --h1: clamp(2.1rem, 1.3rem + 3.4vw, 4.1rem);
  --h2: clamp(1.6rem, 1.15rem + 1.8vw, 2.6rem);
  --section: clamp(56px, 8vw, 96px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.75 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--royal-deep); text-decoration: underline; }
h1, h2, h3 { color: var(--deep); line-height: 1.3; margin: 0; font-weight: 700; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--royal); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.center { text-align: center; display: grid; gap: 16px; justify-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -9999px; z-index: 50; }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.muted { color: var(--soft); }
.lead { font-size: clamp(1.06rem, 1rem + .4vw, 1.3rem); }
.lead-sm { font-size: 1.1rem; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.kicker { color: var(--royal); font-weight: 600; font-size: .9rem; }
.empty { color: var(--soft); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }
.icon { flex: none; }
[dir="ltr"] .icon-flip, [dir="ltr"] .more .icon { transform: scaleX(-1); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 26px; border-radius: 8px; font-weight: 600; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--royal); color: #fff; }
.btn-primary:hover { background: var(--royal-deep); color: #fff; }
.btn-light { background: #fff; color: var(--deep); font-weight: 700; }
.btn-light:hover { background: var(--tone); color: var(--deep); }
.btn-outline { border-color: #8DA2C8; color: var(--on-deep); }
.btn-outline:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-quiet { background: var(--surface); border-color: var(--line); color: var(--deep); }
.btn-quiet:hover { background: var(--tone); color: var(--deep); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* Header */
.header { background: var(--surface); border-bottom: 1px solid var(--tone); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--deep); }
.brand:hover { text-decoration: none; color: var(--deep); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 1.2rem; }
.brand small { font-size: .7rem; color: var(--soft); letter-spacing: .1em; }
.nav { flex: 1 1 auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; }
.nav a { color: var(--ink); padding: 10px 14px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--royal); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--royal); font-weight: 600; border-bottom-color: var(--royal); }
.lang { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: var(--deep); font-weight: 600; font-size: .9rem; padding-inline: 10px; }
.lang:hover { background: var(--tone); text-decoration: none; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: var(--deep); color: #fff; align-items: center; justify-content: center; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; color: var(--on-deep); background: var(--deep); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: rgba(18, 32, 63, .68); }
.hero-body { position: relative; padding-block: clamp(88px, 14vw, 160px); display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { color: var(--on-deep-soft); max-width: 40rem; }
.eyebrow { color: var(--on-deep-soft); font-size: .9rem; }
.page-hero { background: var(--deep); color: var(--on-deep); padding-block: clamp(56px, 8vw, 88px); }
.page-hero h1 { color: #fff; font-size: var(--h2); }
.page-hero .lead { color: var(--on-deep-soft); margin-top: 12px; max-width: 44rem; }

/* Sections */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 56px); align-items: center; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.section-head .kicker { margin-bottom: 6px; }
.band { border-block: 1px solid var(--tone); }
.band-white { background: var(--surface); }
.band .section-head { margin-bottom: 0; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.facts > div { background: var(--surface); border: 1px solid var(--tone); border-radius: var(--radius); padding: 22px; }
.facts .wide { grid-column: 1 / -1; }
.facts dt { color: var(--soft); font-size: .88rem; }
.facts dd { margin: 6px 0 0; font-weight: 600; color: var(--deep); }
.prose { display: grid; gap: 1em; font-size: 1.08rem; max-width: 44rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--tone); border-radius: var(--radius); padding: 16px 18px; }
.contact-list li > span:last-child { display: flex; flex-direction: column; }
.ci { width: 40px; height: 40px; border-radius: 10px; background: var(--tone); color: var(--deep); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ci-label { color: var(--soft); font-size: .85rem; }
.contact-list a[dir="ltr"] { unicode-bidi: isolate; }
[dir="rtl"] .contact-list a[dir="ltr"] { text-align: right; }
.map { display: grid; gap: 12px; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); background: var(--tone); }
.map-empty { aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--tone); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--deep); }

/* Footer */
.footer { background: var(--ink); color: var(--on-deep-soft); margin-top: var(--section); }
.footer a { color: var(--on-deep-soft); }
.footer a:hover { color: #fff; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-block: 48px 28px; }
.brand-light, .brand-light:hover { color: var(--on-deep); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social a { width: 44px; height: 44px; border: 1px solid #2D3E66; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--on-deep); }
.social a:hover { background: var(--navy); }
.footer-bottom { border-top: 1px solid #2D3E66; padding-block: 20px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .9rem; }

.wa-float { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(18, 32, 63, .3); }
.wa-float:hover { background: #18633E; color: #fff; }

/* Phone and tablet */
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; order: 3; }
  .header-row { flex-wrap: wrap; gap: 10px; }
  .brand { flex: 1 1 auto; }
  .lang { order: 2; }
  .nav { order: 4; flex-basis: 100%; display: none; flex-direction: column; padding-bottom: 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--tone); }
  .nav a[aria-current="page"] { border-bottom-color: var(--tone); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .buttons .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Cards and grids */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-activities { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.card-activity, .card-project, .card-news { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--tone); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card-activity:hover, .card-project:hover, .card-news:hover { border-color: var(--line); box-shadow: 0 8px 24px rgba(18, 32, 63, .08); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 { font-size: 1.15rem; line-height: 1.5; }
.card-body h3 a { color: var(--deep); }
.card-body h3 a:hover { text-decoration: none; color: var(--royal); }
.stretch::after { content: ""; position: absolute; inset: 0; }
.card-media { background: var(--tone); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-169 { aspect-ratio: 16 / 9; }
.card-activity .card-media { aspect-ratio: 16 / 9; }
.no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #8DA2C8; }
.tile { width: 48px; height: 48px; border-radius: 10px; background: var(--deep); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.tile-light { background: rgba(255, 255, 255, .12); }
.card-activity .tile { margin-bottom: 4px; }
.card-activity .card-media + .card-body .tile { margin-top: -44px; position: relative; border: 3px solid var(--surface); box-sizing: content-box; }
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; }
.card-body .kicker { font-size: .82rem; }
.h3 { font-size: 1.35rem; margin-bottom: 20px; }

/* Filters and paging */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 8px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; color: var(--deep); background: var(--surface); }
.chips a:hover { background: var(--tone); text-decoration: none; }
.chips a[aria-current] { background: var(--deep); border-color: var(--deep); color: #fff; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }

/* Detail pages */
.page-hero .stack { gap: 12px; }
.page-hero .eyebrow, .page-hero .eyebrow a { color: var(--on-deep-soft); }
.page-hero .meta { color: var(--on-deep-soft); }
.back { color: var(--on-deep-soft); font-weight: 500; font-size: .95rem; }
.back:hover { color: #fff; }
[dir="rtl"] .back .icon { transform: none; }
[dir="ltr"] .back .icon { transform: scaleX(-1); }
.narrow { max-width: 860px; }
.feature-img { margin-top: -40px; position: relative; }
.feature-img img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius); }
.split-top { align-items: start; }
.side-img img, .article-img img { width: 100%; border-radius: var(--radius); }
.section-sm { padding-bottom: var(--section); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(45%, 220px), 1fr)); gap: 12px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--tone); aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.03); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 18, 36, .92); }
.lightbox-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 12px; inset-inline-end: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -24px; }
.lb-prev { inset-inline-start: 12px; }
.lb-next { inset-inline-end: 12px; }
/* The arrow points right; flip the one that sits on the left. */
[dir="rtl"] .lb-next .icon, [dir="ltr"] .lb-prev .icon { transform: scaleX(-1); }
.lb-count { position: fixed; bottom: 16px; inset-inline: 0; text-align: center; color: #fff; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .gallery img, .card-activity, .card-project, .card-news { transition: none; } }

/* Contact form */
.contact-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: start; }
.contact-split .contact-grid { grid-template-columns: 1fr; }
.cf { scroll-margin-top: 96px; background: var(--surface); border: 1px solid var(--tone); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-wide { grid-column: 1 / -1; }
.cf label { font-weight: 500; font-size: .95rem; }
.cf input, .cf textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; width: 100%; min-height: 48px; }
.cf textarea { resize: vertical; }
.cf input:focus, .cf textarea:focus { border-color: var(--royal); outline: 2px solid rgba(1, 78, 156, .25); outline-offset: 0; }
.cf [aria-invalid="true"] { border-color: #B42318; }
[dir="rtl"] .cf input[dir="ltr"] { text-align: right; }
.cf-err { color: #B42318; font-size: .88rem; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.note { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid; }
.note-ok { background: #E6F2EC; color: #1B5E3E; border-color: #B9DCC9; }
.note-err { background: #FBEAEA; color: #9B2C2C; border-color: #E5B9B9; }
.small { font-size: .9rem; }
.cta-row { margin-top: 24px; }
@media (max-width: 520px) { .cf-grid { grid-template-columns: 1fr; } }
