/* Usratul Quraniyya website styles */

:root {
  --bg: #FBF8F1;
  --surface: #FFFFFF;
  --surface-2: #F3EEE2;
  --ink: #13261F;
  --ink-soft: #4A5A52;
  --line: #E4DCCB;
  --brand: #0E4A37;
  --brand-2: #0B3B2C;
  --brand-ink: #FFFFFF;
  --gold: #B08A3A;
  --gold-text: #86621E;
  --gold-soft: #F4EAD2;
  --focus: #C9A24B;
  --success: #1B7A4E;
  --danger: #B3261E;
  --shadow: 0 1px 2px rgba(19, 38, 31, .06), 0 8px 24px rgba(19, 38, 31, .08);
  --shadow-lg: 0 20px 50px rgba(19, 38, 31, .16);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ar: "Amiri", "Traditional Arabic", "Scheherazade New", serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23B08A3A' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M40 8l9.4 22.6L72 40l-22.6 9.4L40 72l-9.4-22.6L8 40l22.6-9.4z'/%3E%3Crect x='20' y='20' width='40' height='40' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #07130F;
  --surface: #0D1F18;
  --surface-2: #122A21;
  --ink: #F3EDE0;
  --ink-soft: #B9B4A6;
  --line: #1F3A2F;
  --brand: #C9A24B;
  --brand-2: #DDBA68;
  --brand-ink: #10180F;
  --gold: #C9A24B;
  --gold-text: #DDBA68;
  --gold-soft: #1C2A1A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
.icon { width: 20px; height: 20px; flex: none; }
.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
[lang="ar"] { font-family: var(--font-ar); }

/* Skip link */
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 1000;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; color: var(--brand-ink); }
main:focus { outline: none; }

/* Scroll progress and navigation loader */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 900; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--gold), var(--brand)); }
.nav-loader { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 950; pointer-events: none; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
.nav-loader.is-active { opacity: 1; animation: navload 2.5s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes navload { from { transform: scaleX(0); } to { transform: scaleX(.9); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.35em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn .icon { transition: transform .18s ease; }
.btn:hover .i-arrow { transform: translateX(3px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); color: var(--brand-ink); }
.btn-gold { background: var(--gold); color: #14120B; }
.btn-gold:hover { background: #C9A24B; color: #14120B; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--ink); background: var(--gold-soft); }
.btn-outline-light { background: transparent; color: #F5EFE3; border-color: rgba(245, 239, 227, .45); }
.btn-outline-light:hover { background: rgba(245, 239, 227, .1); color: #fff; border-color: #F5EFE3; }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .btn-label::after {
  content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .6em; vertical-align: -.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .18s, border-color .18s, transform .18s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); transform: translateY(-1px); }

/* Sticky header */
.site-header {
  position: sticky; top: 0; z-index: 800;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: flex; flex: none; }
.logo { width: 200px; height: auto; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem;
  transition: background-color .18s, color .18s;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--gold-text); background: var(--gold-soft); }
.nav-mobile-actions { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.menu-toggle { display: none; }
.menu-toggle .i-close, .menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 1180px) {
  .hide-md { display: none; }
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; margin: 0; padding: 20px 16px 32px;
    background: var(--bg); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s linear .2s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 14px 16px; font-size: 1.15rem; border-radius: var(--radius-sm); }
  .nav-mobile-actions { display: grid; gap: 10px; margin-top: 20px; }
  .header-actions { margin-left: auto; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .logo { width: 158px; }
  .header-inner { gap: 8px; }
}

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 990; background: rgba(4, 12, 9, .55);
  display: grid; align-items: start; justify-items: center; padding: 12vh 16px 16px;
  animation: fade .18s ease;
}
.search-overlay[hidden] { display: none; }
.search-panel {
  width: min(680px, 100%); display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 10px 10px 18px; box-shadow: var(--shadow-lg);
  animation: pop .2s ease;
}
.search-panel input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.15rem; padding: 10px 0; color: var(--ink); }
.search-panel input:focus { outline: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* Breadcrumbs */
.breadcrumbs { padding-top: 18px; font-size: .92rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-text); text-decoration: underline; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text);
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); opacity: .9; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero .bismillah { text-align: left; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--gold-text); margin-bottom: 12px; line-height: 1.6; }
.hero h1 .accent { color: var(--gold-text); font-style: italic; }
.hero .lead { max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: var(--ink-soft); font-size: .98rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--success); }
[data-theme="dark"] .hero-points .icon { color: var(--gold); }
.hero-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.hero-art .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.hero-art .ring-2 { inset: 8%; border-style: dashed; animation: spin 90s linear infinite; }
.hero-art .ring-3 { inset: 16%; background: radial-gradient(circle, var(--surface) 0%, color-mix(in srgb, var(--surface) 40%, transparent) 70%); border: 0; box-shadow: var(--shadow-lg); }
.hero-art img { position: relative; width: 56%; animation: rise .9s ease both; }
.hero-art .emblem-dark { display: none; }
[data-theme="dark"] .hero-art .emblem-light { display: none; }
[data-theme="dark"] .hero-art .emblem-dark { display: block; }
.hero-badge {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.hero-badge .icon { color: var(--gold); }
.hero-badge.b1 { top: 12%; left: -4%; }
.hero-badge.b2 { bottom: 14%; right: -4%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { max-width: 220px; order: -1; }
  .hero-badge { display: none; }
}

/* Page hero (inner pages) */
.page-hero { position: relative; padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.page-hero .container { position: relative; }
.page-hero h1 { max-width: 860px; }
.page-hero .lead { max-width: 720px; }
.page-hero .arabic-title { font-size: 1.8rem; color: var(--gold-text); margin-bottom: 6px; }

/* Cards and grids */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.card-link .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link h3 a { color: var(--ink); text-decoration: none; }
.card-link:hover h3 a { color: var(--gold-text); }
.card-icon {
  display: inline-grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border-radius: 14px;
  background: var(--gold-soft); color: var(--gold-text);
}
.card-icon .icon { width: 24px; height: 24px; }
.card .ar { display: block; font-size: 1.25rem; color: var(--gold-text); margin-bottom: 4px; }
.card-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 600; color: var(--gold-text); font-size: .95rem; }
.card-link:hover .card-more .icon { transform: translateX(3px); }
.card-more .icon { width: 16px; height: 16px; transition: transform .18s; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: step; position: relative; padding-top: 58px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 1.2rem var(--font-head);
}
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--success); margin-top: 4px; }
[data-theme="dark"] .check-list .icon { color: var(--gold); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.quote-panel { background: var(--brand-2); color: #F5EFE3; border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); background-image: var(--pattern); }
[data-theme="dark"] .quote-panel { background-color: #0E2A20; }
.quote-panel p { color: #E6DFCF; }
.quote-panel .ar { font-size: clamp(1.6rem, 3vw, 2.2rem); color: #DDBA68; line-height: 1.8; }

/* Topic list on course pages */
.topic-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; counter-reset: t; }
.topic-list li { counter-increment: t; display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.topic-list li::before { content: counter(t, decimal-leading-zero); font: 700 1.05rem var(--font-head); color: var(--gold-text); }
@media (max-width: 640px) { .topic-list { grid-template-columns: 1fr; } }

/* FAQ */
.faq-group + .faq-group { margin-top: 40px; }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); box-shadow: var(--shadow); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.faq-item summary:hover h3 { color: var(--gold-text); }
.faq-chevron { transition: transform .25s ease; color: var(--gold-text); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; color: var(--ink-soft); }
.faq-item[open] .faq-answer { animation: faqIn .25s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }
.faq-tools { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 14px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: .97rem; }
.field .req { color: var(--danger); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .field input[type="search"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); }
.field .hint { font-size: .88rem; color: var(--ink-soft); margin: 6px 0 0; }
.field .error-text { font-size: .88rem; color: var(--danger); margin: 6px 0 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 500 !important; margin: 0 !important; transition: border-color .18s, background-color .18s; }
.choice:hover { border-color: var(--gold); }
.choice:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px !important; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.password-toggle:hover { transform: translateY(-50%); }
.password-toggle .i-hide, .password-toggle[aria-pressed="true"] .i-show { display: none; }
.password-toggle[aria-pressed="true"] .i-hide { display: block; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; border: 1px solid; }
.alert.success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.alert.error { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.alert .icon { margin-top: 3px; }
.alert p { margin: 0; }
.form-note { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: .92rem; }
.form-note.success { color: #BFE5C9; }
.form-note.error { color: #FFB4AB; }

/* Contact cards */
.contact-card { display: flex; gap: 16px; align-items: flex-start; }
.contact-card .card-icon { margin: 0; }
.contact-card h3 { font-size: 1.3rem; }

/* Search results */
.search-form-inline { display: flex; gap: 10px; margin-bottom: 28px; }
.search-form-inline input { flex: 1; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.result { padding: 18px 20px; }
.result h2 { font-size: 1.35rem; margin-bottom: 4px; }
.result h2 a { color: var(--ink); text-decoration: none; }
.result h2 a:hover { color: var(--gold-text); text-decoration: underline; }
.result .url { font-size: .85rem; color: var(--success); margin-bottom: 6px; }
[data-theme="dark"] .result .url { color: var(--gold); }
.result p { margin: 0; color: var(--ink-soft); }
mark { background: var(--gold-soft); color: inherit; padding: 0 2px; border-radius: 3px; }

/* Prose (policies) */
.prose h2 { font-size: 1.7rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.2em; }
.prose p, .prose li { color: var(--ink-soft); }

/* 404 */
.error-page { text-align: center; padding: clamp(60px, 10vw, 120px) 0; }
.error-code { font: 700 clamp(5rem, 16vw, 9rem)/1 var(--font-head); color: var(--gold); margin-bottom: 8px; }
.error-page .hero-actions { justify-content: center; }
.error-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }

/* CTA band and footer */
.cta-band { background: var(--brand-2); background-image: var(--pattern); color: #F5EFE3; padding: 56px 0; }
[data-theme="dark"] .cta-band { background-color: #0E2A20; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #FFFFFF; margin-bottom: 6px; }
.cta-band p { margin: 0; color: #D8D1C0; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer { background: #06120E; color: #C8C2B2; padding: 64px 0 24px; font-size: .97rem; }
.site-footer a { color: #E6DFCF; text-decoration: none; }
.site-footer a:hover { color: #DDBA68; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 210px; margin-bottom: 16px; }
.footer-title { font-family: var(--font-body); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: #DDBA68; margin-bottom: 16px; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-contact { margin-top: 18px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; word-break: break-all; }
.arabic-quote { font-size: 1.6rem; color: #DDBA68; margin: 16px 0 4px; }
.fine-print { font-size: .85rem; color: #8F9A8E; margin: 8px 0 0; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; min-height: 46px; border-radius: 999px; border: 1px solid #2A4439; background: #0D1F18; color: #F5EFE3; padding: 0 18px; font: inherit; }
.input-row input:focus { outline: none; border-color: #C9A24B; }
@media (max-width: 380px) { .input-row { flex-direction: column; } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid #1B3129; margin-top: 48px; padding-top: 20px; font-size: .88rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }

/* Floating contact button */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 850; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab-btn {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: #1FA855; color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); transition: transform .2s, box-shadow .2s;
}
.fab-btn:hover { transform: scale(1.07); box-shadow: 0 14px 34px rgba(0, 0, 0, .3); }
.fab-btn .icon { width: 26px; height: 26px; }
.fab-btn .i-close, .fab-btn[aria-expanded="true"] .i-open { display: none; }
.fab-btn[aria-expanded="true"] .i-close { display: block; }
.fab-menu { display: grid; gap: 8px; animation: pop .2s ease; }
.fab-menu[hidden] { display: none; }
.fab-menu a {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 999px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; font-weight: 600; transition: transform .18s, border-color .18s;
}
.fab-menu a:hover { transform: translateX(-4px); border-color: var(--gold); color: var(--ink); }

/* Back to top */
.to-top {
  position: fixed; right: 26px; bottom: 90px; z-index: 840; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility 0s linear .2s, border-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s, border-color .2s; }
.to-top:hover { border-color: var(--gold); color: var(--gold-text); }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; bottom: 16px; z-index: 860; width: min(440px, calc(100% - 100px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-lg);
  font-size: .93rem; animation: pop .25s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 12px; color: var(--ink-soft); }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 560px) { .cookie-banner { width: calc(100% - 32px); bottom: 88px; } }

/* Confirmation modal */
.modal { border: 0; padding: 0; border-radius: var(--radius); width: min(460px, calc(100% - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(4, 12, 9, .55); }
.modal[open] { animation: pop .2s ease; }
.modal form { padding: 26px; }
.modal-title { font-size: 1.6rem; }
.modal p { color: var(--ink-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .fab, .to-top, .cookie-banner, .cta-band, .scroll-progress, .site-footer { display: none !important; }
}
.page-hero .arabic-title, .card .ar { text-align: left; }

/* Blog */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; transition: border-color .18s, background-color .18s; }
.chip span { color: var(--ink-soft); font-size: .85em; }
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip[aria-current="page"] span { color: inherit; opacity: .8; }
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-thumb { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb-empty { display: grid; place-items: center; background: var(--gold-soft); background-image: var(--pattern); }
.post-thumb-empty img { width: 90px; height: auto; object-fit: contain; }
.post-card:hover .post-thumb-empty img { transform: none; }
.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card-body .card-more { margin-top: auto; padding-top: 10px; }
.post-card-title { font-size: 1.45rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .88rem; color: var(--ink-soft); margin-bottom: 10px; }
.post-cat { color: var(--gold-text); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; text-decoration: none; }
a.post-cat:hover { text-decoration: underline; }
.post-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.post-author { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); margin: 0; }
.post-section { padding-top: 40px; }
.post-featured { width: 100%; border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow); }
.post-body { font-size: 1.1rem; line-height: 1.8; font-family: var(--font-body), "Amiri", serif; }
.post-body > div, .post-body div > div { margin-bottom: 1em; }
.post-body figure { margin: 24px 0; }
.post-body p, .post-body li { color: var(--ink); }
.post-body img { border-radius: var(--radius-sm); margin: 24px auto; }
.post-body blockquote { margin: 24px 0; padding: 16px 22px; border-left: 4px solid var(--gold); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-body [dir="rtl"], .post-body blockquote[dir="rtl"] { font-family: var(--font-ar); font-size: 1.35rem; line-height: 2; }
.post-body a { word-break: break-word; }
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.post-body pre { overflow-x: auto; background: var(--surface); padding: 14px; border-radius: var(--radius-sm); }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 24px 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.share { margin: 40px 0 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.post-cta h2 { font-size: 1.8rem; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 36px; }
