@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --red: #C41E3A;
  --red-dark: #9B1830;
  --blue: #1B4F8A;
  --blue-light: #2563B8;
  --blue-pale: #E8F0FA;
  --logo-orange: #E06020;
  --orange: #E06020;
  --logo-orange-light: #F07838;
  --logo-cyan: #0080A0;
  --logo-cyan-light: #00A8C8;
  --logo-dark: #0A1418;
  --logo-dark-mid: #0F2228;
  --text: #1E293B;
  --text-muted: #64748B;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --shadow: 0 4px 24px rgba(27, 79, 138, 0.10);
  --shadow-lg: 0 12px 48px rgba(27, 79, 138, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container {
  width: min(1200px, 100%);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-left));
}

.site-backbar {
  background: var(--white);
  border-bottom: 1px solid rgba(27, 79, 138, 0.1);
  padding: 0.65rem 0;
}
.site-header.scrolled ~ .site-backbar { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--blue);
  padding: 0.5rem 0.25rem;
  min-height: 44px;
}
.back-link:hover { color: var(--logo-orange); }
.nav-cta-mobile { color: var(--red) !important; font-weight: 800 !important; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(27,79,138,0.08); padding-top: env(safe-area-inset-top); }
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { height: 52px; width: auto; border-radius: 0; object-fit: contain; }
.brand-logo-full { height: 64px; width: auto; max-width: 280px; object-fit: contain; }
.brand:has(.brand-logo-full) .brand-text { display: none; }
.brand-text h1 { font-size: 1.1rem; font-weight: 800; color: var(--blue); line-height: 1.3; }
.brand-text span { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.nav-desktop { display: flex; align-items: center; gap: 0.25rem; }
.nav-desktop a { padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; transition: var(--transition); color: var(--text); }
.nav-desktop a:hover, .nav-desktop a.active { background: var(--blue-pale); color: var(--blue); }
.nav-cta { background: var(--red) !important; color: var(--white) !important; border-radius: 50px !important; }
.nav-cta:hover { background: var(--red-dark) !important; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--blue); margin: 5px 0; }
.mobile-nav { display: none; flex-direction: column; padding: 1rem 0; border-top: 1px solid rgba(27,79,138,0.08); }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 0.75rem 1rem; font-weight: 600; border-radius: 8px; color: var(--text); }
.mobile-nav a:hover { background: var(--blue-pale); }

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: linear-gradient(155deg, #060E12 0%, var(--logo-dark) 28%, var(--logo-dark-mid) 55%, #0D1E24 78%, #0A161C 100%);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(0.85) contrast(1.05);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(110deg, rgba(6, 14, 18, 0.88) 0%, rgba(10, 20, 24, 0.72) 42%, rgba(6, 14, 18, 0.55) 100%),
    radial-gradient(ellipse at 88% 22%, rgba(224, 96, 32, 0.22) 0%, transparent 42%),
    radial-gradient(ellipse at 12% 78%, rgba(0, 128, 160, 0.18) 0%, transparent 48%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 70%, rgba(6, 14, 18, 0.65) 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; padding: 4rem 0 7rem; color: #fff; max-width: 720px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 128, 160, 0.22);
  border: 1px solid rgba(0, 168, 200, 0.45);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #E8FAFF;
}
.hero-logo { height: clamp(90px, 20vw, 150px); width: auto; max-width: min(100%, 420px); margin-bottom: 1.5rem; object-fit: contain; filter: drop-shadow(0 4px 16px rgba(0,0,0,0.35)); }
.hero-title { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.35; margin-bottom: 1rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }
.hero h2 em { font-style: normal; color: var(--logo-orange-light); }
.hero-verse {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  padding-right: 1rem;
  border-right: 3px solid var(--logo-orange);
  color: #F0FAFC;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
  line-height: 1.9;
  min-height: 3.6em;
  transition: opacity 0.3s ease;
}
.hero-verse.verse-fade,
.verse-banner-text.verse-fade { opacity: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero .btn-primary { background: var(--logo-orange); box-shadow: 0 4px 20px rgba(224, 96, 32, 0.45); }
.hero .btn-primary:hover { background: var(--logo-orange-light); box-shadow: 0 8px 28px rgba(224, 96, 32, 0.55); }
.hero .btn-outline { border-color: rgba(0, 168, 200, 0.55); color: #D4F1F7; }
.hero .btn-outline:hover { background: rgba(0, 128, 160, 0.2); border-color: var(--logo-cyan-light); }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.75rem; border-radius: 50px; font-family: inherit; font-weight: 700; font-size: 0.95rem; border: none; cursor: pointer; transition: var(--transition); }
.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 4px 20px rgba(196,30,58,0.4); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-light); transform: translateY(-2px); }

section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label { display: inline-block; color: var(--red); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; }
.section-header h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; color: var(--blue); margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); max-width: 600px; margin-inline: auto; }

.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.vision-card { background: var(--white); border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); border-right: 4px solid var(--red); }
.vision-card h3 { font-size: 1.5rem; color: var(--blue); margin-bottom: 1rem; font-weight: 800; }
.vision-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card { background: var(--white); border-radius: var(--radius-sm); padding: 1.5rem 1rem; text-align: center; box-shadow: var(--shadow); transition: var(--transition); }
.stat-card:hover { transform: translateY(-4px); }
.stat-card .num { font-size: 2rem; font-weight: 900; color: var(--red); }
.stat-card .label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.category-card { background: var(--white); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--shadow); transition: var(--transition); border: 2px solid transparent; position: relative; overflow: hidden; }
.category-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--cat-color, var(--blue)); }
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--cat-color, var(--blue)); }
.category-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.category-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--blue); margin-bottom: 0.5rem; }
.category-card p { font-size: 0.85rem; color: var(--text-muted); }
.category-card .events-count { margin-top: 1rem; font-size: 0.8rem; font-weight: 700; color: var(--red); }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.event-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column; }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-img { height: 200px; background: var(--blue-pale); overflow: hidden; position: relative; }
.event-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.event-card:hover .event-img img { transform: scale(1.05); }
.event-img .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg, var(--blue-pale), #dbeafe); }
.event-badges { position: absolute; top: 12px; right: 12px; display: flex; gap: 0.5rem; }
.badge { padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.75rem; font-weight: 700; }
.badge-upcoming { background: var(--red); color: white; }
.badge-type { background: rgba(255,255,255,0.9); color: var(--blue); }
.badge-past { background: #94a3b8; color: white; }
.event-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.event-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--blue); margin-bottom: 0.5rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.needs-preview { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #e2e8f0; }
.needs-preview h4 { font-size: 0.8rem; color: var(--red); font-weight: 700; margin-bottom: 0.5rem; }
.need-item { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 0.25rem 0; color: var(--text-muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; box-shadow: var(--shadow); min-width: 0; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem; background: linear-gradient(transparent, rgba(0,0,0,0.75)); color: white; font-size: 0.85rem; font-weight: 600; transform: translateY(100%); transition: var(--transition); }
.gallery-item:hover .caption { transform: translateY(0); }
.gallery-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue-pale), #dbeafe); font-size: 2.5rem; }

#team-services { background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); }
.team-services-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 2.5rem; align-items: start; }
.team-poster-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--white); }
.team-poster { width: 100%; display: block; cursor: zoom-in; transition: var(--transition); }
.team-poster:hover { transform: scale(1.02); }
.team-services-only .team-intro { text-align: center; max-width: 640px; margin: 0 auto 1.5rem; }
.team-services-only ul { max-width: 900px; margin: 0 auto; }
.team-services-list ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.65rem 1.5rem; }
.team-services-list li a { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.65rem 0.85rem; background: var(--white); border-radius: var(--radius-sm); border: 1px solid #e2e8f0; color: var(--text); font-size: 0.92rem; font-weight: 600; transition: var(--transition); }
.team-services-list li a::before { content: '✓'; color: var(--orange); font-weight: 800; flex-shrink: 0; }

.team-services-list li a:hover { border-color: var(--logo-orange); color: var(--logo-orange); box-shadow: var(--shadow); }

.donate-banner { background: linear-gradient(135deg, var(--red), var(--red-dark)); border-radius: var(--radius); padding: 3rem; color: white; text-align: center; position: relative; overflow: hidden; }
.donate-banner h2 { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; }
.donate-banner p { opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.donate-methods { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.donate-method { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius-sm); padding: 1.25rem 2rem; min-width: 200px; }
.donate-method .icon { font-size: 1.5rem; margin-bottom: 0.35rem; }
.donate-method h4 { font-size: 0.85rem; margin-bottom: 0.35rem; opacity: 0.9; }
.donate-method a { color: #FFD4DC; font-weight: 700; font-size: 1.1rem; }
.donate-method span { color: #FFD4DC; font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-info-card { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #f1f5f9; }
.contact-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-pale); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.contact-item h4 { font-weight: 700; color: var(--blue); }
.contact-item a { color: var(--logo-orange); font-weight: 600; }
.contact-item a:hover { text-decoration: underline; }
.contact-map { background: var(--blue-pale); border-radius: var(--radius); min-height: 300px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; color: var(--blue); font-weight: 600; }

.site-footer { background: var(--blue); color: rgba(255,255,255,0.85); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand h3 { color: white; font-size: 1.2rem; font-weight: 800; margin-bottom: 0.75rem; }
.footer-links h4 { color: white; font-weight: 700; margin-bottom: 1rem; }
.footer-links a { display: block; padding: 0.3rem 0; font-size: 0.9rem; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.5rem; text-align: center; font-size: 0.85rem; opacity: 0.7; }

.page-hero { background: linear-gradient(135deg, var(--blue), #0F2D5A); color: white; padding: 3rem 0; text-align: center; }
.page-hero .cat-icon { font-size: 3rem; margin-bottom: 1rem; }
.page-hero h1 { font-size: 2rem; font-weight: 900; margin-bottom: 0.5rem; }
.page-hero p { opacity: 0.9; max-width: 640px; margin-inline: auto; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.filter-tab { padding: 0.5rem 1.25rem; border-radius: 50px; border: 2px solid #e2e8f0; background: white; font-family: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: var(--transition); color: var(--text-muted); }
.filter-tab.active, .filter-tab:hover { border-color: var(--blue); background: var(--blue); color: white; }

.lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox-close { position: absolute; top: 1.5rem; left: 1.5rem; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; }

.admin-body { background: #f1f5f9; min-height: 100vh; }
.admin-header { background: var(--blue); color: white; padding: 1rem 0; }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-panel { padding: 1.5rem 0 3rem; }
.admin-login { max-width: 400px; margin: 4rem auto; background: white; padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.btn-link { background: none; border: none; color: var(--blue); font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }
.btn-link:hover { color: #153a6b; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem 1rem; border: 2px solid #e2e8f0; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem; direction: rtl; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.admin-tab { padding: 0.6rem 1.25rem; border-radius: 8px; border: none; background: white; font-family: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.admin-tab.active { background: var(--blue); color: white; }
.admin-tab-content { display: block; }
.admin-card { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.admin-event-list { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-event-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 0.75rem; gap: 1rem; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; border-radius: 6px; border: none; cursor: pointer; font-family: inherit; font-weight: 600; }
.btn-edit { background: var(--blue-pale); color: var(--blue); }
.btn-delete { background: #FEE2E2; color: #DC2626; }
.btn-save { background: #D1FAE5; color: #059669; width: 100%; padding: 0.85rem; font-size: 1rem; margin-top: 1rem; border: none; border-radius: var(--radius-sm); font-family: inherit; font-weight: 700; cursor: pointer; }
.need-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.5rem; margin-bottom: 0.5rem; }
.need-row input { padding: 0.5rem; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; direction: rtl; }
.team-item-row { display: grid; grid-template-columns: 1fr 180px auto auto auto; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; }
.team-item-row input, .team-item-row select { padding: 0.5rem; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; direction: rtl; }
.admin-inline-row {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 1.4fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.admin-inline-row input {
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
  direction: rtl;
  width: 100%;
}
.admin-card-mini {
  background: var(--bg);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.85rem;
}
.admin-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.admin-gallery-list { display: flex; flex-direction: column; gap: 0.75rem; max-height: 70vh; overflow-y: auto; }
.admin-gallery-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; background: var(--bg); border-radius: var(--radius-sm); }
.admin-gal-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #e2e8f0; }
.admin-gal-vid, .admin-gal-broken { width: 72px; height: 54px; display: flex; align-items: center; justify-content: center; background: #1e293b; color: #fff; border-radius: 6px; font-size: 1.25rem; flex-shrink: 0; }
.admin-gal-info { flex: 1; min-width: 0; }
.admin-gal-info input { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; margin-bottom: 0.25rem; }
.admin-gal-info small { color: var(--text-muted); font-size: 0.75rem; word-break: break-all; }
.admin-actions { display: flex; gap: 0.35rem; flex-shrink: 0; flex-wrap: wrap; }
.alert { padding: 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 600; font-size: 0.9rem; }
.alert-success { background: #D1FAE5; color: #065F46; }
.alert-error { background: #FEE2E2; color: #991B1B; }
.alert-info { background: var(--blue-pale); color: var(--blue); }
.hidden { display: none !important; }
.loading { text-align: center; padding: 3rem; color: var(--text-muted); }
.upload-hint { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5rem; }
.upload-hint--secure { color: #92400e; }

.analytics-overview-card { overflow: hidden; }
.analytics-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.analytics-date-note { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.35rem; line-height: 1.6; }
.analytics-section-title { color: var(--blue); font-weight: 800; margin-bottom: 0.75rem; }
.analytics-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.analytics-stat {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1rem 0.75rem;
  text-align: center;
}
.analytics-stat-icon { display: block; font-size: 1.25rem; margin-bottom: 0.35rem; }
.analytics-stat .num { font-size: 1.75rem; font-weight: 900; color: var(--red); }
.analytics-stat .lbl { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.analytics-total-bar {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}
.analytics-table { width: 100%; border-collapse: collapse; }
.analytics-table th, .analytics-table td { padding: 0.75rem; border-bottom: 1px solid #e2e8f0; text-align: right; }
.analytics-table th { color: var(--blue); font-weight: 700; font-size: 0.85rem; }

.event-back-actions { margin-top: 2rem; text-align: center; }
.event-back-actions .btn { width: 100%; max-width: 360px; justify-content: center; }

@media (max-width: 768px) {
  .team-services-grid { grid-template-columns: 1fr; }

  .nav-desktop { display: none; }
  .menu-toggle { display: block; min-width: 44px; min-height: 44px; }
  .header-inner { padding: 0.35rem 0; gap: 0.5rem; }
  .brand { min-width: 0; flex: 1; }
  .brand-logo-full { height: 42px; max-width: min(55vw, 180px); }
  .brand img { height: 42px; }
  .container { padding-inline: max(0.85rem, env(safe-area-inset-right)) max(0.85rem, env(safe-area-inset-left)); }

  section { padding: 2.25rem 0; }
  .section-header { margin-bottom: 1.5rem; }
  .section-header h2 { font-size: clamp(1.35rem, 6vw, 1.75rem); line-height: 1.35; }
  .section-header p { font-size: 0.9rem; padding-inline: 0; line-height: 1.7; }

  .hero { min-height: auto; }
  .hero-content { padding: 1.75rem 0 2.5rem; max-width: 100%; }
  .hero-logo { height: clamp(72px, 18vw, 110px); margin-bottom: 1.1rem; }
  .hero-badge { font-size: 0.78rem; padding: 0.35rem 0.75rem; margin-bottom: 1rem; max-width: 100%; }
  .hero-title { font-size: clamp(1.3rem, 6.2vw, 1.75rem); margin-bottom: 0.85rem; }
  .hero-verse {
    font-size: 0.9rem;
    margin-bottom: 1.35rem;
    min-height: 0;
    padding-right: 0.75rem;
    line-height: 1.75;
  }
  .hero-actions { flex-direction: column; width: 100%; gap: 0.75rem; }
  .hero-actions .btn { width: 100%; justify-content: center; min-height: 48px; font-size: 0.92rem; }
  .hero-video { opacity: 0.28; }

  .impact-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }
  .impact-card { padding: 1rem 0.65rem; border-radius: 12px; }
  .impact-num { font-size: clamp(1.35rem, 7vw, 1.75rem); }
  .impact-label { font-size: 0.88rem; }
  .impact-detail { font-size: 0.75rem; line-height: 1.45; }
  .impact-list ul { grid-template-columns: 1fr; gap: 0.55rem; }
  .impact-list li {
    padding: 0.7rem 0.75rem;
    font-size: 0.84rem;
    line-height: 1.6;
    gap: 0.5rem;
  }

  .verse-banner { padding: 1.5rem 0; }
  .verse-banner-inner {
    flex-direction: column;
    gap: 0.35rem;
    padding-inline: 0.25rem;
  }
  .verse-banner-text {
    font-size: 0.9rem;
    min-height: 0;
    line-height: 1.75;
  }

  .latest-activity-card {
    grid-template-columns: 1fr;
    padding: 1.1rem;
    gap: 1.15rem;
    border-right-width: 3px;
  }
  .latest-activity-info h3 { font-size: 1.15rem; }
  .latest-activity-info p { font-size: 0.9rem; }
  .latest-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .latest-activity-info .btn { width: 100%; justify-content: center; min-height: 46px; }

  .participate-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .participate-card { padding: 1.25rem 1.1rem; min-height: auto; }
  .participate-card h3 { font-size: 1.1rem; }
  .participate-card p { font-size: 0.9rem; }

  .pray-section { padding: 2rem 0; }
  .pray-card { padding: 0.5rem 0 0; max-width: 100%; }
  .pray-card h2 { font-size: 1.35rem; }
  .pray-requests { margin: 1.25rem 0 1rem; }
  .pray-request-item { padding: 0.85rem 0.9rem; gap: 0.65rem; }
  .pray-request-item h3 { font-size: 0.98rem; }
  .pray-request-item p { font-size: 0.88rem; }

  .gallery-teaser-actions { margin-top: 1.35rem; }
  .gallery-teaser-actions .btn { width: 100%; max-width: 100%; justify-content: center; min-height: 48px; }
  .gallery-grid,
  .gallery-grid--teaser,
  .gallery-grid--page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .gallery-item .caption {
    transform: translateY(0);
    font-size: 0.68rem;
    padding: 0.4rem 0.45rem;
    line-height: 1.35;
  }
  .gallery-page-section { padding-top: 1.5rem; }
  .gallery-count-line { font-size: 0.85rem; }

  .vision-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .vision-card { padding: 1.25rem; }
  .vision-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .stat-card { padding: 0.85rem 0.35rem; }
  .stat-card .num { font-size: 1.35rem; }
  .stat-card .label { font-size: 0.68rem; line-height: 1.35; }

  .categories-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .category-card { padding: 1.35rem 1.15rem; }

  .events-grid { grid-template-columns: 1fr; gap: 0.85rem; }
  .event-img { height: 170px; }
  .event-body { padding: 1.05rem; }
  .event-meta { font-size: 0.76rem; gap: 0.45rem; }
  .event-badges { flex-wrap: wrap; max-width: calc(100% - 0.75rem); }

  .team-services-list ul { grid-template-columns: 1fr; }
  .team-services-list li a { font-size: 0.86rem; padding: 0.7rem 0.75rem; min-height: 44px; }

  .donate-banner { padding: 1.75rem 1rem; }
  .donate-banner h2 { font-size: 1.35rem; }
  .donate-banner p { font-size: 0.9rem; margin-bottom: 1.35rem; }
  .donate-methods { gap: 0.65rem; margin-top: 1.35rem; }
  .donate-method { min-width: 0; flex: 1 1 calc(50% - 0.4rem); padding: 0.9rem 0.65rem; }
  .donate-method a, .donate-method span { font-size: 0.88rem; word-break: break-word; }

  .page-hero { padding: 1.75rem 0; }
  .page-hero h1 { font-size: 1.35rem; line-height: 1.35; }
  .page-hero .cat-icon { font-size: 2.1rem; }
  .page-hero p { font-size: 0.9rem; padding-inline: 0.15rem; }

  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
    margin-inline: 0;
    max-width: 100%;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { flex-shrink: 0; min-height: 44px; }

  .contact-info-card { padding: 1.2rem; }
  .contact-map { min-height: 200px; padding: 1.35rem 1rem; }
  .site-footer { padding: 1.75rem 0 1.15rem; padding-bottom: max(1.15rem, env(safe-area-inset-bottom)); }
  .footer-links a { word-break: break-word; }

  .event-detail-card { padding: 1.15rem; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .video-grid { grid-template-columns: 1fr; }
  .event-back-actions .btn { max-width: none; width: 100%; }

  .form-row, .need-row { grid-template-columns: 1fr; }
  .team-item-row { grid-template-columns: 1fr; }
  .admin-inline-row { grid-template-columns: 1fr; }
  .admin-gallery-item { flex-direction: column; align-items: flex-start; }
  .admin-event-item { flex-direction: column; align-items: flex-start; }

  .admin-header-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .admin-header-actions { justify-content: center; }
  .admin-panel { padding: 1rem 0 2rem; }
  .admin-card { padding: 1rem; }
  .admin-tabs { margin-inline: -0.15rem; }
  .analytics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .analytics-stat { padding: 0.85rem 0.5rem; }
  .analytics-stat .lbl { font-size: 0.72rem; }
  .analytics-card-header { flex-direction: column; align-items: stretch; }
  .analytics-card-header .btn-sm { width: 100%; text-align: center; padding: 0.65rem; }
  .analytics-table { font-size: 0.85rem; }
  .analytics-table th, .analytics-table td { padding: 0.6rem 0.65rem; }

  .mobile-nav a { min-height: 44px; display: flex; align-items: center; }
  .lightbox-close { top: max(1rem, env(safe-area-inset-top)); left: max(1rem, env(safe-area-inset-left)); min-width: 44px; min-height: 44px; }
  .lightbox { padding: 1rem; }
  .lightbox-content img, .lightbox-content video { max-width: 92vw; max-height: 75vh; }
}

@media (max-width: 380px) {
  .donate-method { flex: 1 1 100%; }
  .vision-stats { grid-template-columns: 1fr; }
  .impact-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .impact-card { padding: 0.9rem 0.75rem; }
  .stat-card .num { font-size: 1.25rem; }
  .hero-actions .btn { font-size: 0.88rem; padding: 0.75rem 1rem; }
  .latest-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pray-request-item { flex-direction: row; }
}

@media (max-width: 980px) and (min-width: 769px) {
  .impact-highlights { grid-template-columns: repeat(2, 1fr); }
  .latest-activity-card { grid-template-columns: 1fr; }
  .participate-grid { grid-template-columns: 1fr; }
}

.badge-media { background: rgba(0,0,0,0.55); color: #fff; }
.event-img-link { display: block; color: inherit; }
.event-body h3 a { color: var(--blue); }
.event-body h3 a:hover { color: var(--logo-orange); }
.event-more-link { display: inline-block; margin-top: 1rem; font-weight: 700; font-size: 0.9rem; color: var(--logo-orange); }

/* —— أثر الخدمة —— */
.impact-section {
  background:
    linear-gradient(180deg, #fff 0%, var(--blue-pale) 100%);
}
.impact-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.impact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--logo-orange);
  transition: var(--transition);
}
.impact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.impact-num {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 900;
  color: var(--red);
  line-height: 1.1;
}
.impact-label {
  font-weight: 800;
  color: var(--blue);
  margin: 0.35rem 0 0.25rem;
}
.impact-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
}
.impact-list ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
}
.impact-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.65;
  box-shadow: 0 2px 12px rgba(27, 79, 138, 0.06);
}
.impact-check { flex-shrink: 0; line-height: 1.6; }

/* موبايل: أثر الخدمة — أقصى عمودين مهما زاد عدد البطاقات */
@media (max-width: 768px) {
  .impact-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }
  .impact-card {
    padding: 1rem 0.7rem;
    border-radius: 12px;
  }
  .impact-num { font-size: clamp(1.35rem, 7vw, 1.75rem); }
  .impact-label { font-size: 0.88rem; }
  .impact-detail { font-size: 0.75rem; line-height: 1.45; }
  .impact-list ul { grid-template-columns: 1fr; gap: 0.55rem; }
  .impact-list li {
    padding: 0.7rem 0.75rem;
    font-size: 0.84rem;
    line-height: 1.6;
  }
}

@media (max-width: 980px) and (min-width: 769px) {
  .impact-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* —— آية دوّارة —— */
.verse-banner {
  padding: 2.5rem 0;
  background: linear-gradient(120deg, var(--logo-dark) 0%, var(--logo-dark-mid) 55%, #123038 100%);
}
.verse-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}
.verse-banner-mark {
  color: var(--logo-orange);
  font-size: 1.6rem;
  flex-shrink: 0;
}
.verse-banner-text {
  color: #F0FAFC;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.9;
  min-height: 3.5em;
  transition: opacity 0.3s ease;
}

/* —— آخر نشاط —— */
.latest-activity-section { background: var(--bg); }
.latest-activity-card {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 2rem;
  align-items: start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-right: 4px solid var(--logo-orange);
}
.latest-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  align-items: center;
}
.latest-pill {
  background: var(--blue-pale);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
.latest-date { color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }
.latest-activity-info h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.latest-activity-info p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.latest-location { font-weight: 700 !important; color: var(--text) !important; }
.latest-photos-title {
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 0.85rem;
  font-size: 1rem;
}
.latest-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.latest-photo {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--blue-pale);
}
.latest-photo .protected-media,
.latest-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.latest-no-photos {
  color: var(--text-muted);
  font-weight: 600;
  padding: 1rem 0;
}

/* —— إزاي تشارك —— */
.participate-section { background: #fff; }
.participate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.participate-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid rgba(27, 79, 138, 0.1);
  transition: var(--transition);
  min-height: 100%;
}
.participate-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--logo-orange);
}
.participate-icon { font-size: 2.25rem; line-height: 1; }
.participate-card h3 {
  color: var(--blue);
  font-weight: 800;
  font-size: 1.25rem;
}
.participate-card p {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  line-height: 1.7;
}
.participate-cta {
  color: var(--logo-orange);
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}
.participate-pray { border-top: 3px solid var(--logo-cyan); }
.participate-volunteer { border-top: 3px solid var(--blue); }
.participate-donate { border-top: 3px solid var(--red); }

/* موبايل: آخر نشاط + طرق المشاركة (بعد تعريف الديسكتوب عشان يتطبّق) */
@media (max-width: 768px) {
  .latest-activity-section { padding: 2rem 0; }
  .latest-activity-card {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 1.25rem;
    padding: 1.15rem 1rem;
    border-right-width: 3px;
    border-radius: 14px;
  }
  .latest-activity-info {
    order: 1;
  }
  .latest-activity-media {
    order: 2;
    width: 100%;
  }
  .latest-activity-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
  }
  .latest-pill {
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
  }
  .latest-date {
    font-size: 0.82rem;
  }
  .latest-activity-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.55rem;
  }
  .latest-activity-info p {
    font-size: 0.88rem;
    margin-bottom: 0.55rem;
    line-height: 1.7;
  }
  .latest-photos-title {
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
  }
  .latest-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .latest-photo {
    border-radius: 10px;
  }
  .latest-activity-info .btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
    margin-top: 0.35rem;
  }

  .participate-section { padding: 2rem 0; }
  .participate-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }
  .participate-card {
    width: 100%;
    min-height: auto;
    padding: 1.25rem 1.1rem;
  }
  .participate-card h3 { font-size: 1.1rem; }
  .participate-card p { font-size: 0.9rem; }
  .participate-icon { font-size: 1.85rem; }
}

@media (max-width: 980px) and (min-width: 769px) {
  .latest-activity-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .latest-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .participate-grid { grid-template-columns: 1fr; }
}

.pray-section {
  padding: 3rem 0;
  background: linear-gradient(160deg, var(--blue-pale) 0%, #fff 100%);
}
.pray-card {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.pray-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.pray-card h2 {
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 0.85rem;
}
.pray-card p {
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.85;
  margin-bottom: 0.75rem;
}
.pray-requests {
  text-align: right;
  margin: 1.75rem 0 1.25rem;
}
.pray-requests-list {
  display: grid;
  gap: 0.85rem;
  list-style: none;
}
.pray-request-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(27, 79, 138, 0.1);
  border-right: 3px solid var(--logo-orange);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 12px rgba(27, 79, 138, 0.06);
}
.pray-request-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1.4;
}
.pray-request-item h3 {
  color: var(--blue);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}
.pray-request-item p {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0;
}
.pray-empty {
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  margin: 1rem 0;
}
.pray-hint {
  color: var(--logo-orange) !important;
  font-weight: 800 !important;
  margin-bottom: 0 !important;
}

.gallery-teaser-section { background: #fff; }
.gallery-teaser-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.gallery-grid--teaser {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
}
.gallery-page-hero {
  background: linear-gradient(135deg, var(--logo-dark) 0%, var(--logo-dark-mid) 55%, #123038 100%);
}
.gallery-count-line {
  margin-top: 0.85rem;
  font-weight: 700;
  opacity: 0.9;
  font-size: 0.95rem;
}
.gallery-page-section { padding-top: 2.5rem; }
.gallery-grid--page {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1.15rem;
}
.gallery-grid--page .gallery-item {
  aspect-ratio: 4/3;
}
.gallery-grid--page .gallery-item .caption {
  transform: translateY(0);
  font-size: 0.82rem;
  padding: 0.65rem 0.85rem;
}

.gallery-video-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e, #16213e); color: white; font-size: 1.5rem; font-weight: 700; }
.gallery-item-video::after { content: '▶'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 2rem; color: white; text-shadow: 0 2px 8px rgba(0,0,0,0.5); pointer-events: none; }

.lightbox-content { max-width: 95vw; max-height: 90vh; }
.lightbox-content img, .lightbox-content video { max-width: 95vw; max-height: 85vh; border-radius: 8px; }
.lightbox-content .video-wrap { width: min(90vw, 800px); }

.event-detail-card { background: white; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); margin-bottom: 2rem; }
.event-detail-desc { font-size: 1.05rem; line-height: 1.9; color: var(--text-muted); margin: 1rem 0; }
.event-needs-box { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed #e2e8f0; }
.event-needs-box h3 { color: var(--red); font-size: 1rem; margin-bottom: 0.75rem; }

.media-section { margin-bottom: 2.5rem; }
.media-section h3 { color: var(--blue); font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.media-thumb { aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: var(--transition); }
.media-thumb:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-sm); background: #000; box-shadow: var(--shadow); }
.video-wrap iframe, .video-wrap video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-link-card { background: var(--blue-pale); border-radius: var(--radius-sm); padding: 2rem; text-align: center; }
.video-link-card a { color: var(--blue); font-weight: 700; font-size: 1.1rem; }

.upload-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; padding: 1rem; background: var(--bg); border-radius: var(--radius-sm); border: 2px dashed #cbd5e1; }
.upload-zone small { width: 100%; color: var(--text-muted); font-size: 0.8rem; }
.media-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.upload-pending-hint { margin-top: 0.5rem; padding: 0.65rem 0.85rem; background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius-sm); color: #8d6e00; font-size: 0.85rem; }

.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.upload-overlay.hidden { display: none; }
.upload-overlay-box {
  width: min(92vw, 380px);
  padding: 2rem 1.75rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}
.upload-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  border: 4px solid #e2e8f0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: upload-spin 0.85s linear infinite;
}
@keyframes upload-spin { to { transform: rotate(360deg); } }
.upload-overlay-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.upload-overlay-status {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.25rem;
  word-break: break-word;
}
.upload-progress-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.upload-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), #3b82f6);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.upload-progress-percent {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
}
.upload-cancel-btn {
  margin-top: 1.25rem;
  width: 100%;
  justify-content: center;
  border-color: #ef4444;
  color: #dc2626;
}
.upload-cancel-btn:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #dc2626;
}
.upload-cancel-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.preview-thumb { width: 80px; text-align: center; }
.preview-thumb img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.preview-thumb span { font-size: 0.65rem; color: var(--text-muted); display: block; margin-top: 0.25rem; word-break: break-all; }
.preview-video { width: 80px; height: 60px; background: #1e293b; color: white; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }

@media (hover: none) {
  .gallery-item .caption { transform: translateY(0); }
  .category-card:hover, .event-card:hover { transform: none; }
}

/* ——— حماية الصور والفيديوهات ——— */
:root { --watermark-text: 'خدمة الرب راعي'; }

.protected-media {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.protected-media img {
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.protected-media .media-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

.protected-media .media-watermark {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.protected-media .media-watermark::before {
  content: var(--watermark-text, 'خدمة الرب راعي');
  font-size: clamp(0.65rem, 2.5vw, 0.95rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.48);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  transform: rotate(-28deg);
  white-space: nowrap;
}

.protected-media--lightbox .media-watermark::before {
  font-size: clamp(1.1rem, 5vw, 2rem);
}

.protected-media--card,
.protected-media--thumb,
.protected-media--gallery {
  width: 100%;
  height: 100%;
}

.protected-media--card img,
.protected-media--thumb img,
.protected-media--gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.protected-media--lightbox img {
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.protected-media--lightbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.protected-media--lightbox video {
  pointer-events: auto;
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 8px;
}

.protected-media--video video {
  pointer-events: auto;
}

.protected-media--video .media-watermark {
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.6rem;
}

.protected-media--video .media-watermark::before {
  font-size: 0.72rem;
  transform: none;
  opacity: 0.85;
}

.video-wrap.protected-embed {
  position: relative;
}

.video-wrap.protected-embed .media-watermark {
  position: absolute;
  inset: 0;
  z-index: 1;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.5rem;
}

.video-wrap.protected-embed .media-watermark::before {
  font-size: 0.7rem;
  transform: none;
  opacity: 0.75;
}

.upload-hint--secure {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #e8f4fd;
  border: 1px solid #90caf9;
  border-radius: var(--radius-sm);
  color: #1565c0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.upload-zone-details {
  margin: 0.75rem 0;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  background: var(--bg);
}

.upload-zone-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.35rem 0;
}

.upload-zone-details .upload-zone {
  margin-top: 0.5rem;
  border: none;
  padding: 0;
  background: transparent;
}


/* Mobile overflow guards for new homepage sections */
.impact-card,
.impact-list li,
.participate-card,
.latest-activity-card,
.pray-request-item,
.verse-banner-inner {
  min-width: 0;
  max-width: 100%;
}
.impact-list li span:last-child,
.participate-card p,
.pray-request-item p,
.latest-activity-info p {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.protected-media,
.protected-media img,
.latest-photo,
.gallery-item img {
  max-width: 100%;
}
