/* ============================================================
   Rûnak — minimal light magazine theme (RTL-first, LTR-ready)
   All spacing uses logical properties so the layout mirrors
   automatically when the document direction changes.
   ============================================================ */

:root {
  --bg: #fcfcfa;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #6b6560;
  --line: #e8e5e1;
  --accent: #b45309;
  --accent-2: #d97706;
  --accent-soft: #fdf3e3;
  --accent-ink: #92400e;
  --dark: #201c19;
  --dark-2: #2a2622;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 8px 24px rgba(28, 25, 23, 0.06);
  --font-body: 'Vazirmatn', 'Noto Kufi Arabic', Tahoma, 'Segoe UI', sans-serif;
  --font-head: 'Noto Kufi Arabic', 'Vazirmatn', Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.9;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body { font-family: 'Inter', 'Segoe UI', sans-serif; line-height: 1.7; letter-spacing: -0.005em; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -0.02em; line-height: 1.2; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.6; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] h4 { font-family: 'Inter', sans-serif; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: #f6e4c3; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1160px, 92%) ; margin-inline: auto; }

/* ---------- Occasion banner ---------- */

.occasion-banner {
  padding: 0.75rem 1.2rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.98rem;
}
.occasion-banner.c-amber { background: #fdf3e3; color: #92400e; border-bottom: 1px solid #f3e0bd; }
.occasion-banner.c-newroz { background: linear-gradient(90deg, #dc2626, #16a34a, #eab308); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
.occasion-banner.c-green { background: #dcfce7; color: #166534; border-bottom: 1px solid #bbf7d0; }
.occasion-banner.c-dark { background: #201c19; color: #fde68a; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 252, 250, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 74px; }

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { width: 36px; height: 36px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; }
html[lang="en"] .brand-name { font-family: 'Inter', sans-serif; letter-spacing: -0.02em; }
.brand-tag { display: block; font-size: 0.72rem; color: var(--muted); margin-top: -4px; }

.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 1.7rem; list-style: none; }
.main-nav a {
  font-size: 0.95rem; font-weight: 500; color: var(--muted);
  padding-block: 0.3rem; transition: color 0.2s;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); border-bottom: 2px solid var(--accent); }

.lang-btn {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 0.42em 1.15em;
  font-size: 0.88rem; font-weight: 600; color: var(--accent-ink);
  transition: border-color 0.2s, background 0.2s;
}
.lang-btn:hover { border-color: var(--accent-2); background: var(--accent-soft); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); align-items: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  border-radius: 999px; padding: 0.72em 1.7em;
  font-size: 0.95rem; font-weight: 600; line-height: 1.6;
  border: 1px solid transparent; transition: all 0.2s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-ink); background: var(--accent-soft); }

/* ---------- Page head (inner pages) ---------- */

.page-head { padding: 4rem 0 2.2rem; border-bottom: 1px solid var(--line); }
.page-head .kicker { margin-bottom: 0.8rem; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.page-head .lead { color: var(--muted); max-width: 620px; margin-top: 0.9rem; font-size: 1.05rem; }

.kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  color: var(--accent-ink); letter-spacing: 0.06em;
}
.kicker::before {
  content: ""; display: inline-block; width: 26px; height: 2px;
  background: var(--accent-2); vertical-align: middle;
  margin-inline-end: 0.6rem; border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero { padding: 4.2rem 0 4.6rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.5; margin: 0.9rem 0 1.1rem; }
html[lang="en"] .hero h1 { line-height: 1.15; }
.hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }

.hero-art {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.hero-art img { width: 100%; height: auto; }

/* ---------- Sections ---------- */

.section { padding: 3.4rem 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2.1rem;
}
.section-head h2 { font-size: 1.55rem; }
.section-head .more { font-size: 0.92rem; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Article cards ---------- */

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.6rem; }

.card-article {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.card-article:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card-article:hover .card-media img { transform: scale(1.04); }

.chip-cat {
  position: absolute; inset-inline-start: 12px; top: 12px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(4px);
  color: var(--accent-ink); font-size: 0.76rem; font-weight: 700;
  padding: 0.28em 0.9em; border-radius: 999px;
}

.card-body { padding: 1.15rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card-body h3 { font-size: 1.06rem; line-height: 1.7; }
html[lang="en"] .card-body h3 { line-height: 1.35; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { color: var(--muted); font-size: 0.93rem; flex: 1; }

.card-meta {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; color: var(--muted);
}
.card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ---------- Featured video ---------- */

.featured-video {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 2.6rem; align-items: center;
}
.video-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); cursor: pointer; }
.video-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.play-btn {
  position: absolute; inset: 0; margin: auto;
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 30px rgba(28, 25, 23, 0.35);
  transition: transform 0.2s, background 0.2s;
}
.play-btn:hover { transform: scale(1.08); background: #fff; }
.play-btn svg { width: 22px; height: 22px; fill: var(--ink); margin-inline-start: 3px; }
html[dir="rtl"] .play-btn svg { transform: scaleX(-1); margin-inline-start: 0; margin-inline-end: 3px; }

.video-card-caption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 2.6rem 1.4rem 1.1rem;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.72), transparent);
  color: #fff; font-weight: 600; font-size: 1rem;
}

.featured-video .info h2 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.featured-video .info p { color: var(--muted); margin-bottom: 1.4rem; }

/* ---------- Topics ---------- */

.topics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.topic-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.35rem 1.2rem; text-align: center;
  font-weight: 700; transition: all 0.2s;
}
.topic-card:hover { border-color: var(--accent-2); background: var(--accent-soft); color: var(--accent-ink); transform: translateY(-3px); }
.topic-card span { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-top: 0.2rem; }

/* ---------- CTA strip ---------- */

.cta-strip {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: 2.8rem 3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap;
}
.cta-strip h2 { font-size: 1.45rem; margin-bottom: 0.4rem; }
.cta-strip p { color: var(--muted); }
.newsletter-form { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.newsletter-form input {
  min-width: 250px; padding: 0.8em 1.2em; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg); font: inherit; font-size: 0.95rem;
}
.newsletter-form input:focus { border-color: var(--accent-2); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Filter chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.8rem 0 2.3rem; }
.chip {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 0.45em 1.25em;
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  transition: all 0.2s;
}
.chip:hover { border-color: var(--accent-2); color: var(--accent-ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Article page ---------- */

.article-wrap { max-width: 760px; margin-inline: auto; padding: 3.2rem 0 1rem; }
.article-hero { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); margin: 1.8rem 0 2.2rem; }
.article-hero img { width: 100%; }
.article-wrap h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.65; }
html[lang="en"] .article-wrap h1 { line-height: 1.25; }

.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem; color: var(--muted); font-size: 0.88rem; margin-top: 1rem; }
.article-meta .chip-cat { position: static; }

.article-body { max-width: 700px; margin-inline: auto; font-size: 1.05rem; }
.article-body p { margin-bottom: 1.5rem; }
.article-body p:first-of-type::first-letter {
  font-family: var(--font-head); font-weight: 700; color: var(--accent);
  font-size: 3.1em; float: inline-start; line-height: 1;
  padding-inline-end: 0.12em; padding-top: 0.06em;
}

.article-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border-block: 1px solid var(--line); padding: 1.4rem 0; margin-top: 2.5rem;
  max-width: 700px; margin-inline: auto;
}

.back-link { font-weight: 600; color: var(--accent-ink); font-size: 0.95rem; }
.back-link:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Media page ---------- */

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); cursor: zoom-in; aspect-ratio: 4 / 3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 2rem 1.1rem 0.85rem;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.72), transparent);
  color: #fff; font-size: 0.88rem; font-weight: 600;
}

.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }

/* ---------- Lightbox & video modal ---------- */

.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 21, 19, 0.93);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; animation: fadeIn 0.25s ease;
}
.overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }

.lightbox-fig { max-width: min(920px, 100%); }
.lightbox-fig img { width: 100%; border-radius: var(--radius); }
.lightbox-fig figcaption { color: #e7e5e4; text-align: center; padding-top: 1rem; font-weight: 600; }

.overlay-close {
  position: absolute; top: 1.3rem; inset-inline-end: 1.6rem;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); border: none; color: #fff;
  font-size: 1.4rem; line-height: 1; transition: background 0.2s;
}
.overlay-close:hover { background: rgba(255, 255, 255, 0.25); }

.overlay-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); border: none; color: #fff;
  font-size: 1.3rem; transition: background 0.2s;
}
.overlay-nav:hover { background: rgba(255, 255, 255, 0.25); }
.overlay-prev { inset-inline-start: 1.6rem; }
.overlay-next { inset-inline-end: 1.6rem; }

.video-modal-box {
  width: min(960px, 100%); aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius); overflow: hidden; position: relative;
}
.video-modal-box iframe { width: 100%; height: 100%; border: 0; }
.video-modal-box img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.video-modal-note {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.8rem;
  color: #f5f5f4; text-align: center; padding: 2rem;
}
.video-modal-note strong { font-size: 1.1rem; }

/* ---------- About page ---------- */

.about-lead { max-width: 780px; margin-inline: auto; text-align: center; font-size: 1.15rem; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; margin-top: 2.4rem; }
.about-cols h2 { font-size: 1.3rem; margin-bottom: 0.9rem; }
.about-cols p { color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat-card { text-align: center; padding: 1.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-card .num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--accent); }
html[lang="en"] .stat-card .num { font-family: 'Inter', sans-serif; }
.stat-card .lbl { color: var(--muted); font-size: 0.9rem; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.value-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.7rem 1.6rem; }
.value-card .icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.value-card .icon svg { width: 22px; height: 22px; stroke: var(--accent-ink); }
.value-card h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.value-card p { color: var(--muted); font-size: 0.93rem; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.team-card { text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.8rem 1.2rem; }
.avatar {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 0.9rem;
  background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 700; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; /* team photos fill the circle */
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1rem; }
.team-card span { color: var(--muted); font-size: 0.87rem; }

/* ---------- Contact page ---------- */

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3rem; align-items: start; }
.info-card { display: flex; gap: 1rem; align-items: flex-start; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.info-card .icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.info-card .icon svg { width: 21px; height: 21px; stroke: var(--accent-ink); }
.info-card h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.info-card p, .info-card a { color: var(--muted); font-size: 0.93rem; }
.info-card a:hover { color: var(--accent); }

.contact-form { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg); padding: 2.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-field { margin-bottom: 1.2rem; }
.form-field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.45rem; }
.form-field input, .form-field textarea {
  width: 100%; padding: 0.8em 1.05em; font: inherit; font-size: 0.96rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--accent-2); outline: none; box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-error { color: #b91c1c; font-size: 0.88rem; margin-top: 0.6rem; display: none; }
.form-error.show { display: block; }
.form-success {
  display: none; align-items: center; gap: 0.6rem;
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
  border-radius: 12px; padding: 0.9em 1.2em; font-size: 0.95rem; margin-bottom: 1.2rem;
}
.form-success.show { display: flex; }

/* ---------- Footer ---------- */

.site-footer { background: var(--dark); color: #d6d3d1; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1fr; gap: 2.8rem; padding: 3.4rem 0 2.6rem; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: #a8a29e; }
.footer-about { color: #a8a29e; font-size: 0.94rem; margin-top: 1rem; max-width: 340px; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { color: #a8a29e; font-size: 0.93rem; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }

.footer-news p { color: #a8a29e; font-size: 0.9rem; margin-bottom: 1rem; }
.footer-news form { display: flex; gap: 0.6rem; }
.footer-news input {
  flex: 1; min-width: 0; padding: 0.7em 1.1em; border-radius: 999px;
  border: 1px solid #44403c; background: var(--dark-2); color: #fff; font: inherit; font-size: 0.9rem;
}
.footer-news input::placeholder { color: #78716c; }
.footer-news button {
  border: none; border-radius: 999px; padding: 0.7em 1.4em;
  background: var(--accent-2); color: #fff; font-weight: 600; font-size: 0.9rem; transition: background 0.2s;
}
.footer-news button:hover { background: var(--accent); }

.footer-social { display: flex; gap: 0.7rem; margin-top: 1.3rem; }
.footer-social a { display: flex; }
.footer-social a[hidden] { display: none; }
.footer-social a:hover { background: var(--accent-2); }
.footer-social svg { width: 17px; height: 17px; fill: #d6d3d1; }

.footer-bottom {
  border-top: 1px solid #3a3531; padding: 1.4rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: #a8a29e;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed; bottom: 1.6rem; inset-inline-start: 50%; transform: translate(50%, 20px);
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 0.75em 1.6em; font-size: 0.92rem; z-index: 200;
  opacity: 0; pointer-events: none; transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.3);
}
html[dir="ltr"] .toast { transform: translate(-50%, 20px); }
.toast.show { opacity: 1; transform: translate(50%, 0); }
html[dir="ltr"] .toast.show { transform: translate(-50%, 0); }

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Empty state ---------- */

.empty-note { color: var(--muted); text-align: center; padding: 2.5rem 0; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero { padding: 3rem 0 3.4rem; }
  .featured-video { grid-template-columns: 1fr; gap: 1.6rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .about-cols { grid-template-columns: 1fr; }
  .stats-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .header-inner { gap: 1rem; flex-wrap: wrap; }
  .brand-tag { display: none; }
  /* search drops onto its own full-width row under the logo row */
  .search-box { order: 9; flex: 1 1 100%; margin-inline-start: 0; }
  .search-box input { width: 100%; flex: 1; }
  .main-nav {
    position: absolute; top: 100%; inset-inline: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0 4%; max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease; margin-inline-start: 0;
  }
  .menu-open .main-nav { max-height: 420px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 0.6rem 0 1rem; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav li:last-child { border-bottom: none; }
  .main-nav a { display: block; padding: 0.85rem 0.2rem; font-size: 1rem; }

  .values-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-strip { padding: 2rem 1.5rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-grid, .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .overlay-nav { display: none; }
}

/* ============================================================
   Header search (magnifier) — all pages
   ============================================================ */

.search-box {
  position: relative;
  margin-inline-start: auto;
  display: flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); padding: 0.32em 0.5em 0.32em 1em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
html[dir="rtl"] .search-box { padding: 0.32em 1em 0.32em 0.5em; }
.search-box:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { flex: none; width: 17px; height: 17px; stroke: var(--muted); order: 2; }
html[dir="ltr"] .search-icon { order: 0; }
.search-box input {
  border: none; outline: none; background: transparent;
  font: inherit; font-size: 0.9rem; color: var(--ink);
  width: 150px; transition: width 0.25s;
  order: 1;
}
.search-box input:focus { width: 200px; }
.search-box input::placeholder { color: var(--muted); }

.search-drop {
  position: absolute; top: calc(100% + 10px);
  inset-inline-end: 0; width: min(380px, 86vw);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; z-index: 60;
  max-height: 380px; overflow-y: auto;
}
.search-drop a {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.75rem 1.1rem; font-weight: 600; font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
}
.search-drop a:last-child { border-bottom: none; }
.search-drop a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.search-drop .sr-meta { font-weight: 500; font-size: 0.78rem; color: var(--muted); }
.search-drop .sr-empty { padding: 1rem 1.1rem; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 960px) {
  .search-box { margin-inline-start: 0; flex: 1; }
  .search-box input { width: 100%; }
}

/* ============================================================
   Homepage ads — distinct horizontal band, media + text side by side
   ============================================================ */

.ads-section { padding: 2.4rem 0; background: var(--surface); border-block: 1px solid var(--line); }
.ads-label {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.15em 0.9em; margin-bottom: 1rem;
}
.ads-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.ads-card {
  display: grid; grid-template-columns: minmax(220px, 380px) 1fr;
  min-height: 200px; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.ads-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-2); }
.ads-media { display: block; background: var(--surface); }
.ads-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ads-body {
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
  padding: 1.4rem 1.7rem;
}
.ads-title { font-family: var(--font-head); font-size: 1.2rem; color: var(--ink); }
.ads-desc { color: var(--muted); font-size: 0.97rem; line-height: 1.9; }
.ads-cta { margin-top: 0.4rem; color: var(--accent-ink); font-weight: 700; font-size: 0.9rem; }
.ads-card:hover .ads-cta { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 700px) {
  .ads-card { grid-template-columns: 1fr; min-height: 0; }
  .ads-media img { aspect-ratio: 3 / 1; }
  .ads-body { padding: 1.1rem 1.3rem; }
}

/* ============================================================
   View counters & likes
   ============================================================ */

.views { display: none; color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.views.show { display: inline-flex; align-items: center; }
.search-drop .views, .card-meta .views.show { display: inline-flex; }

.like-btn {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 0.3em 1.1em;
  font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--muted);
  transition: all 0.2s;
}
.like-btn:hover { border-color: var(--accent-2); color: var(--accent-ink); background: var(--accent-soft); }
.like-btn.liked { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent-ink); }
.like-btn.liked .like-heart { color: #dc2626; }
.lightbox-fig figcaption { display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.lightbox-fig .sr-views { color: #a8a29e; font-size: 0.85rem; font-weight: 500; }

/* ============================================================
   Modern larger hero (homepage) — text over art, roomier grid
   ============================================================ */

.hero { padding: 3.2rem 0 4.6rem; }
.hero-grid { grid-template-columns: 0.95fr 1.05fr; gap: 3rem; }
.hero-art {
  position: relative; border-radius: var(--radius-lg);
  box-shadow: 0 14px 44px rgba(28, 25, 23, 0.14);
  border: none;
  min-height: 420px;
  display: flex; align-items: stretch;
}
.hero-art img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit; min-height: inherit;
}

@media (max-width: 960px) {
  .hero-art { min-height: 300px; }
}

/* ============================================================
   Occasion banner — full-width top bar (previous size).
   RTL space-between: banner text pinned RIGHT, GIF pinned far LEFT.
   ============================================================ */

.occasion-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.4rem; flex-wrap: wrap;
  /* generous side padding so text and GIF stay well inside the frame */
  padding: 1.6rem clamp(2rem, 6vw, 6.5rem);
  font-size: 1.35rem;
  font-weight: 900;
  font-family: 'Noto Kufi Arabic', Tahoma, sans-serif;
}
.occasion-banner .ob-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word; /* long banner text wraps instead of overflowing */
}
.occasion-banner .ob-gif {
  flex: none;
  margin-inline-start: auto; /* stays pinned to the far left even when wrapped */
  max-height: 100px;
  width: auto;
  max-width: 26%;
  object-fit: contain;
}

@media (max-width: 700px) {
  .occasion-banner { padding: 1.2rem 1.6rem; font-size: 1.15rem; }
  .occasion-banner .ob-gif { max-height: 80px; max-width: 40%; }
}

/* ============================================================
   Message to viewers — homepage block (image beside text)
   ============================================================ */

.message-section { padding: 0.6rem 0 1rem; }
.message-card {
  display: grid; grid-template-columns: minmax(220px, 380px) 1fr;
  gap: 1.6rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.message-media img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; display: block; }
.message-body { padding: 1.9rem 2.1rem; }
.message-title { font-family: var(--font-head); font-size: 1.45rem; margin-bottom: 0.6rem; }
.message-text { color: var(--muted); white-space: pre-line; font-size: 1rem; }

@media (max-width: 700px) {
  .message-card { grid-template-columns: 1fr; gap: 1rem; }
  .message-media img { min-height: 0; aspect-ratio: 3 / 1; }
  .message-body { padding: 1.2rem 1.4rem; }
}

/* ============================================================
   Team cards — photo, name, role + bio/resume text
   ============================================================ */

.team-grid { grid-template-columns: repeat(2, 1fr); }
.team-card { text-align: center; padding-bottom: 1.6rem; }
.team-bio {
  color: var(--muted); font-size: 0.92rem; line-height: 1.9;
  text-align: start; white-space: pre-line;
  border-top: 1px solid var(--line); margin-top: 0.8rem; padding: 0.8rem 0.4rem 0;
}

/* ============================================================
   Author box on the article page
   ============================================================ */

.author-box {
  display: flex; align-items: center; gap: 0.9rem;
  max-width: 700px; margin: 0 auto 1.6rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.75rem 1.2rem;
}
.author-img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: none; }
.author-label { display: block; font-size: 0.74rem; color: var(--muted); }
.author-name { display: block; font-weight: 700; font-family: var(--font-head); }

/* ============================================================
   Share buttons — video cards, modal, lightbox
   ============================================================ */

.card-share {
  position: absolute; inset-inline-end: 10px; top: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.92);
  color: var(--ink); font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s, color 0.2s;
}
.card-share:hover { transform: scale(1.12); color: var(--accent-ink); }

.overlay-share {
  position: absolute; top: 1.3rem; inset-inline-end: 5.6rem;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); border: none;
  color: #fff; font-size: 1.2rem; cursor: pointer;
  transition: background 0.2s;
}
.overlay-share:hover { background: rgba(255, 255, 255, 0.25); }

/* must come after the desktop search rules above so mobile wins the cascade */
@media (max-width: 700px) {
  .search-box { flex: 1 1 100%; }
  .search-box input, .search-box input:focus { width: 100%; flex: 1; }
}

/* ============================================================
   Bottom ad (above the footer) — image or video.
   Horizontally it matches the site's content box (same left/right
   edges as the top ads), while keeping its own height.
   ============================================================ */

.bottom-ad {
  display: block;
  width: min(1160px, 92%);
  margin: 3rem auto 0;
}
.bottom-ad[hidden] { display: none; }
.bottom-ad a { display: block; }
.bottom-ad img, .bottom-ad video {
  display: block; width: 100%;
  max-height: 240px; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--radius);
}
/* when the ad directly precedes the footer, drop the footer's top gap */
.bottom-ad + .site-footer { margin-top: 0; }
