/* =========================================================
   SOOF — soof.alsadu.org.kw
   A chapter of Al Sadu Society. Derived, quieter look:
   off-white canvas · black calligraphy · serif headlines ·
   mustard/gold for the active nav only.
   ========================================================= */

/* ---------- Fonts (local) ---------- */
@font-face {
  font-family: "Merchant";
  src: url("fonts/Merchant-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Merchant";
  src: url("fonts/Merchant-RegularItalic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Merchant";
  src: url("fonts/Merchant-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Merchant";
  src: url("fonts/Merchant-BoldItalic.otf") format("opentype");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "29LT Kaff";
  src: url("fonts/29LT_Kaff.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "29LT Kaff";
  src: url("fonts/29LT_Kaff_Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "29LT Kaff";
  src: url("fonts/29LT_Kaff_Semibold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "29LT Kaff";
  src: url("fonts/29LT_Kaff_Black.ttf") format("truetype");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/IBMPlexSansArabic-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/IBMPlexSansArabic-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --clr-ink: #1c1917;
  --clr-body: #44403c;
  --clr-muted: #78716c;
  --clr-sand: #f5f5f4;
  --clr-sand-2: #e7e5e4;
  --clr-line: #d6d3d1;
  --clr-gold: #c2a23c;
  --clr-gold-dark: #9e7d2a;
  --clr-white: #ffffff;
  --clr-canvas: #fafaf9;
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, .08);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, .12);
  --radius: 10px;
  --radius-lg: 18px;
  --maxw: 1200px;
  --font-sans: "Inter", "Geist", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Merchant", "Instrument Serif", Georgia, serif;
  --font-ar: "29LT Kaff", "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
  --tr: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--clr-body);
  line-height: 1.7;
  background: var(--clr-canvas);
  -webkit-font-smoothing: antialiased;
}
[lang="ar"], [dir="rtl"] { font-family: var(--font-ar); }
[dir="rtl"] body { line-height: 1.9; }
img { max-width: 100%; display: block; }
a { color: var(--clr-ink); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--clr-gold-dark); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--clr-ink);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 600;
}
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4,
[lang="ar"] h5, [lang="ar"] h6,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] h5, [dir="rtl"] h6 { font-family: var(--font-ar); font-weight: 800; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.4em; }
li { margin-bottom: .35em; }
small { font-size: .85em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 4.5rem 0; }
.section-sand { background: var(--clr-sand); }
.section-dark { background: var(--clr-ink); color: rgba(255,255,255,.85); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-tight { padding: 2.5rem 0; }

/* ---------- Buttons (outlined, ink on gold hover) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .7em 1.4em; border-radius: 0;
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  border: 1px solid currentColor; background: transparent;
  cursor: pointer; transition: all var(--tr); text-align: center;
  position: relative; text-decoration: none;
}
.btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .3em;
  height: 2px; background: currentColor; transform: scaleX(0);
  transform-origin: left; transition: transform var(--tr);
}
[dir="rtl"] .btn::after { transform-origin: right; }
.btn:hover::after { transform: scaleX(1); }
.btn-primary { color: var(--clr-ink); }
.btn-primary:hover { color: var(--clr-gold-dark); }
.btn-gold { color: var(--clr-gold-dark); }
.btn-gold:hover { color: var(--clr-ink); }
.btn-light { color: #fff; }
.btn-light:hover { color: var(--clr-gold); }
.btn-sm { padding: .5em 1em; font-size: .85rem; }
.btn-lg { padding: .8em 1.8em; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 249, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--clr-line);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: .6rem 0; }
.site-logo { display: inline-flex; align-items: center; }
.site-logo img { height: 46px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav > ul > li { position: relative; }
.main-nav a.nav-link {
  display: block; padding: .85rem .75rem;
  color: var(--clr-ink); font-weight: 600; font-size: .84rem; letter-spacing: .05em;
  border-bottom: 2px solid transparent;
}
[lang="ar"] .main-nav a.nav-link, [dir="rtl"] .main-nav a.nav-link { letter-spacing: 0; font-weight: 700; font-size: .95rem; }
.main-nav a.nav-link:hover { color: var(--clr-gold-dark); }
.main-nav a.nav-link.active { color: var(--clr-gold); border-bottom-color: var(--clr-gold); }
.main-nav .has-dropdown > a::after {
  content: ""; display: inline-block; margin-inline-start: 6px;
  width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform var(--tr);
}
.dropdown {
  position: absolute; top: 100%; inset-inline-start: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--clr-line); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md); padding: .5rem 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--tr); z-index: 60;
}
.main-nav li:hover > .dropdown, .main-nav li:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: .55rem 1.2rem; color: var(--clr-body); font-size: .88rem; font-weight: 500; }
.dropdown a:hover { color: var(--clr-gold-dark); background: var(--clr-sand); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--clr-ink); border: 1.5px solid var(--clr-line); border-radius: 50px; padding: .35rem .9rem; }
.lang-switch:hover { border-color: var(--clr-gold); color: var(--clr-gold-dark); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--clr-ink); border-radius: 2px; transition: var(--tr); }

/* Mobile menu */
.mobile-nav {
  position: fixed; inset: 0; background: rgba(28,25,23,.5); z-index: 90;
  opacity: 0; visibility: hidden; transition: var(--tr);
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav-panel {
  position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: min(320px, 86vw);
  background: #fff; overflow-y: auto; padding: 1rem;
  transform: translateX(-100%); transition: transform var(--tr); direction: ltr;
}
[dir="rtl"] .mobile-nav-panel { transform: translateX(100%); inset-inline-start: auto; inset-inline-end: 0; direction: rtl; }
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-panel ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav-panel a { display: block; padding: .7rem .4rem; color: var(--clr-ink); font-weight: 600; border-bottom: 1px solid var(--clr-sand-2); }
.mobile-nav-close { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--clr-ink); margin-bottom: .5rem; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; background: var(--clr-ink); color: #fff; min-height: clamp(420px, 66vh, 660px); display: flex; align-items: center; }
.hero > img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,25,23,.42), rgba(28,25,23,.6)); }
.hero-content { position: relative; z-index: 3; max-width: 760px; padding: 4.5rem 0; }
.hero-eyebrow { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--clr-gold); font-weight: 700; margin-bottom: 1rem; }
[lang="ar"] .hero-eyebrow, [dir="rtl"] .hero-eyebrow { letter-spacing: 0; text-transform: none; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1rem; }
.hero p { font-size: 1.08rem; color: rgba(255,255,255,.92); max-width: 60ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6rem; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--clr-sand); border-bottom: 1px solid var(--clr-line); padding: 3.5rem 0 2.6rem; }
.page-hero h1 { margin-bottom: .4rem; }
.page-hero p { color: var(--clr-muted); max-width: 60ch; }
.breadcrumb { font-size: .82rem; color: var(--clr-muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--clr-gold-dark); }
.breadcrumb a:hover { color: var(--clr-ink); }

/* ---------- Section headers ---------- */
.sec-head { max-width: 760px; margin: 0 auto 2.6rem; text-align: center; }
.sec-head .eyebrow {
  letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; font-weight: 700;
  color: var(--clr-gold); margin-bottom: .6rem;
}
[lang="ar"] .sec-head .eyebrow, [dir="rtl"] .sec-head .eyebrow { letter-spacing: 0; text-transform: none; }
.sec-head p { color: var(--clr-muted); font-size: 1.05rem; }
.sec-head.left { text-align: start; margin-inline-start: 0; margin-inline-end: auto; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--clr-line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--tr), box-shadow var(--tr); height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--clr-sand); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 1.4rem 1.5rem 1.6rem; }
.card-body h3 { margin-bottom: .4rem; }
.card-body h3 a { color: var(--clr-ink); }
.card-body h3 a:hover { color: var(--clr-gold-dark); }
.card-body .card-cat { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--clr-gold-dark); font-weight: 700; margin-bottom: .5rem; }
[lang="ar"] .card-body .card-cat, [dir="rtl"] .card-body .card-cat { letter-spacing: 0; text-transform: none; }
.card-body p { color: var(--clr-muted); font-size: .95rem; }
.card-link { font-weight: 600; font-size: .9rem; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Split feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.split.reverse > .split-media { order: 2; }
.split-media img { border-radius: var(--radius-lg); width: 100%; object-fit: cover; box-shadow: var(--shadow-md); }
.split-body h2 { margin-bottom: 1rem; }
.split-body .eyebrow { letter-spacing: .2em; text-transform: uppercase; font-size: .76rem; font-weight: 700; color: var(--clr-gold); margin-bottom: .6rem; }
[lang="ar"] .split-body .eyebrow, [dir="rtl"] .split-body .eyebrow { letter-spacing: 0; text-transform: none; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--clr-line); border-radius: var(--radius); padding: 1.5rem 1.2rem; text-align: center; }
.step .step-num { font-family: var(--font-serif); font-weight: 700; font-size: 2rem; color: var(--clr-gold); line-height: 1; margin-bottom: .5rem; }
[lang="ar"] .step .step-num, [dir="rtl"] .step .step-num { font-family: var(--font-ar); }
.step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.step p { color: var(--clr-muted); font-size: .88rem; margin-bottom: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; text-align: center; }
.stat { background: #fff; border: 1px solid var(--clr-line); border-radius: var(--radius); padding: 1.6rem 1rem; }
.stat .stat-num { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 700; color: var(--clr-ink); line-height: 1; }
[lang="ar"] .stat .stat-num, [dir="rtl"] .stat .stat-num { font-family: var(--font-ar); }
.stat .stat-label { margin-top: .5rem; color: var(--clr-muted); font-size: .9rem; font-weight: 600; }

/* ---------- Partner row ---------- */
.partners { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; }
.partners img { height: 46px; width: auto; }
.partners .partner-label { flex-basis: 100%; text-align: center; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--clr-muted); font-weight: 700; }
[lang="ar"] .partners .partner-label, [dir="rtl"] .partners .partner-label { letter-spacing: 0; text-transform: none; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-block { margin-bottom: 1.6rem; }
.contact-block h4 { margin-bottom: .3rem; }
.contact-block p { margin-bottom: .2rem; color: var(--clr-muted); }
.contact-block a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--clr-sand); color: var(--clr-body); border-top: 1px solid var(--clr-line); padding: 3.5rem 0 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.site-footer h4 { color: var(--clr-ink); font-size: 1.05rem; margin-bottom: 1rem; font-family: var(--font-sans); }
[lang="ar"] .site-footer h4, [dir="rtl"] .site-footer h4 { font-family: var(--font-ar); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: .6rem; }
.site-footer a { color: var(--clr-body); }
.site-footer a:hover { color: var(--clr-gold-dark); }
.footer-brand img { height: 52px; margin-bottom: 1rem; }
.footer-brand p { color: var(--clr-muted); }
.footer-project { display: flex; align-items: center; gap: 12px; margin-top: 1.2rem; color: var(--clr-muted); font-size: .82rem; }
.footer-project img { height: 44px; width: auto; }
.footer-social { display: flex; gap: 12px; margin-top: 1.2rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--clr-line); }
.footer-social a:hover { background: var(--clr-gold); border-color: var(--clr-gold); }
.footer-social svg { width: 15px; height: 15px; fill: var(--clr-ink); }
.footer-social a:hover svg { fill: #fff; }
.footer-bottom { border-top: 1px solid var(--clr-line); padding: 1.2rem 0; font-size: .82rem; color: var(--clr-muted); }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom a { color: var(--clr-muted); }

/* ---------- Misc ---------- */
.rule-gold { width: 60px; height: 4px; border-radius: 2px; background: var(--clr-gold); border: 0; margin: 1.4rem auto 0; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list li { background: #fff; border: 1px solid var(--clr-line); border-radius: 50px; padding: .5rem 1.1rem; font-size: .88rem; color: var(--clr-ink); }
.lead { font-size: 1.12rem; color: var(--clr-body); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split.reverse > .split-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .hero-content { padding: 3rem 0; }
}

/* ---------- RTL helpers ---------- */
[dir="rtl"] .dropdown { inset-inline-start: auto; inset-inline-end: 0; }