/* =========================================================
   IBDA website (ibdasa.com): the builder's site.
   Light "limestone" pages with the logo's two colours (teal and mint),
   one dark band that previews IBDA Vision. Works in English (left-to-right)
   and Arabic (right-to-left): use start/end ("inline") properties, never left/right.
   ========================================================= */

:root {
  --limestone: #f5f2ec;  /* page background */
  --white: #ffffff;      /* cards */
  --teal: #004845;       /* IBDA teal: header, footer, headings, main buttons */
  --teal-deep: #00302e;  /* text on mint, hover */
  --mint: #c4fdec;       /* IBDA mint: buttons and highlights on teal */
  --mint-strong: #a6f5dc;
  --ink: #0b2a27;        /* main text */
  --muted: #5b6b67;      /* secondary text */
  --line: #e3ded4;       /* dividers */
  --vision-dark: #061a18;/* the IBDA Vision band (same as the app) */
  --vision-card: #0b2624;
  --vision-line: #1f4a45;
  --vision-muted: #9dc3ba;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shell: 72rem;
  font-size: 100%;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font-family: "Readex Pro", ui-sans-serif, system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
  text-wrap: balance;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  line-height: 1.45;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 40rem) {
  .shell {
    padding-inline: 1.5rem;
  }
}

/* A clear focus ring for keyboard users. */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

.on-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--mint);
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-teal {
  background: var(--teal);
  color: var(--mint);
}

.btn-teal:hover {
  background: var(--teal-deep);
}

.btn-outline {
  border-color: var(--teal);
  color: var(--teal);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 72, 69, 0.08);
}

.btn-mint {
  background: var(--mint);
  color: var(--teal-deep);
}

.btn-mint:hover {
  background: var(--mint-strong);
}

.btn-ghost-light {
  border-color: rgba(196, 253, 236, 0.6);
  color: var(--mint);
}

.btn-ghost-light:hover {
  background: rgba(196, 253, 236, 0.1);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--teal);
  color: var(--mint);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.brand img {
  height: 2.25rem;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a.nav-link,
.lang-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  border-radius: 0.5rem;
  color: var(--mint);
  text-decoration: none;
  font-size: 0.95rem;
}

.main-nav a.nav-link:hover,
.lang-link:hover {
  background: rgba(196, 253, 236, 0.12);
}

.lang-link {
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-btn {
  display: none;
  min-height: 2.75rem;
  min-width: 2.75rem;
  border: 1px solid rgba(196, 253, 236, 0.5);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--mint);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding-inline: 0.75rem;
}

@media (max-width: 56rem) {
  .menu-btn {
    display: inline-flex;
    align-items: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--teal);
    border-top: 1px solid rgba(196, 253, 236, 0.15);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav .btn {
    margin-top: 0.5rem;
  }

  .header-cta {
    display: none;
  }
}

@media (min-width: 56.01rem) {
  .main-nav .nav-cta-mobile {
    display: none;
  }

  /* Arabic: the menu reads in the reverse order (requested by the team in KSA). */
  [dir="rtl"] .main-nav {
    flex-direction: row-reverse;
  }
}

/* ---------- Sections ---------- */
.section {
  padding-block: 4rem;
}

@media (min-width: 48rem) {
  .section {
    padding-block: 5.5rem;
  }
}

.section-white {
  background: var(--white);
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}

[dir="rtl"] .eyebrow {
  letter-spacing: normal;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--teal);
}

.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.section-white .card {
  background: var(--limestone);
}

.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 40rem) and (max-width: 55.99rem) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 3rem 4rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero {
    padding-block: 4.5rem 5.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 3.5rem;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--teal);
}

.hero-body {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.points {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.points li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}

/* ---------- Before / after slider ---------- */
.compare {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compare-frame {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--teal);
  box-shadow: 0 30px 60px -30px rgba(0, 48, 46, 0.45);
}

.compare-frame:has(input:focus-visible) {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.compare-layer {
  position: absolute;
  inset: 0;
}

.compare-layer img,
.mock-image img,
.compare-layer svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-before {
  clip-path: inset(0 65% 0 0);
}

.compare-tag {
  position: absolute;
  top: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tag-before {
  left: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.tag-after {
  right: 0.75rem;
  background: var(--mint);
  color: var(--teal-deep);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 35%;
  width: 4px;
  transform: translateX(-50%);
  background: var(--mint);
  pointer-events: none;
}

.compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid var(--mint);
  background: var(--teal);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.compare-caption {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Steps / services / why ---------- */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--mint);
  font-weight: 700;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--teal);
}

.card p {
  color: var(--muted);
}

.service-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--teal);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ---------- IBDA Vision band (dark, like the app) ---------- */
.vision-band {
  background: var(--vision-dark);
  color: #e6fbf4;
}

.vision-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .vision-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.vision-band .eyebrow {
  color: var(--mint);
}

.vision-band h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: #e6fbf4;
  margin-block: 0.75rem 1rem;
}

.vision-band p {
  color: var(--vision-muted);
}

.vision-steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vision-steps li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #e6fbf4;
}

.vision-steps .step-num {
  width: 2rem;
  height: 2rem;
  margin: 0;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: 0.9rem;
}

.vision-note {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.vision-mock {
  background: var(--vision-card);
  border: 1px solid var(--vision-line);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.vision-mock .tier-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tier-chip {
  border: 2px solid var(--vision-line);
  border-radius: 0.75rem;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e6fbf4;
}

.tier-chip.active {
  border-color: var(--mint);
}

.mock-image {
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
}

.mock-image svg,
.mock-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Packages ---------- */
.package {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.package.featured {
  border: 2px solid var(--teal);
}

.package-name {
  font-size: 1.5rem;
  color: var(--teal);
}

.package ul {
  margin: 0;
  padding-inline-start: 1.25rem;
  color: var(--ink);
  flex: 1;
}

.package li + li {
  margin-top: 0.35rem;
}

.package .btn {
  width: 100%;
}

.small-note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Gallery ---------- */
.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding-inline: 1.25rem;
}

.faq summary {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--teal);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding-bottom: 1.25rem;
  color: var(--muted);
}

/* ---------- Contact ---------- */
.contact {
  background: var(--teal);
  color: var(--mint);
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.contact .eyebrow {
  color: var(--mint);
}

.contact h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: #ffffff;
  margin-block: 0.75rem 1rem;
}

.contact-copy p {
  color: #d9f7ee;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
}

.contact-actions .btn {
  width: fit-content;
}

.contact-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list dt {
  font-size: 0.85rem;
  color: #9fd9c9;
}

.contact-list dd {
  margin: 0;
  color: #ffffff;
  font-weight: 500;
}

.contact-list a {
  color: var(--mint);
  font-weight: 600;
  text-underline-offset: 4px;
}

.email-line a {
  color: var(--mint);
  font-weight: 600;
  text-underline-offset: 4px;
}

.form-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.form-card h3 {
  color: var(--teal);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.form-card iframe {
  width: 100%;
  min-height: 40rem;
  border: 0;
}

.form-soon {
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: #bfe9dd;
  padding-block: 2.5rem;
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-inner img {
  height: 4.5rem;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.nowrap {
  white-space: nowrap;
}

/* The copyright line: centred on its own row, with extra space above it. */
.footer-copy {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #9fd3c5;
}

/* Phones: leave room so the floating WhatsApp button doesn't cover the copyright. */
@media (max-width: 55.99rem) {
  .site-footer {
    padding-bottom: 6rem;
  }
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--mint);
  text-underline-offset: 4px;
}

/* ---------- Floating WhatsApp button (phones) ---------- */
.float-wa {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 40;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
}

@media (min-width: 56rem) {
  .float-wa {
    display: none;
  }
}

/* ---------- Simple text pages (privacy) ---------- */
.text-page {
  max-width: 46rem;
  padding-block: 3rem 4rem;
}

.text-page h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--teal);
}

.text-page h2 {
  font-size: 1.3rem;
  color: var(--teal);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.text-page p + p {
  margin-top: 0.75rem;
}

.text-page .updated {
  color: var(--muted);
  margin-top: 0.5rem;
}

.text-link {
  color: var(--teal);
  font-weight: 600;
  text-underline-offset: 4px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: 1rem;
}

/* ---------- Gentle reveal on scroll (off for people who prefer less motion) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Leaves (from the IBDA brand post) ----------
   Thin line-art leaves in a corner of a few sections. Decorative only: faint, behind the
   content, never clickable. In Arabic they move to the opposite side (mirrored). */
.has-leaves {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.leaves {
  position: absolute;
  z-index: -1;
  width: auto;
  pointer-events: none;
  user-select: none;
}

/* Bottom corner on the reading-start side (left in English, right in Arabic). */
.leaves-hero,
.leaves-vision,
.leaves-contact,
.leaves-footer {
  bottom: 0;
  inset-inline-start: 0;
}
[dir="rtl"] .leaves-hero,
[dir="rtl"] .leaves-vision,
[dir="rtl"] .leaves-contact,
[dir="rtl"] .leaves-footer {
  transform: scaleX(-1);
}

.leaves-hero {
  height: 26rem;
  opacity: 0.09;
}

.leaves-vision {
  height: 22rem;
  opacity: 0.12;
}

/* Contact: fills the empty space under the contact details. */
.leaves-contact {
  height: 26rem;
  opacity: 0.14;
}

.leaves-footer {
  height: 11rem;
  opacity: 0.14;
}

.footer-tagline {
  color: var(--mint);
  font-weight: 500;
}

/* Phones: smaller and fainter, and none in the top section where the text is. */
@media (max-width: 55.99rem) {
  .leaves-hero {
    display: none;
  }
  .leaves-vision,
  .leaves-contact {
    height: 13rem;
    opacity: 0.1;
  }
  .leaves-footer {
    height: 8rem;
  }
}

/* ---------- Parent company in the footer (Success Step) ---------- */
.footer-parent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-block: 0.5rem;
}

.parent-logo {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
}

.footer-inner .parent-logo img {
  height: 2.75rem;
  width: auto;
}

/* The slogan: centred on its own row at the top of the footer, larger and bolder. */
.footer-slogan {
  margin-bottom: 2rem;
  text-align: center;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--mint);
  text-wrap: balance;
}
