/* =========================================================
   Komela Şiyê — جمعية شيه | التصميم الرئيسي للموقع
   الألوان الأساسية تأتي من الإعدادات (--primary, --secondary, --accent)
   ========================================================= */

@font-face { font-family: "Cairo"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/cairo-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/cairo-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/cairo-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; font-weight: 800; font-display: swap; src: url("../vendor/fonts/cairo-arabic-800-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Cairo"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/cairo-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cairo"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/cairo-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cairo"; font-weight: 700 800; font-display: swap; src: url("../vendor/fonts/cairo-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cairo"; font-weight: 400 600; font-display: swap; src: url("../vendor/fonts/cairo-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cairo"; font-weight: 700 800; font-display: swap; src: url("../vendor/fonts/cairo-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --primary: #0f5a3a;
  --secondary: #d4a017;
  --accent: #c0392b;
  --primary-dark: color-mix(in srgb, var(--primary) 70%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 10%, #fff);
  --gold-soft: color-mix(in srgb, var(--secondary) 16%, #fff);
  --ink: #15231c;
  --text: #2c3a33;
  --muted: #6b7a72;
  --bg: #f8f6f0;
  --paper: #f1ece0;
  --card: #ffffff;
  --line: #e5e0d3;
  --dark: #0c1c15;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(15, 40, 28, .25);
  --shadow-lg: 0 24px 60px -20px rgba(15, 40, 28, .35);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --header-h: 124px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif; font-size: 16px; line-height: 1.8;
  color: var(--text); background: var(--bg); overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
html { overflow-x: hidden; }
main, .site-footer { overflow-x: clip; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
.center { text-align: center; }
.mt { margin-top: 28px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip-link { position: fixed; top: -60px; right: 16px; z-index: 999; background: var(--secondary); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
@media (max-width: 700px) { .hide-sm { display: none !important; } }
@media (max-width: 900px) { .hide-md { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .72em 1.4em; border-radius: 999px;
  font-weight: 700; font-size: .98rem; border: 2px solid transparent; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
  line-height: 1.3; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-gold { background: var(--secondary); color: #1d1500; box-shadow: 0 8px 22px -10px var(--secondary); }
.btn-gold:hover { background: color-mix(in srgb, var(--secondary) 85%, #fff); color: #1d1500; }
.btn-red { background: #e62117; color: #fff; }
.btn-red:hover { background: #c3180f; color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; background: rgba(255,255,255,.08); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: #fff; color: var(--primary); }
.btn-sm { padding: .45em 1em; font-size: .88rem; }
.btn-lg { padding: .85em 1.8em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink); background: var(--primary-soft); }
.icon-btn:hover { background: var(--primary); color: #fff; }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 1001; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--secondary)); margin-inline-start: 0; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 900; transition: background .35s, box-shadow .35s, transform .35s; }
.topbar { background: rgba(0,0,0,.28); color: #fff; font-size: .85rem; transition: margin .35s var(--ease), opacity .3s; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar a { color: rgba(255,255,255,.92); display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--secondary); }
.topbar-contact, .topbar-social { display: flex; align-items: center; gap: 16px; }
.topbar-social > a:not(.topbar-member) { width: 26px; justify-content: center; }
.topbar-member { background: rgba(255,255,255,.14); padding: 2px 12px; border-radius: 999px; }

.navbar { transition: background .35s; }
.navbar-inner { display: flex; align-items: center; gap: 16px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); transition: width .3s, height .3s; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; font-weight: 800; letter-spacing: .3px; }
.brand-text small { font-size: .85rem; opacity: .9; }
.brand:hover { color: #fff; }

.main-nav { margin-inline-start: auto; }
/* الرأس بعرض الشاشة كاملاً على الكمبيوتر */
.container-wide { max-width: none; padding-inline: clamp(16px, 2.2vw, 40px); }
@media (min-width: 1181px) {
  .main-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; margin-inline-start: 0; }
  .menu .nav-hidden { display: none; }
}
.brand, .nav-actions, .nav-actions > * { flex-shrink: 0; }
.nav-actions .btn { white-space: nowrap; -webkit-hyphens: manual; hyphens: manual; }
/* «المزيد»: العناصر التي لا تتسع لها القائمة */
.menu-more[hidden], .more-group[hidden] { display: none !important; }
.more-dropdown { max-height: min(70vh, 560px); overflow-y: auto; min-width: 270px; }
.more-group + .more-group { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.more-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; font-size: .8rem; font-weight: 800; color: var(--muted); }
.more-head i { color: var(--primary); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.menu-link {
  display: flex; align-items: center; gap: 7px; padding: 10px 11px; border-radius: 10px; color: #fff; font-weight: 700; font-size: .95rem;
  background: none; border: 0; cursor: pointer; position: relative; white-space: nowrap;
}
.menu-link > i:first-child { color: var(--secondary); font-size: .95em; }
.menu-link .caret { font-size: .65em; opacity: .8; transition: transform .3s; }
.menu-link::after { content: ""; position: absolute; bottom: 4px; right: 12px; left: 12px; height: 2px; background: var(--secondary); transform: scaleX(0); transition: transform .3s var(--ease); }
.menu-item.active > .menu-link::after, .menu-link:hover::after { transform: scaleX(1); }
.menu-link:hover { color: #fff; }
.has-dropdown { position: relative; }
.dropdown {
  list-style: none; margin: 0; padding: 10px; position: absolute; top: calc(100% + 8px); right: 0; min-width: 250px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; z-index: 50;
  border-top: 3px solid var(--secondary);
}
.dropdown::before { content: ""; position: absolute; top: -9px; right: 26px; border: 7px solid transparent; border-bottom-color: var(--secondary); }
.dropdown::after { content: ""; position: absolute; top: -14px; right: 0; left: 0; height: 14px; }
.menu > li:nth-last-child(-n+3) > .dropdown { right: auto; left: 0; }
.menu > li:nth-last-child(-n+3) > .dropdown::before { right: auto; left: 26px; }
.dropdown a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .95rem; transition: background .2s, transform .2s; }
.dropdown a:hover, .dropdown a.current { background: var(--primary-soft); color: var(--primary); transform: translateX(-4px); }
.dd-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); font-size: .95rem; transition: background .2s, color .2s; }
.dropdown a:hover .dd-icon { background: var(--c); color: #fff; }
@media (min-width: 1181px) {
  .has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown, .has-dropdown.open > .dropdown { opacity: 1; visibility: visible; transform: none; }
  .has-dropdown:hover .caret, .has-dropdown.open .caret { transform: rotate(180deg); }
  .drawer-head, .drawer-foot { display: none; }
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1180px) { .nav-join { display: none !important; } }
@media (min-width: 1181px) and (max-width: 1340px) { .menu-link > i:first-child { display: none; } .menu-link { padding: 10px 9px; } .brand-text small { display: none; } }
@media (min-width: 1341px) and (max-width: 1500px) { .menu-link { padding: 10px 8px; gap: 5px; } }
.nav-actions .icon-btn { background: rgba(255,255,255,.14); color: #fff; }
.nav-actions .icon-btn:hover { background: var(--secondary); color: #000; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2.5px; background: #fff; border-radius: 3px; transition: .3s; }
.nav-toggle span:nth-child(2) { width: 70%; }

/* Header solid state */
.site-header.solid { background: #fff; box-shadow: 0 6px 24px -12px rgba(0,0,0,.25); }
.site-header.solid .topbar { background: var(--primary-dark); }
.site-header.solid .brand, .site-header.solid .menu-link { color: var(--ink); }
.site-header.solid .menu-link > i:first-child { color: var(--primary); }
.site-header.solid .nav-actions .icon-btn, .site-header.solid .nav-toggle { background: var(--primary-soft); color: var(--primary); }
.site-header.solid .nav-toggle span { background: var(--primary); }
.site-header.solid .brand img { width: 44px; height: 44px; }
.site-header.compact .topbar { margin-top: -38px; opacity: 0; }

/* Ticker */
.ticker { background: var(--accent); color: #fff; font-size: .9rem; }
.ticker-inner { display: flex; align-items: center; gap: 12px; min-height: 36px; overflow: hidden; }
.ticker-label { flex-shrink: 0; font-weight: 800; background: rgba(0,0,0,.18); padding: 2px 12px; border-radius: 999px; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-move { display: inline-flex; gap: 42px; white-space: nowrap; animation: ticker 38s linear infinite; }
.ticker-move a { color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.ticker-move a i { font-size: .4rem; color: var(--secondary); }
.ticker:hover .ticker-move { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* Mobile drawer */
@media (max-width: 1180px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 370px); background: #fff; z-index: 1000; transform: translateX(105%);
    transition: transform .4s var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); margin: 0;
  }
  .main-nav.open { transform: none; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--primary); color: #fff; font-weight: 800; }
  .drawer-head span { display: flex; align-items: center; gap: 10px; }
  .nav-close { width: 40px; height: 40px; border-radius: 10px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.2rem; cursor: pointer; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; padding: 10px; overflow-y: auto; flex: 1; }
  .menu-link, .site-header.solid .menu-link { color: var(--ink); width: 100%; padding: 13px 12px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu-link > i:first-child { color: var(--primary); width: 22px; text-align: center; }
  .menu-link .caret { margin-inline-start: auto; }
  .menu-link::after { display: none; }
  .menu-more { display: none !important; }
  .menu-item.active > .menu-link, .menu-link:hover, .has-dropdown.open > .menu-link { color: var(--primary); background: var(--primary-soft); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; min-width: 0; padding: 0 8px; background: var(--bg); border-radius: 0 0 12px 12px; max-height: 0; overflow: hidden; transition: max-height .4s var(--ease), padding .3s; }
  .dropdown::before, .dropdown::after { display: none; }
  .has-dropdown.open > .dropdown { max-height: 520px; padding: 6px 8px; }
  .dropdown a:hover, .dropdown a.current { transform: none; }
  .has-dropdown.open .caret { transform: rotate(180deg); }
  .drawer-foot { display: block; padding: 14px 16px 22px; border-top: 1px solid var(--line); }
  .nav-overlay { position: fixed; inset: 0; background: rgba(8, 20, 14, .55); z-index: 950; opacity: 0; visibility: hidden; transition: .3s; backdrop-filter: blur(2px); }
  .nav-overlay.show { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 480px) {
  .brand-text strong { font-size: 1rem; }
  .brand-text small { font-size: .78rem; }
  .brand img { width: 44px; height: 44px; }
  .topbar-contact a:first-child { font-size: .8rem; }
  .topbar-social > a:not(.topbar-member) { display: none; }
}

/* ---------- Parallax ---------- */
.parallax { position: relative; overflow: hidden; isolation: isolate; }
.parallax-bg { position: absolute; inset: -18% 0; background-size: cover; background-position: center; z-index: -2; will-change: transform; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; color: #fff; text-align: center; padding: 160px 0 110px; }
@media (max-height: 700px), (max-width: 480px) { .scroll-cue { display: none; } }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,20,14,.55) 0%, rgba(6,20,14,.25) 40%, rgba(6,20,14,.75) 100%); }
.hero-inner { max-width: 860px; }
.hero-logo { width: 120px; height: 120px; margin: 0 auto 18px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.4)); }
.hero h1 { color: #fff; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.hero h1 .ku { font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: 1px; line-height: 1.15; text-shadow: 0 6px 30px rgba(0,0,0,.35); }
.hero h1 .ar { font-size: clamp(1.4rem, 4vw, 2.3rem); color: var(--secondary); font-weight: 700; }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 640px; margin: 0 auto 30px; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 28px; height: 46px; border: 2px solid rgba(255,255,255,.8); border-radius: 20px; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 9px; margin-left: -2px; border-radius: 3px; background: var(--secondary); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ---------- Scrollspy ---------- */
.scrollspy { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 800; display: flex; flex-direction: column; gap: 12px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.scrollspy.visible { opacity: 1; pointer-events: auto; }
.scrollspy a { position: relative; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--primary); background: rgba(255,255,255,.85); transition: transform .3s, background .3s, border-color .3s; }
.scrollspy a span { position: absolute; left: 24px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap; background: var(--ink); color: #fff; font-size: .78rem; padding: 3px 10px; border-radius: 6px; opacity: 0; pointer-events: none; transition: .25s; }
.scrollspy a:hover span, .scrollspy a.active span { opacity: 1; transform: translate(0, -50%); }
.scrollspy a.active span { background: var(--primary); }
.scrollspy a.active { background: var(--secondary); border-color: var(--secondary); transform: scale(1.35); }
.scrollspy a:not(.active):not(:hover) span { opacity: 0; }
@media (max-width: 1100px) { .scrollspy { display: none; } }

/* ---------- Sections ---------- */
.section { padding: 90px 0; position: relative; }
.section-paper { background: var(--paper); }
.section-dark { background: radial-gradient(1200px 500px at 80% 0%, color-mix(in srgb, var(--primary) 45%, var(--dark)), var(--dark)); color: #dfe8e3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-head p { color: #a9bbb1; }
.section-dark .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.section-dark .btn-outline:hover { background: #fff; color: var(--dark); }
@media (max-width: 700px) { .section { padding: 60px 0; } }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head > div { position: relative; padding-inline-start: 62px; }
.section-icon { position: absolute; right: 0; top: 2px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: var(--secondary); font-size: 1.25rem; box-shadow: 0 10px 20px -10px var(--primary); transform: rotate(-6deg); }
.section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0; }
.section-head p { margin: 2px 0 0; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 800; letter-spacing: .5px; background: var(--primary-soft); padding: 4px 14px; border-radius: 999px; font-size: .9rem; margin-bottom: 14px; }
.lead { font-size: 1.12rem; color: var(--text); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.about-text h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.about-text .btn { margin: 6px 0 6px 8px; }
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.value-card { background: #fff; border-radius: var(--radius); padding: 26px 20px; box-shadow: var(--shadow); border-bottom: 4px solid var(--secondary); transition: transform .35s var(--ease); }
.value-card:nth-child(2n) { transform: translateY(26px); border-color: var(--primary); }
.value-card:hover { transform: translateY(-6px); }
.value-card:nth-child(2n):hover { transform: translateY(18px); }
.value-card span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--primary); font-size: 1.35rem; margin-bottom: 12px; }
.value-card h3 { font-size: 1.12rem; margin-bottom: 4px; }
.value-card p { margin: 0; font-size: .93rem; color: var(--muted); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 420px) { .values-grid { gap: 12px; } .value-card { padding: 18px 14px; } .value-card:nth-child(2n) { transform: translateY(14px); } }

/* Stats */
.stats-section { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 46px 0; position: relative; overflow: hidden; }
.stats-section::before { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 5 L35 25 L55 30 L35 35 L30 55 L25 35 L5 30 L25 25Z' fill='%23ffffff' fill-opacity='.05'/%3E%3C/svg%3E"); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.stat { text-align: center; padding: 10px; }
.stat i { font-size: 1.6rem; color: var(--secondary); }
.stat strong { display: block; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; line-height: 1.3; }
.stat span { opacity: .85; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: 1fr 1fr; } }

/* News */
.news-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; }
.news-hero { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.news-hero-media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--primary-soft); }
.news-hero-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.news-hero:hover img { transform: scale(1.05); }
.news-hero-body { padding: 22px 24px 26px; }
.news-hero-body h3 { font-size: 1.4rem; }
.news-hero-body h3 a { color: var(--ink); }
.news-hero-body h3 a:hover { color: var(--primary); }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-row { display: flex; gap: 14px; background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 4px 16px -10px rgba(0,0,0,.2); align-items: center; transition: transform .3s var(--ease), box-shadow .3s; }
.news-row:hover { transform: translateX(-6px); box-shadow: var(--shadow); }
.news-row-img { width: 104px; height: 78px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); font-size: 1.4rem; }
.news-row-img img { width: 100%; height: 100%; object-fit: cover; }
.news-row-body strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-row-body small { color: var(--muted); }
@media (max-width: 900px) { .news-layout { grid-template-columns: 1fr; } }
.announce-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 30px; }
.announce-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, #fff); border-inline-start: 5px solid var(--accent); color: var(--ink); }
.announce-card > i { color: var(--accent); font-size: 1.3rem; margin-top: 4px; }
.announce-card strong { display: block; }
.announce-card small { color: var(--muted); }

/* Bands */
.band { min-height: 62vh; display: grid; place-items: center; text-align: center; color: #fff; padding: 90px 0; }
.band-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,15,10,.35), rgba(5,15,10,.6)); }
.band-inner { max-width: 820px; }
.band h2 { color: #fff; font-size: clamp(2rem, 6vw, 3.6rem); text-shadow: 0 6px 30px rgba(0,0,0,.4); }
.band p { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: rgba(255,255,255,.92); }
.band h2::after { content: ""; display: block; width: 80px; height: 4px; background: var(--secondary); border-radius: 4px; margin: 16px auto 0; }

/* Tabs */
.tab-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tab { border: 2px solid var(--line); background: #fff; color: var(--ink); padding: 8px 18px; border-radius: 999px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: .25s; }
.tab:hover { border-color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.section-dark .tab { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }
.section-dark .tab.active { background: var(--secondary); border-color: var(--secondary); color: #1d1500; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .45s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .tab-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; } .tab { flex-shrink: 0; } }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video-grid.shorts-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
.video-card { background: rgba(255,255,255,.04); border-radius: var(--radius); overflow: hidden; }
body:not(.home) .video-card, .section:not(.section-dark) .video-card { background: #fff; box-shadow: var(--shadow); }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 0; padding: 0; cursor: pointer; overflow: hidden; background: #000; border-radius: var(--radius) var(--radius) 0 0; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; opacity: .92; }
.video-thumb:hover img { transform: scale(1.07); opacity: 1; }
.video-card.is-short .video-thumb { aspect-ratio: 9/16; border-radius: var(--radius); }
.play { position: absolute; top: 50%; left: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; background: rgba(230, 33, 23, .92); color: #fff; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 0 0 8px rgba(230,33,23,.25); transition: transform .3s var(--ease); }
.play i { margin-left: 4px; }
.video-thumb:hover .play { transform: scale(1.12); }
.is-short .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; font-size: 1rem; }
.live-badge, .short-badge { position: absolute; top: 10px; right: 10px; background: #e62117; color: #fff; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 6px; display: flex; gap: 6px; align-items: center; }
.live-badge i { font-size: .5rem; animation: blink 1.2s infinite; }
.live-badge.upcoming { background: var(--secondary); color: #000; }
.short-badge { background: rgba(0,0,0,.6); }
@keyframes blink { 50% { opacity: .2; } }
.video-info { padding: 12px 14px 16px; }
.video-info h3 { font-size: 1rem; margin: 0 0 4px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-info span { font-size: .82rem; opacity: .75; }
.is-short .video-info { padding: 8px 4px; }
.is-short .video-info h3 { font-size: .88rem; }
.is-short.video-card { background: transparent !important; box-shadow: none !important; }
@media (max-width: 1000px) { .video-grid { grid-template-columns: repeat(2, 1fr); } .video-grid.shorts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .video-grid { grid-template-columns: 1fr; } .video-grid.shorts-grid { grid-template-columns: repeat(2, 1fr); } }

/* Photo mosaic */
.photo-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.photo-item { position: relative; overflow: hidden; border-radius: 14px; display: block; background: var(--primary-soft); }
.photo-item:first-child { grid-column: span 2; grid-row: span 2; }
.photo-item:nth-child(6) { grid-column: span 2; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.photo-item:hover img { transform: scale(1.08); }
.photo-cap { position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: .88rem; opacity: 0; transform: translateY(10px); transition: .35s var(--ease); }
.photo-item:hover .photo-cap, .photo-item:focus .photo-cap { opacity: 1; transform: none; }
@media (max-width: 800px) { .photo-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } .photo-item:nth-child(6) { grid-column: span 1; } .photo-cap { opacity: 1; transform: none; } }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--primary-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.media-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; color: color-mix(in srgb, var(--primary) 45%, #fff); background: linear-gradient(135deg, var(--primary-soft), var(--gold-soft)); }
.card-badge { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.94); color: var(--primary); font-size: .78rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.card-badge.static { position: static; margin-bottom: 10px; background: var(--gold-soft); color: #7a5b00; }
.card-lock { position: absolute; top: 12px; left: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--secondary); display: grid; place-items: center; font-size: .8rem; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.card-title { font-size: 1.12rem; margin-bottom: 6px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--primary); }
.card-text { color: var(--muted); font-size: .94rem; flex: 1; }
.card-more { font-weight: 700; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.card-more i { transition: transform .3s; }
.card-more:hover i { transform: translateX(-5px); }
.type-obituaries .card-media img { filter: grayscale(.85); }
.type-obituaries { border-top: 4px solid #444; }

/* Literature */
.lit-block { margin-top: 60px; }
.lit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lit-card { position: relative; background: #fffdf7; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 22px; color: var(--text); box-shadow: 0 10px 30px -22px rgba(0,0,0,.4); transition: transform .35s var(--ease); background-image: repeating-linear-gradient(transparent 0 31px, rgba(212,160,23,.12) 31px 32px); }
.lit-card:hover { transform: rotate(-.6deg) translateY(-4px); color: var(--text); }
.lit-card > i { position: absolute; top: -16px; right: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--secondary); color: #fff; display: grid; place-items: center; }
.lit-card h3 { font-size: 1.15rem; }
.lit-card p { font-size: .98rem; line-height: 2; }
.lit-card span { font-size: .85rem; color: var(--primary); font-weight: 700; }
@media (max-width: 900px) { .lit-grid { grid-template-columns: 1fr; } }

/* Community */
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.community-col { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-top: 5px solid var(--secondary); display: flex; flex-direction: column; }
.community-col h3 { font-size: 1.15rem; display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.community-col h3 i { color: var(--secondary); }
.col-graduations { border-color: var(--primary); } .col-graduations h3 i { color: var(--primary); }
.col-obituaries { border-color: #3d3d3d; background: #fbfbfa; } .col-obituaries h3 i { color: #555; }
.mini-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--ink); border-bottom: 1px solid #f0ede5; }
.mini-item:hover strong { color: var(--primary); }
.mini-img { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); }
.mini-img img { width: 100%; height: 100%; object-fit: cover; }
.col-obituaries .mini-img img { filter: grayscale(1); }
.mini-item strong { display: block; font-size: .95rem; line-height: 1.5; transition: color .2s; }
.mini-item small { color: var(--muted); font-size: .8rem; }
.col-more { margin-top: auto; padding-top: 12px; font-weight: 700; font-size: .9rem; }
@media (max-width: 900px) { .community-grid { grid-template-columns: 1fr; } }

/* People */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.person-card { background: #fff; border-radius: var(--radius); padding: 26px 16px 20px; text-align: center; box-shadow: var(--shadow); color: var(--ink); transition: transform .35s var(--ease); }
.person-card:hover { transform: translateY(-6px); color: var(--ink); }
.person-img { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 2.4rem; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--secondary); }
.person-img img { width: 100%; height: 100%; object-fit: cover; }
.person-card strong { display: block; font-size: 1.05rem; }
.person-card small { color: var(--muted); }
@media (max-width: 900px) { .people-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } .person-img { width: 86px; height: 86px; } }

/* History */
.history-section { background: linear-gradient(180deg, var(--bg), var(--paper)); }
.history-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; align-items: center; }
.history-art { aspect-ratio: 1; max-width: 360px; width: 100%; margin: auto; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); display: grid; place-items: center; color: var(--secondary); font-size: clamp(4rem, 12vw, 7rem); box-shadow: var(--shadow-lg); animation: blob 12s ease-in-out infinite; }
@keyframes blob { 50% { border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%; } }
@media (max-width: 800px) { .history-inner { grid-template-columns: 1fr; text-align: center; } .history-art { max-width: 200px; } }

/* CTA */
.cta-box { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); border-radius: 26px; padding: 44px 40px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-box::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: var(--secondary); opacity: .12; left: -80px; top: -120px; }
.cta-box h2 { color: #fff; font-size: clamp(1.4rem, 3.5vw, 2rem); }
.cta-box h2 i { color: var(--secondary); }
.cta-box p { margin: 0; opacity: .9; max-width: 560px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
@media (max-width: 600px) { .cta-box { padding: 30px 22px; } .cta-actions .btn { flex: 1; } }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact-card { background: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow); }
.contact-card > i { width: 60px; height: 60px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--primary); color: var(--secondary); font-size: 1.4rem; margin-bottom: 12px; }
.contact-card h3 { font-size: 1.08rem; margin-bottom: 4px; }
.contact-card p { margin: 0; color: var(--muted); word-break: break-word; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.section-dark .empty-state { border-color: rgba(255,255,255,.15); color: #a9bbb1; }
.empty-state i { font-size: 2.4rem; margin-bottom: 8px; opacity: .6; }

/* ---------- Page banner ---------- */
.page-banner { min-height: 360px; display: flex; align-items: flex-end; color: #fff; padding: 180px 0 50px; text-align: center; }
.page-banner-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,20,13,.55), color-mix(in srgb, var(--primary) 70%, rgba(0,0,0,.6))); }
.page-banner-inner { position: relative; }
.banner-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--secondary); color: #1d1500; display: inline-grid; place-items: center; font-size: 1.6rem; margin-bottom: 12px; transform: rotate(-6deg); box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); }
.page-banner h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 6px; }
.page-banner p { color: rgba(255,255,255,.9); margin-bottom: 10px; font-size: 1.08rem; }
.breadcrumbs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; font-size: .9rem; background: rgba(0,0,0,.25); padding: 4px 16px; border-radius: 999px; }
.breadcrumbs a { color: #fff; } .breadcrumbs a:hover { color: var(--secondary); }
.breadcrumbs .sep { font-size: .7rem; opacity: .7; }
.breadcrumbs span { color: var(--secondary); }
@media (max-width: 600px) { .page-banner { min-height: 300px; padding: 160px 0 36px; } }

.flash-wrap { padding-top: 24px; }

/* ---------- Content pages ---------- */
.page-content { padding: 60px 0 80px; }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
@media (max-width: 960px) { .layout-sidebar { grid-template-columns: 1fr; } }
.article { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.article-body { padding: 30px 34px 36px; }
@media (max-width: 600px) { .article-body { padding: 22px 18px 26px; } }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .9rem; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article-meta i { color: var(--secondary); }
.prose { font-size: 1.07rem; line-height: 2; color: var(--text); overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose img { border-radius: 12px; margin: 1em 0; }
.prose blockquote { margin: 1.4em 0; padding: 16px 22px; background: var(--gold-soft); border-inline-start: 5px solid var(--secondary); border-radius: 10px; font-weight: 600; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose a { text-decoration: underline; }
.type-literature .prose { font-size: 1.15rem; line-height: 2.2; }
.meta-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 24px; }
.meta-item { background: var(--primary-soft); border-radius: 12px; padding: 12px 16px; }
.meta-item small { display: block; color: var(--muted); font-size: .82rem; }
.meta-item strong { color: var(--ink); white-space: pre-line; }
.obit-box { text-align: center; background: linear-gradient(180deg, #2b2b2b, #111); color: #eee; border-radius: 14px; padding: 26px 20px; margin-bottom: 24px; }
.obit-box .verse { font-size: 1.2rem; color: #d9d9d9; margin-bottom: 10px; }
.obit-box h2 { color: #fff; margin: 0; }
.obit-box img { width: 130px; height: 130px; object-fit: cover; border-radius: 50%; margin: 0 auto 14px; filter: grayscale(1); border: 4px solid #444; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-row a, .share-row button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; cursor: pointer; font-size: 1rem; }
.share-fb { background: #1877f2; } .share-wa { background: #25d366; } .share-tg { background: #229ed9; } .share-x { background: #111; } .share-copy { background: var(--muted); }
.attachment-link { display: inline-flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 12px; background: var(--primary-soft); font-weight: 700; margin-top: 10px; }

.sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 110px; }
.widget { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.widget h3 { font-size: 1.05rem; display: flex; gap: 8px; align-items: center; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 2px solid var(--gold-soft); }
.widget h3 i { color: var(--secondary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li a { display: flex; gap: 8px; padding: 7px 0; color: var(--ink); border-bottom: 1px solid #f2efe7; }
.widget li a:hover { color: var(--primary); }
@media (max-width: 960px) { .sidebar { position: static; } }

/* Static page */
.static-section { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; margin-bottom: 40px; }
.static-section.has-img { grid-template-columns: 1.2fr 1fr; }
.static-section.has-img:nth-child(even) .static-img { order: -1; }
.static-img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.static-section h2 { font-size: 1.5rem; position: relative; padding-inline-start: 16px; }
.static-section h2::before { content: ""; position: absolute; right: 0; top: 8px; bottom: 8px; width: 5px; border-radius: 4px; background: var(--secondary); }
@media (max-width: 800px) { .static-section.has-img { grid-template-columns: 1fr; } .static-section.has-img:nth-child(even) .static-img { order: 0; } }
.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.info-card { background: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow); border-bottom: 4px solid var(--primary); transition: transform .3s var(--ease); }
.info-card:hover { transform: translateY(-5px); }
.info-card .ic { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gold-soft); color: var(--primary); font-size: 1.5rem; margin-bottom: 12px; overflow: hidden; }
.info-card .ic.photo { width: 110px; height: 110px; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--secondary); }
.info-card .ic img { width: 100%; height: 100%; object-fit: cover; }
.info-card h3 { font-size: 1.1rem; margin-bottom: 2px; }
.info-card .sub { color: var(--accent); font-weight: 700; font-size: .9rem; }
.info-card p { color: var(--muted); font-size: .93rem; margin: 6px 0 0; }

/* Gallery page */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.gallery-grid { columns: 4 240px; column-gap: 14px; }
.gallery-grid .photo-item { break-inside: avoid; margin-bottom: 14px; }
.gallery-grid .photo-item img { height: auto; }

/* Search */
.search-box { display: flex; gap: 10px; max-width: 700px; margin: 0 auto 36px; }
.search-box input { flex: 1; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 34px; max-width: 780px; margin: 0 auto; }
.form-card.narrow { max-width: 480px; }
@media (max-width: 600px) { .form-card { padding: 22px 16px; border-radius: 16px; } }
.form-card h2 { display: flex; gap: 10px; align-items: center; font-size: 1.4rem; }
.form-card h2 i { color: var(--secondary); }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .row-2 { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 12px; }
.form-grid .row-2.rev { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0,1fr); } }
.field label, label.field { display: block; font-weight: 700; font-size: .93rem; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--accent); }
.field small.hint { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=search], input[type=number], input[type=url], select, textarea {
  width: 100%; min-width: 0; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 1rem; background: #fcfbf8; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { min-height: 140px; resize: vertical; }
input[dir=ltr] { text-align: left; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-right: 42px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-left: 48px !important; }
.pw-toggle { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; font-size: 1.05rem; }
.pw-toggle:hover { color: var(--primary); background: var(--primary-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 20px; height: 20px; margin-top: 5px; accent-color: var(--primary); flex-shrink: 0; }
.form-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; font-size: .93rem; }
.hp { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.username-preview { background: var(--gold-soft); border: 2px dashed var(--secondary); border-radius: 12px; padding: 10px 14px; font-weight: 700; display: none; }
.username-preview.show { display: block; }
.username-preview code { direction: ltr; unicode-bidi: embed; font-size: 1.05rem; color: var(--primary); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; position: relative; }
.alert > i { font-size: 1.2rem; margin-top: 3px; }
.alert span { flex: 1; }
.alert-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.alert-success { background: #e6f5ec; color: #135c32; }
.alert-error { background: #fdecea; color: #9b2218; }
.alert-info { background: #e8f1fb; color: #1b4f86; }
.alert-warning { background: #fff5dd; color: #7a5600; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 12px; display: grid; place-items: center; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px -8px rgba(0,0,0,.25); color: var(--ink); font-weight: 700; }
.pagination .current { background: var(--primary); color: #fff; }
.pagination a:hover { background: var(--secondary); color: #000; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b9c8c0; position: relative; margin-top: 80px; }
.footer-wave { position: absolute; top: -79px; left: 0; right: 0; height: 80px; }
.footer-wave svg { width: 100%; height: 100%; }
.footer-wave path { fill: var(--dark); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 36px; padding-top: 50px; padding-bottom: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: #fff; font-size: 1.08rem; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ""; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background: var(--secondary); border-radius: 3px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #b9c8c0; }
.footer-col a:hover { color: var(--secondary); }
.footer-col li i { font-size: .75rem; color: var(--secondary); margin-inline-end: 4px; }
.brand-footer { margin-bottom: 14px; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.soc { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: #fff !important; transition: transform .25s, background .25s; }
.soc:hover { transform: translateY(-4px); }
.soc-facebook:hover { background: #1877f2; } .soc-instagram:hover { background: #d62976; } .soc-youtube:hover { background: #e62117; }
.soc-tiktok:hover { background: #000; } .soc-x:hover { background: #000; } .soc-telegram:hover { background: #229ed9; } .soc-whatsapp:hover { background: #25d366; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list li i { font-size: 1rem !important; margin-top: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; text-align: center; font-size: .88rem; }

/* ---------- Back to top ---------- */
.back-to-top { position: fixed; left: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 1.1rem; cursor: pointer; z-index: 850; box-shadow: var(--shadow); opacity: 0; transform: translateY(20px); pointer-events: none; transition: .35s var(--ease); }
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--secondary); color: #000; }

/* ---------- Modal & Lightbox ---------- */
.modal, .lightbox { position: fixed; inset: 0; z-index: 2000; display: none; }
.modal.open, .lightbox.open { display: grid; place-items: center; animation: fadeIn .3s; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.modal-box { position: relative; width: min(1000px, 94vw); }
.modal-box.short { width: min(400px, 90vw); }
.modal-frame { aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.modal-box.short .modal-frame { aspect-ratio: 9/16; max-height: 86vh; margin: auto; }
.modal-frame iframe { width: 100%; height: 100%; border: 0; }
.modal-close, .lb-close { position: absolute; top: -52px; left: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #000; font-size: 1.2rem; cursor: pointer; }
.lightbox { background: rgba(0,0,0,.92); }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; margin: auto; border-radius: 8px; }
.lightbox figcaption { color: #eee; margin-top: 10px; }
.lb-close { top: 16px; left: 16px; z-index: 2; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.2rem; cursor: pointer; z-index: 2; }
.lb-prev { right: 14px; } .lb-next { left: 14px; }
.lb-prev:hover, .lb-next:hover { background: var(--secondary); color: #000; }

/* ---------- Member area ---------- */
.member-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .member-grid { grid-template-columns: 1fr; } }
.member-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; }
.avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--primary); color: var(--secondary); display: grid; place-items: center; font-size: 2rem; font-weight: 800; margin: 0 auto 12px; }
.member-nav { list-style: none; padding: 0; margin: 16px 0 0; text-align: right; }
.member-nav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; }
.member-nav a:hover, .member-nav a.active { background: var(--primary-soft); color: var(--primary); }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: right; }
.info-table th { width: 38%; color: var(--muted); font-weight: 600; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 24px; }
.panel h2 { font-size: 1.25rem; display: flex; gap: 10px; align-items: center; }
.panel h2 i { color: var(--secondary); }
@media (max-width: 600px) { .panel { padding: 18px 14px; } .info-table th, .info-table td { padding: 10px 6px; font-size: .92rem; } }

/* ---------- Scroll animations (تفعّل فقط بعد تحميل GSAP) ---------- */
.js-anim [data-anim] { opacity: 0; }
.js-anim [data-hero] { opacity: 0; }
@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-anim [data-anim], .js-anim [data-hero] { opacity: 1 !important; }
  .ticker-move { animation: none; }
}

@media print {
  .site-header, .site-footer, .scrollspy, .back-to-top, .share-row, .sidebar { display: none !important; }
  .page-banner { min-height: 0; padding: 20px 0; color: #000; }
  .page-banner-overlay, .parallax-bg { display: none; }
  .page-banner h1 { color: #000; }
}
.form-grid.one-col { grid-template-columns: minmax(0,1fr); }
.video-grid:not(.shorts-grid) .is-short .video-thumb { aspect-ratio: 16/9; border-radius: var(--radius) var(--radius) 0 0; }

/* ===== تبديل اللغة ===== */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px; }
.lang-switch a { color: #fff; font-size: .78rem; font-weight: 800; padding: 1px 10px; border-radius: 999px; line-height: 1.7; text-decoration: none; }
.lang-switch a.on { background: var(--secondary); color: #1d1500; }
.lang-switch a:not(.on):hover { background: rgba(255,255,255,.18); }
.drawer-lang { display: none; }
@media (max-width: 1180px) {
  .drawer-lang { display: flex; justify-content: center; background: var(--primary-soft); margin-bottom: 12px; padding: 4px; }
  .drawer-lang a { color: var(--primary); font-size: .95rem; padding: 4px 22px; }
  .drawer-lang a.on { background: var(--primary); color: #fff; }
}

/* ===== وضع التطبيق (APK) وتطبيق الويب المثبّت (PWA) ===== */
.app-nav { display: none; }
.app-banner { position: fixed; inset-inline: 10px; bottom: 10px; z-index: 900; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-lg); }
.app-banner img { border-radius: 10px; }
.app-banner div { flex: 1; min-width: 0; line-height: 1.3; }
.app-banner small { display: block; color: var(--muted); font-size: .8rem; }
.app-banner-x { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 6px; }
@media (max-width: 900px) {
  html.is-app .app-nav { display: flex; }
  html.is-app body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  html.is-app .topbar-contact, html.is-app .topbar-social > a:not(.topbar-member) { display: none; }
  html.is-app .back-to-top { bottom: calc(76px + env(safe-area-inset-bottom)); }
  html.is-app .nav-join { display: none; }
}
@media (max-width: 900px) and (display-mode: standalone) {
  .app-nav { display: flex; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .back-to-top { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.app-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 940; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.18); padding: 4px 4px env(safe-area-inset-bottom); justify-content: space-around; }
.app-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; color: var(--muted); font-size: .7rem; font-weight: 700; text-decoration: none; border-radius: 12px; min-width: 0; }
.app-nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.app-nav a i { font-size: 1.15rem; }
.app-nav a.on { color: var(--primary); background: var(--primary-soft); }
.app-nav a.on i { color: var(--primary); }
.mt-note { font-size: .82rem; color: var(--muted); background: var(--primary-soft); border-radius: 10px; padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center; margin: 0 0 14px; }
.mt-note a { font-weight: 700; }

/* ===== دائرة التحميل على الأزرار أثناء تنفيذ الأمر ===== */
.is-loading { pointer-events: none; opacity: .85; cursor: progress; }
.is-loading > i.fa-solid, .is-loading > i.fa-regular, .is-loading > i.fa-brands { display: none; }
button.is-loading::before, .btn.is-loading::before {
  content: ""; display: inline-block; width: 1em; height: 1em; flex-shrink: 0;
  border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: btnSpin .7s linear infinite; vertical-align: -.15em;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.is-loading::before, .btn.is-loading::before { animation-duration: 1.6s; } }

/* ===== حقل التاريخ (يوم / شهر / سنة) ===== */
.date-sel { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.5fr) minmax(0,1fr); gap: 8px; width: 100%; }
.date-sel select { padding-left: 8px; padding-right: 8px; }
/* حقول التاريخ الأصلية في الصفحات العربية: الأرقام من اليسار لليمين حتى لا تنقلب */
[dir="rtl"] input[type=date], [dir="rtl"] input[type=datetime-local], [dir="rtl"] input[type=time] { direction: ltr; text-align: right; }

/* =============== منطقة الأعضاء: الملف الشخصي، الأعضاء، الرسائل =============== */
.btn-soft { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn-soft:hover { background: var(--primary); color: #fff; }
.btn-soft.m-danger { background: #fdecea; color: #b42318; }
.btn-soft.m-danger:hover { background: #b42318; color: #fff; }
.m-avatar { --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--primary); color: var(--secondary); font-weight: 800; font-size: calc(var(--s) * .42); line-height: 1; box-shadow: 0 0 0 3px #fff, 0 4px 14px -6px rgba(0,0,0,.35); }
.m-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-avatar.lg { --s: 76px; } .m-avatar.xl { --s: 96px; } .m-avatar.xxl { --s: 128px; }
.member-card > .m-avatar { margin: 0 auto 12px; }
.member-nav a > span:first-of-type { flex: 1; }
.m-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 800; line-height: 1; }
.m-notice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff4e5; color: #8a4b00; font-weight: 700; margin: 10px 0; }
.m-notice:hover { background: #ffe9cc; color: #8a4b00; }
.m-notice span:first-of-type { flex: 1; }
.m-notice.soft { background: var(--primary-soft); color: var(--primary); }
.m-hint { background: #fff; border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); font-size: .93rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.m-hint > i { color: var(--secondary); }
.m-hint a { font-weight: 700; margin-inline-start: auto; }

/* زر ظاهر/مخفي */
.vis { display: inline-flex; align-items: center; cursor: pointer; user-select: none; font-size: .8rem; font-weight: 700 !important; margin: 0 !important; }
.vis input { position: absolute; opacity: 0; pointer-events: none; }
.vis span { display: none; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; transition: background .2s; }
.vis input:checked ~ .vis-on { display: inline-flex; background: #e3f4ea; color: #146c3c; }
.vis input:not(:checked) ~ .vis-off { display: inline-flex; background: #eef0f2; color: #6b7280; }
.vis input:focus-visible ~ span { outline: 2px solid var(--primary); outline-offset: 2px; }
.vis:hover span { filter: brightness(.95); }
.vis-always { font-size: .76rem; font-weight: 700; color: #146c3c; background: #e3f4ea; padding: 2px 8px; border-radius: 999px; margin-inline-start: 6px; white-space: nowrap; }
.m-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; min-height: 30px; }
.m-form .field > label:first-child { min-height: 30px; display: flex; align-items: center; margin-bottom: 6px; }
.m-label label { margin: 0 !important; }
.m-static { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.m-vis-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: .93rem; }
.m-vis-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* الصورة الشخصية */
.m-photo-form { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.m-photo-preview .m-avatar { --s: 120px; }
.m-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.m-file { position: relative; overflow: hidden; }
.m-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.m-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* مفاتيح الخصوصية */
.m-switches { display: flex; flex-direction: column; gap: 4px; }
.m-switch { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400 !important; }
.m-switch input { position: absolute; opacity: 0; pointer-events: none; }
.m-switch .sw { flex-shrink: 0; width: 46px; height: 26px; border-radius: 999px; background: #cfd4da; position: relative; transition: background .2s; margin-top: 2px; }
.m-switch .sw::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.m-switch input:checked + .sw { background: var(--primary); }
.m-switch input:checked + .sw::after { transform: translateX(-20px); }
.m-switch input:focus-visible + .sw { outline: 2px solid var(--primary); outline-offset: 2px; }
.m-switch b { display: block; }
.m-switch small { display: block; color: var(--muted); font-size: .85rem; }
.m-switches .btn { align-self: flex-start; margin-top: 14px; }

/* القوائم والبطاقات */
.m-list { display: flex; flex-direction: column; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.m-row:last-child { border-bottom: 0; }
.m-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.m-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 12px 16px; border-radius: 16px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
.m-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.m-card .m-avatar { margin-bottom: 6px; }
.m-card b { font-size: 1rem; line-height: 1.4; }
.m-card small { color: var(--muted); font-size: .82rem; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.m-card p { margin: 2px 0 0; font-size: .83rem; color: var(--muted); line-height: 1.6; }
.m-you { background: var(--secondary); color: #1d1500; border-radius: 999px; padding: 0 8px; font-weight: 800; }
.m-dir-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.m-dir-head h2 { margin: 0; }
.m-search { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 340px; min-width: 200px; }
.m-search input { padding: 9px 14px; border-radius: 999px; }

/* ملف العضو */
.m-profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.m-profile-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.m-online { color: #16a34a; font-size: .85rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.m-online i { font-size: .55rem; }
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.m-why { font-size: .88rem; color: var(--muted); }
.m-bio { margin-top: 20px; padding: 16px 18px; border-radius: 14px; background: var(--bg); line-height: 1.9; border-inline-start: 4px solid var(--secondary); white-space: normal; }
.m-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 20px 0 0; }
.m-info div { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.m-info dt { font-size: .8rem; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.m-info dt i { color: var(--primary); width: 16px; }
.m-info dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.m-wa { color: #25d366; font-size: 1.15rem; margin-inline-start: 6px; }

/* الرسائل */
.msg-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); padding: 0; overflow: hidden; min-height: 560px; }
.msg-list { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; max-height: 680px; overflow-y: auto; }
.msg-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.msg-empty { padding: 16px; }
.msg-conv { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.msg-conv:hover, .msg-conv.active { background: var(--primary-soft); color: var(--ink); }
.msg-conv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg-conv-txt b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-conv-txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.msg-conv.unread .msg-conv-txt small { color: var(--ink); font-weight: 700; }
.msg-conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.msg-conv-side small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.msg-thread { display: flex; flex-direction: column; min-width: 0; min-height: 560px; }
.msg-placeholder { margin: auto; text-align: center; color: var(--muted); }
.msg-placeholder i { font-size: 3rem; opacity: .4; }
.msg-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msg-who { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: 1; min-width: 0; }
.msg-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-back { display: none; color: var(--ink); font-size: 1.1rem; padding: 6px; }
.msg-del .icon-btn { width: 38px; height: 38px; background: #fdecea; color: #b42318; border: 0; cursor: pointer; }
.msg-scroll { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; max-height: 520px; min-height: 300px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 4%, #fff), #fff); }
.msg-day { text-align: center; margin: 10px 0 4px; }
.msg-day span { background: #eef0f2; color: #555; font-size: .76rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.msg { max-width: min(78%, 520px); padding: 9px 13px 6px; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.msg.mine { align-self: flex-end; background: var(--primary); color: #fff; border-end-end-radius: 4px; }
.msg.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 4px; }
.msg-body { line-height: 1.7; overflow-wrap: anywhere; }
.msg-meta { font-size: .7rem; opacity: .75; align-self: flex-end; margin-top: 2px; display: inline-flex; gap: 4px; align-items: center; direction: ltr; }
.msg-meta i.read { color: var(--secondary); opacity: 1; }
.msg-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px 4px; border-top: 1px solid var(--line); }
.msg-form textarea { flex: 1; min-height: 46px; max-height: 160px; resize: none; border-radius: 22px; padding: 11px 16px; }
.msg-form .btn { width: 48px; height: 48px; padding: 0; flex-shrink: 0; }
.msg-tip { padding: 0 16px 10px; margin: 0; font-size: .74rem; }
@media (pointer: coarse) { .msg-tip { display: none; } }
.msg-blocked { padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); background: var(--bg); }
.msg-first { margin: auto; }
@media (max-width: 760px) {
  .msg-wrap { grid-template-columns: 1fr; min-height: 0; }
  .msg-list { border: 0; max-height: none; }
  .msg-wrap.has-thread .msg-list { display: none; }
  .msg-wrap:not(.has-thread) .msg-thread { display: none; }
  .msg-back { display: inline-block; }
  .msg-thread { min-height: 0; }
  .msg-scroll { max-height: calc(100vh - 340px); max-height: calc(100dvh - 340px); min-height: 220px; }
  .msg { max-width: 88%; }
}
/* داخل التطبيق والهاتف: القائمة الجانبية لمنطقة الأعضاء أفقية */
@media (max-width: 860px) {
  .member-card { padding: 16px; }
  .member-card > .m-avatar { --s: 64px; }
  .member-nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .member-nav li { flex-shrink: 0; }
  .member-nav a { white-space: nowrap; background: var(--bg); }
}
.member-grid > *, .msg-wrap > * { min-width: 0; }
@media (max-width: 860px) { .member-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .member-card { padding: 8px; }
  .member-card > .m-avatar, .member-card > h3, .member-card > p { display: none; }
  .member-nav { margin: 0; }
}
.msg-list-head { flex-wrap: wrap; }
.msg-list-head .btn, .m-actions .btn, .m-photo-btns .btn { white-space: nowrap; -webkit-hyphens: manual; hyphens: manual; }

/* شعار القسم بدل الأيقونة أعلى صفحته */
.banner-logo { display: inline-grid; place-items: center; width: 116px; height: 116px; padding: 10px; margin-bottom: 14px; border-radius: 24px; background: #fff; box-shadow: 0 14px 34px -12px rgba(0,0,0,.5); }
.banner-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
@media (max-width: 640px) { .banner-logo { width: 92px; height: 92px; padding: 8px; border-radius: 20px; } }
.dd-icon.dd-logo { background: #fff; border: 1px solid var(--line); padding: 3px; }
.dd-icon.dd-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }

/* الشريط العلوي على الهاتف (3 لغات): بدون التفاف الأسطر */
.topbar a { white-space: nowrap; }
@media (max-width: 480px) {
  .topbar-inner { gap: 6px; }
  .topbar-social { gap: 8px; }
  .lang-switch a { padding: 1px 7px; }
  .topbar-member .tm-label { display: none; }
  .topbar-member { padding: 2px 9px; }
}

/* «أبقني مسجلاً» */
.remember-check small { font-weight: 400; line-height: 1.6; margin-top: 2px; }
.remember-check small.d-block { display: block; }

/* أعياد الميلاد */
.bday-band { background: linear-gradient(90deg, #fff4d6, #ffe7ef); border-bottom: 1px solid #f3d9a4; position: relative; z-index: 2; }
.bday-inner { display: flex; align-items: center; gap: 14px; padding-block: 12px; }
.bday-ic { font-size: 1.8rem; flex-shrink: 0; }
.bday-text { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: #5b3a00; }
.bday-person { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: #5b3a00; }
.bday-person .m-avatar { --s: 34px; }
.m-bday-me { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, #fff4d6, #ffe7ef); }
.m-bday-me h2 { margin: 0 0 4px; }
.m-bday-me p { margin: 0; }
.m-bday-ic { font-size: 2.6rem; }
