/* ─────────────────────────────────────────────────────────────
   Orthodox Youth Movement (MJO) - فرع برمانا
   Sub-brand: deep burgundy (logo) · warm ivory · soft gold · greys
   Youthful, modern, community-oriented - distinct yet harmonious.
   ───────────────────────────────────────────────────────────── */
:root {
  --mjo-accent: #6a1b30;         /* burgundy - overridden inline from admin */
  --mjo-accent-dark: #4a1120;
  --mjo-gold: #c9a84c;           /* soft Orthodox gold - decorative fills only */
  --mjo-gold-ink: #8a6a1a;       /* darker gold for SMALL text on ivory (≥4.5:1) */
  --mjo-gold-soft: #e7d4a6;
  --mjo-t: 250ms;
  --mjo-ease: cubic-bezier(.16,.84,.44,1);
  --mjo-focus-ring: 0 0 0 3px rgba(201,168,76,.55);
  --mjo-ivory: #faf6ef;          /* warm off-white */
  --mjo-cream: #f4ede1;
  --mjo-grey: #f4f5f7;           /* neutral grey background */
  --mjo-line: #ece7df;
  --mjo-ink: #2b232b;
  --mjo-slate: #6f6672;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Amiri", serif; direction: rtl; background: var(--mjo-ivory);
  color: var(--mjo-ink); -webkit-font-smoothing: antialiased; line-height: 1.9;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.6rem; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }

/* Logo - always crisp, centred, never stretched */
.mjo-logo { object-fit: contain; display: block; }

/* ── Navbar ── */
.mjo-nav { position: sticky; top: 0; z-index: 50; background: rgba(250,246,239,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--mjo-line); }
.mjo-nav .bar { height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mjo-brand { display: flex; align-items: center; gap: 13px; }
.mjo-brand .lg { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.mjo-brand .lg img { width: 100%; height: 100%; object-fit: contain; }
.mjo-brand .nm { font-weight: 700; font-size: 1.12rem; color: var(--mjo-accent); line-height: 1.25; }
.mjo-brand .tg { font-family: "Cormorant Garamond", serif; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mjo-slate); }
.mjo-links { display: flex; gap: 1.35rem; align-items: center; flex-wrap: wrap; }
.mjo-links a, .mjo-dd > span { font-size: .94rem; color: var(--mjo-ink); cursor: pointer; padding: .2rem 0; position: relative; transition: color .2s; }
.mjo-links a:hover, .mjo-links a.active, .mjo-dd > span.active,
.mjo-dd:hover > span, .mjo-dd:focus-within > span { color: var(--mjo-accent); }
.mjo-links a::after { content: ""; position: absolute; right: 0; bottom: -3px; height: 2px; width: 0; background: var(--mjo-gold); transition: width .25s; }
.mjo-links a:hover::after, .mjo-links a.active::after { width: 100%; }
.mjo-dd { position: relative; }
.mjo-dd .menu { position: absolute; top: 130%; right: 0; background: #fff; border: 1px solid var(--mjo-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(43,35,43,.12); padding: .5rem; min-width: 210px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s; z-index: 60; }
/* Opens on hover and on keyboard focus, so the submenu is reachable by tab. */
.mjo-dd:hover .menu,
.mjo-dd:focus-within .menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mjo-dd .menu a { display: block; padding: .55rem .8rem; border-radius: 9px; font-size: .9rem; }
.mjo-dd .menu a::after { display: none; }
.mjo-dd .menu a:hover { background: var(--mjo-cream); color: var(--mjo-accent); }
.mjo-back { font-size: .82rem; color: var(--mjo-slate); border: 1px solid var(--mjo-line); border-radius: 22px; padding: .4rem 1rem; white-space: nowrap; transition: all .2s; }
.mjo-back:hover { border-color: var(--mjo-accent); color: var(--mjo-accent); }
.mjo-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.mjo-burger span { width: 26px; height: 2px; background: var(--mjo-accent); border-radius: 2px; }
@media (max-width: 940px) { .mjo-links { display: none; } .mjo-burger { display: flex; } }

/* Mobile menu */
.mjo-mm { position: fixed; inset: 0; z-index: 70; background: var(--mjo-ivory); transform: translateX(100%); transition: transform .35s ease; padding: 5rem 2rem; overflow-y: auto; }
.mjo-mm.open { transform: translateX(0); }
.mjo-mm .x { position: absolute; top: 1.3rem; left: 1.6rem; background: none; border: 0; font-size: 1.7rem; color: var(--mjo-accent); cursor: pointer; }
.mjo-mm a { display: block; font-size: 1.3rem; padding: .7rem .3rem; border-bottom: 1px solid var(--mjo-line); }

/* ── Hero (light, youthful, logo-led) ── */
.mjo-hero { position: relative; background: radial-gradient(ellipse 60% 80% at 50% -10%, rgba(201,168,76,.16), transparent 60%), var(--mjo-ivory); padding: 4.5rem 0 5rem; text-align: center; overflow: hidden; }
.mjo-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 90%, rgba(106,27,48,.06), transparent 40%); }
.mjo-hero .logo-wrap { width: clamp(150px, 26vw, 220px); height: clamp(150px, 26vw, 220px); margin: 0 auto 1.6rem; display: flex; align-items: center; justify-content: center; position: relative; }
.mjo-hero .logo-wrap img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(106,27,48,.16)); }
.mjo-hero .logo-wrap .fallback { font-size: 5rem; color: var(--mjo-accent); }
.mjo-hero .badge { display: inline-block; background: #fff; border: 1px solid var(--mjo-line); color: var(--mjo-accent); border-radius: 30px; padding: .35rem 1.2rem; font-family: "Cormorant Garamond", serif; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; margin-bottom: 1.2rem; position: relative; box-shadow: 0 4px 14px rgba(43,35,43,.05); }
.mjo-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; color: var(--mjo-accent); line-height: 1.25; position: relative; letter-spacing: .01em; }
.mjo-hero .rule { width: 90px; height: 3px; background: linear-gradient(90deg, transparent, var(--mjo-gold), transparent); margin: 1.2rem auto; border-radius: 3px; }
.mjo-hero p { max-width: 640px; margin: 0 auto; color: var(--mjo-slate); font-size: 1.18rem; position: relative; }
.mjo-hero .cta { margin-top: 2rem; position: relative; display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.mjo-btn { display: inline-block; background: var(--mjo-accent); color: #fff; padding: .8rem 2.1rem; border-radius: 30px; font-weight: 700; font-size: 1rem; transition: transform .2s, box-shadow .2s, background .2s; box-shadow: 0 10px 26px rgba(106,27,48,.22); }
.mjo-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(106,27,48,.3); color: #fff; }
.mjo-btn.ghost { background: #fff; color: var(--mjo-accent); border: 1px solid var(--mjo-line); box-shadow: 0 6px 18px rgba(43,35,43,.06); }
.mjo-btn.gold { background: var(--mjo-gold); color: var(--mjo-accent-dark); box-shadow: 0 10px 26px rgba(201,168,76,.3); }
.mjo-btn.solid { background: var(--mjo-accent); color: #fff; }

/* ── Sections ── */
.mjo-sec { padding: 5rem 0; }
.mjo-sec.grey { background: var(--mjo-grey); }
.mjo-sec.cream { background: var(--mjo-cream); }
.mjo-eyebrow { font-family: "Cormorant Garamond", serif; text-transform: uppercase; letter-spacing: .2em; font-size: .76rem; color: var(--mjo-gold-ink); text-align: center; font-weight: 600; }
.mjo-sec h2 { text-align: center; font-size: clamp(1.8rem, 3.8vw, 2.8rem); font-weight: 700; color: var(--mjo-accent); margin: .5rem 0 1rem; }
.mjo-lead { max-width: 740px; margin: 0 auto; text-align: center; color: var(--mjo-slate); font-size: 1.12rem; line-height: 2.1; }

/* ── Statistics cards ── */
.mjo-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; margin-top: 2.5rem; }
@media(max-width:820px){ .mjo-stats { grid-template-columns: repeat(2,1fr);} }
.mjo-stat { background: #fff; border: 1px solid var(--mjo-line); border-radius: 18px; padding: 1.8rem 1.2rem; text-align: center; box-shadow: 0 10px 28px rgba(43,35,43,.05); }
.mjo-stat .n { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 2.6rem; color: var(--mjo-accent); line-height: 1; }
.mjo-stat .l { color: var(--mjo-slate); font-size: .92rem; margin-top: .5rem; }
.mjo-stat .ic { color: var(--mjo-gold); font-size: 1.3rem; margin-bottom: .3rem; }

/* ── Cards (families / activities / news) ── */
.mjo-grid { display: grid; gap: 1.6rem; margin-top: 2.6rem; }
.mjo-grid.c2 { grid-template-columns: repeat(2,1fr); }
.mjo-grid.c3 { grid-template-columns: repeat(3,1fr); }
.mjo-grid.c4 { grid-template-columns: repeat(4,1fr); }
@media(max-width:940px){ .mjo-grid.c3,.mjo-grid.c4 { grid-template-columns: repeat(2,1fr);} }
@media(max-width:600px){ .mjo-grid.c2,.mjo-grid.c3,.mjo-grid.c4 { grid-template-columns: 1fr;} }
.mjo-card { background: #fff; border: 1px solid var(--mjo-line); border-radius: 20px; overflow: hidden; transition: transform .3s, box-shadow .3s; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(43,35,43,.05); }
.mjo-card:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(106,27,48,.14); }
.mjo-card .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--mjo-cream), var(--mjo-grey)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mjo-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mjo-card .thumb .ic { font-size: 2.4rem; color: var(--mjo-accent); opacity: .35; }
.mjo-card .in { padding: 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.mjo-card h3 { font-size: 1.28rem; color: var(--mjo-ink); margin-bottom: .5rem; }
.mjo-card p { color: var(--mjo-slate); font-size: .94rem; line-height: 1.9; flex: 1; }
.mjo-card .go { color: var(--mjo-accent); font-weight: 700; font-size: .88rem; margin-top: .9rem; }
.mjo-chip { display: inline-block; background: var(--mjo-cream); color: var(--mjo-accent); border-radius: 20px; padding: .2rem .9rem; font-size: .74rem; font-weight: 700; }

/* ── Prose ── */
.mjo-prose { max-width: 780px; margin: 0 auto; color: #38303a; font-size: 1.16rem; line-height: 2.15; }
.mjo-prose h2 { color: var(--mjo-accent); font-size: 1.6rem; margin: 2.2rem 0 .8rem; text-align: right; }
.mjo-prose p { margin-bottom: 1.3rem; }

/* ── List rows (meetings / news) ── */
.mjo-list { max-width: 800px; margin: 2.6rem auto 0; }
.mjo-row { display: flex; gap: 1.1rem; align-items: flex-start; background: #fff; border: 1px solid var(--mjo-line); border-radius: 16px; padding: 1.2rem 1.5rem; margin-bottom: 1rem; box-shadow: 0 8px 22px rgba(43,35,43,.04); }
.mjo-row .when { background: var(--mjo-accent); color: #fff; border-radius: 12px; padding: .55rem .9rem; font-size: .82rem; white-space: nowrap; box-shadow: 0 6px 16px rgba(106,27,48,.2); }
.mjo-row h4 { color: var(--mjo-ink); font-size: 1.14rem; }
.mjo-row p { color: var(--mjo-slate); font-size: .92rem; }

/* ── Gallery tiles ── */
.mjo-tile { aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; background: var(--mjo-cream); position: relative; box-shadow: 0 8px 22px rgba(43,35,43,.06); }
.mjo-tile img, .mjo-tile iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.mjo-tile .cap { position: absolute; inset-inline: 0; bottom: 0; background: linear-gradient(to top, rgba(74,17,32,.82), transparent); color: #fff; padding: .6rem .9rem; font-size: .84rem; }

/* ── Forms (contact / registration) ── */
.mjo-form { max-width: 560px; }
.mjo-field { margin-bottom: 1rem; }
.mjo-field label { display: block; font-size: .82rem; color: var(--mjo-slate); margin-bottom: .35rem; }
.mjo-field input, .mjo-field textarea, .mjo-field select { width: 100%; background: #fff; border: 1px solid var(--mjo-line); border-radius: 12px; padding: .75rem 1rem; font-family: inherit; font-size: 1rem; color: var(--mjo-ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.mjo-field input:focus, .mjo-field textarea:focus, .mjo-field select:focus { border-color: var(--mjo-accent); box-shadow: 0 0 0 3px rgba(106,27,48,.08); }
.mjo-alert { background: #fff; border: 1px solid var(--mjo-gold-soft); border-radius: 12px; padding: .8rem 1.1rem; color: var(--mjo-accent); margin-bottom: 1rem; }

/* ── Footer (burgundy, light logo) ── */
.mjo-footer { background: var(--mjo-accent-dark); color: #e8d9dd; padding: 3.5rem 0 1.6rem; }
.mjo-footer a:hover { color: #fff; }
.mjo-footer .row { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
.mjo-footer .flogo { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.mjo-footer .flogo img { height: 54px; object-fit: contain; }
.mjo-footer h4 { color: #fff; margin-bottom: .9rem; }
.mjo-footer .links { display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; }
.mjo-footer .churchlink { color: var(--mjo-gold-soft); }
.mjo-footer .copy { text-align: center; border-top: 1px solid rgba(255,255,255,.14); margin-top: 2.2rem; padding-top: 1.3rem; font-size: .82rem; opacity: .8; }

/* Public empty states (shared look) */
.pub-empty{text-align:center;padding:3.5rem 1rem;max-width:460px;margin:0 auto}
.pub-empty .pe-i{font-size:2.4rem;opacity:.85;margin-bottom:1rem;color:var(--mjo-accent,#7a1f2e)}
.pub-empty .pe-title{font-weight:700;font-size:1.25rem;margin-bottom:.5rem;color:var(--mjo-accent,#7a1f2e)}
.pub-empty p{opacity:.75;line-height:2}
.pub-empty .pe-rule{width:70px;height:1px;background:linear-gradient(to right,transparent,currentColor,transparent);margin:1.4rem auto 0;opacity:.5}
.btn.loading{opacity:.65;pointer-events:none}
.btn.loading::after{content:"";display:inline-block;width:.85em;height:.85em;margin-inline-start:.5em;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;vertical-align:-.12em;animation:btnspin .7s linear infinite}
@keyframes btnspin{to{transform:rotate(360deg)}}

/* English (LTR) mode */
body.en{direction:ltr}
body.en .mjo-links a,body.en .mjo-dd>span{white-space:nowrap}
.lang-sw{display:inline-flex;align-items:center;gap:.3rem;font-family:"Cormorant Garamond",serif;font-size:.75rem;letter-spacing:.12em}
.lang-sw a{color:inherit;opacity:.6;text-decoration:none}
.lang-sw a.on{opacity:1;font-weight:700;color:var(--mjo-accent,#6a1b30)}
.lang-sw .sep{opacity:.35}

html, body { overflow-x: hidden; }

/* ── Themed scrollbars ── */
html { scrollbar-width: thin; scrollbar-color: var(--mjo-accent, #6a1b30) #efe9df; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #efe9df; }
::-webkit-scrollbar-thumb { background: var(--mjo-accent, #6a1b30); border-radius: 5px; border: 2px solid #efe9df; }
::-webkit-scrollbar-thumb:hover { background: var(--mjo-accent-dark, #4a0f1c); }

/* ── Compact mobile header (fixes 360–430px overflow) ──
   Below 600px the bar carries only brand + burger; the language switcher and
   church-site link live inside the mobile menu instead. */
.mjo-lang-mm { display: none; }
@media (max-width: 600px) {
  .mjo-nav .bar { gap: .5rem; height: 68px; }
  .mjo-nav .bar > div:last-child { gap: .25rem; }
  .mjo-nav .bar .lang-sw,
  .mjo-nav .bar .mjo-back { display: none; }
  .mjo-brand { gap: 9px; }
  .mjo-brand .lg { width: 42px; height: 42px; }
  .mjo-brand .nm { font-size: .98rem; }
  .mjo-brand .tg { display: none; }
  .mjo-lang-mm { display: flex; justify-content: center; gap: .5rem; margin: 1.4rem 0 .4rem; font-size: 1.05rem; }
}

/* Larger, comfortable touch target for the burger (≈44px) */
.mjo-burger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

/* Narrow phones: stack hero CTAs and keep the brand name within the bar */
@media (max-width: 440px) {
  .mjo-hero .cta { flex-direction: column; align-items: center; }
  .mjo-hero .cta .mjo-btn { width: 100%; max-width: 260px; }
}
@media (max-width: 400px) {
  .mjo-nav .bar { gap: .35rem; }
  .mjo-brand { min-width: 0; }
  .mjo-brand .nm { font-size: .86rem; line-height: 1.18; white-space: normal; }
}

/* ── Global focus-visible (keyboard only) ── */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--mjo-focus-ring); border-radius: 6px; }
.mjo-btn:focus-visible { box-shadow: 0 0 0 3px var(--mjo-ivory), 0 0 0 5px var(--mjo-accent); }

/* ── Reveal-on-scroll (visible with JS off or reduced-motion) ── */
.reveal, .reveal-group > * { transition: opacity .7s var(--mjo-ease), transform .7s var(--mjo-ease); }
@media (prefers-reduced-motion: no-preference) {
  .reveal.armed { opacity: 0; transform: translateY(18px); }
  .reveal-group.armed > * { opacity: 0; transform: translateY(18px); }
}
.reveal.in, .reveal-group.in > * { opacity: 1; transform: none; }
.reveal-group.in > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* ── Global reduced-motion guard (parity with parish) ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .reveal-group > * { opacity: 1 !important; transform: none !important; }
  .mjo-btn:hover { transform: none; }
}


/* ── Skip link ── */
.skip-link {
  position: absolute; inset-inline-start: 0; top: 0; z-index: 200;
  transform: translateY(-120%);
  background: var(--mjo-accent); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 10px 0;
  font-size: .9rem; text-decoration: none;
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
