/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --primary:     #2596be;
  --primary-dk:  #1a7a9e;
  --primary-lt:  #e8f5fb;
  --accent:      #e8a020;
  --bg:          #ffffff;
  --bg2:         #f7f9fc;
  --bg3:         #eef2f7;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --text:        #1a202c;
  --text2:       #4a5568;
  --text3:       #718096;
  --danger:      #e53e3e;
  --live:        #38a169;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --radius:      12px;
  --radius-lg:   20px;
  --nav-h:       70px;
  --topbar-h:    36px;
  --trans:       .22s ease;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Inter', sans-serif;
}

[lang="ar"] {
  --font-body: 'Amiri', 'Inter', sans-serif;
  --font-head: 'Amiri', Georgia, serif;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; object-fit: cover; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  background: var(--primary);
  height: var(--topbar-h);
  display: flex; align-items: center;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,.85); letter-spacing: .04em;
}
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  font-size: 11px; font-weight: 500; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 99px;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.25);
  transition: all var(--trans);
}
.lang-btn.active, .lang-btn:hover {
  background: rgba(255,255,255,.2); color: #fff;
  border-color: rgba(255,255,255,.5);
}

/* ── NAV ────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--trans);
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 40px;
  padding: 0 24px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); }
.logo-sub { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  font-size: 13px; font-weight: 500; letter-spacing: .03em;
  color: var(--text2); padding: 7px 14px; border-radius: 8px;
  transition: all var(--trans);
}
.nav-links a:hover { color: var(--primary); background: var(--primary-lt); }
.nav-links a.active { color: var(--primary); background: var(--primary-lt); font-weight: 600; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; margin-left: auto; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--trans); }
.mobile-menu {
  display: none; flex-direction: column;
  position: sticky; top: var(--nav-h); z-index: 99;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 14px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--text2);
  transition: all var(--trans);
}
.mobile-menu a:hover { color: var(--primary); background: var(--primary-lt); }

/* ── SECTIONS ───────────────────────────────────────────────── */
.section { display: none; min-height: calc(100vh - var(--nav-h) - var(--topbar-h)); padding-bottom: 80px; }
.section.active { display: block; animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.page-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 48px 24px 32px;
}
.page-header-inner { max-width: 1200px; margin: 0 auto; }
.page-header h2 {
  font-family: var(--font-head); font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; color: var(--text); line-height: 1.1;
  display: flex; align-items: center; gap: 16px;
}
.page-header p { color: var(--text3); margin-top: 8px; font-size: 15px; }

.container { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  padding: 14px 32px; border-radius: var(--radius);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  box-shadow: 0 4px 14px rgba(37,150,190,.35);
}
.btn-primary:hover { background: var(--primary-dk); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,150,190,.45); }
.btn-outline {
  background: transparent; color: var(--primary);
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  padding: 13px 32px; border-radius: var(--radius);
  border: 2px solid var(--primary);
  transition: all var(--trans);
}
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  background: var(--surface);
  min-height: calc(100vh - var(--nav-h) - var(--topbar-h) - 200px);
  display: flex; align-items: center;
  padding: 80px 24px;
  max-width: 1200px; margin: 0 auto;
  gap: 60px;
}
.hero-content { flex: 1; max-width: 560px; }
.hero-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 24px;
}
.eyebrow-line { display: block; width: 32px; height: 2px; background: var(--primary); border-radius: 2px; }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700; line-height: 1.05;
  color: var(--text); margin-bottom: 24px;
  display: flex; flex-direction: column;
}
.hero-title em { color: var(--primary); font-style: italic; }
.hero-sub { font-size: 17px; color: var(--text2); line-height: 1.7; margin-bottom: 36px; max-width: 440px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 320px;
}
.hero-cross-wrap { position: relative; width: 280px; height: 280px; display: flex; align-items: center; justify-content: center; }
.hero-cross {
  font-size: 72px; color: var(--primary); z-index: 2; position: relative;
  text-shadow: 0 4px 24px rgba(37,150,190,.25);
}
.hero-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--primary); opacity: 0;
  animation: ripple 3s ease-out infinite;
}
.ring-1 { width: 100px; height: 100px; animation-delay: 0s; }
.ring-2 { width: 180px; height: 180px; animation-delay: .8s; }
.ring-3 { width: 260px; height: 260px; animation-delay: 1.6s; }
@keyframes ripple {
  0%   { transform: scale(.8); opacity: .5; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* ── QUICK CARDS ────────────────────────────────────────────── */
.quick-cards {
  background: var(--primary);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.quick-card {
  display: flex; align-items: center; gap: 16px;
  padding: 28px 24px; cursor: pointer;
  border-right: 1px solid rgba(255,255,255,.12);
  transition: background var(--trans);
}
.quick-card:last-child { border-right: none; }
.quick-card:hover { background: var(--primary-dk); }
.qc-icon { font-size: 24px; color: rgba(255,255,255,.7); flex-shrink: 0; }
.qc-text { flex: 1; min-width: 0; }
.qc-text h3 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.qc-text p { font-size: 12px; color: rgba(255,255,255,.65); line-height: 1.4; }
.qc-arrow { font-size: 18px; color: rgba(255,255,255,.5); flex-shrink: 0; }

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.filter-btn {
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  padding: 8px 20px; border-radius: 99px;
  border: 1.5px solid var(--border); color: var(--text2);
  background: var(--surface); transition: all var(--trans);
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-lt);
}

/* ── MEDIA GRID ─────────────────────────────────────────────── */
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.media-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans);
  border: 1px solid var(--border);
}
.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.media-thumb {
  width: 100%; aspect-ratio: 16/9; background: var(--bg3);
  position: relative; overflow: hidden;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.media-card:hover .media-thumb img { transform: scale(1.04); }
.media-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--primary); opacity: .3;
  background: var(--primary-lt);
}
.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(37,150,190,.15); opacity: 0; transition: opacity var(--trans);
}
.media-card:hover .play-overlay { opacity: 1; }
.play-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; padding-left: 3px;
  box-shadow: 0 4px 20px rgba(37,150,190,.5);
}
.media-type-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px;
}
.badge-audio { background: var(--primary); color: #fff; }
.badge-video { background: var(--accent); color: #fff; }
.media-body { padding: 18px 20px 20px; }
.media-title {
  font-family: var(--font-head); font-size: 18px; font-weight: 600;
  color: var(--text); line-height: 1.3; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.media-author { font-size: 12px; color: var(--text3); }

/* ── LIVE ───────────────────────────────────────────────────── */
.live-pulse {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 50%; background: var(--live);
  box-shadow: 0 0 0 0 rgba(56,161,105,.5);
  animation: pulse-live 2s infinite;
}
@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(56,161,105,.5); }
  70%  { box-shadow: 0 0 0 10px rgba(56,161,105,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,161,105,0); }
}
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.live-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border);
  transition: transform var(--trans), box-shadow var(--trans);
}
.live-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.live-thumb { width: 100%; aspect-ratio: 16/9; background: var(--bg3); position: relative; overflow: hidden; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--live); color: #fff;
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px;
}
.live-body { padding: 18px 20px; }
.live-title { font-family: var(--font-head); font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.live-desc { font-size: 13px; color: var(--text3); }
.no-live-state { text-align: center; padding: 80px 24px; color: var(--text3); }
.no-live-state .icon { font-size: 56px; margin-bottom: 16px; opacity: .2; color: var(--primary); }

/* ── EVENTS ─────────────────────────────────────────────────── */
.events-list { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.event-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  padding: 24px 28px; display: flex; gap: 24px; align-items: flex-start;
  transition: transform var(--trans), box-shadow var(--trans);
}
.event-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.event-date-box {
  flex-shrink: 0; text-align: center;
  background: var(--primary-lt); border: 2px solid var(--primary);
  border-radius: 12px; padding: 10px 16px; min-width: 68px;
}
.event-day { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1; }
.event-month { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-top: 2px; }
.event-info { flex: 1; }
.event-title { font-family: var(--font-head); font-size: 22px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.event-desc { font-size: 13px; color: var(--text2); line-height: 1.6; }
.event-time { display: block; font-size: 12px; font-weight: 600; color: var(--primary); margin-top: 10px; }

/* ── DEVOTIONALS ────────────────────────────────────────────── */
.devos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.devo-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  padding: 28px 24px; overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
}
.devo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.devo-date { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.devo-title { font-family: var(--font-head); font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 12px; }
.devo-author { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.devo-verse {
  font-size: 13px; font-style: italic; color: var(--text2);
  border-left: 3px solid var(--primary); padding-left: 14px;
  line-height: 1.6; margin-bottom: 14px; background: var(--primary-lt);
  padding: 10px 14px; border-radius: 0 8px 8px 0;
}
.devo-preview { font-size: 13px; color: var(--text2); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── STATE BOXES ────────────────────────────────────────────── */
.state-box {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 24px; color: var(--text3); gap: 16px;
  text-align: center;
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 80px 24px; color: var(--text3); }
.empty-icon { font-size: 56px; opacity: .15; margin-bottom: 16px; color: var(--primary); }

/* ── LOAD MORE ──────────────────────────────────────────────── */
.load-more-wrap { text-align: center; padding: 40px 0 0; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--text); color: rgba(255,255,255,.6);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 18px; color: #fff; }
.footer-logo .logo-icon { color: var(--primary); }
.footer-copy { font-size: 12px; }

/* ── AUDIO PLAYER ───────────────────────────────────────────── */
.player-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--text); color: #fff;
  border-top: 1px solid rgba(255,255,255,.1);
  display: none; align-items: center; gap: 20px; padding: 12px 24px;
  transform: translateY(100%); transition: transform .3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
.player-bar.visible { display: flex; transform: translateY(0); }
.player-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.player-thumb { width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,.1); flex-shrink: 0; overflow: hidden; }
.player-thumb img { width: 100%; height: 100%; object-fit: cover; }
.player-title { font-size: 13px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-author { font-size: 11px; color: rgba(255,255,255,.5); }
.player-controls { display: flex; align-items: center; gap: 14px; flex: 2; max-width: 560px; }
.ctrl-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; padding-left: 2px;
  transition: background var(--trans);
}
.ctrl-btn:hover { background: var(--primary-dk); }
.ctrl-progress { flex: 1; display: flex; align-items: center; gap: 10px; }
.ctrl-time { font-size: 11px; color: rgba(255,255,255,.5); white-space: nowrap; }
#ctrlSeek { flex: 1; accent-color: var(--primary); height: 3px; cursor: pointer; }
.player-close { font-size: 14px; color: rgba(255,255,255,.4); padding: 8px; transition: color var(--trans); }
.player-close:hover { color: #fff; }

/* ── VIDEO MODAL ────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; animation: fadeUp .3s ease both; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 900px; overflow: hidden;
  position: relative; box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}
.modal-close:hover { background: rgba(0,0,0,.8); }
.modal-video-wrap { width: 100%; aspect-ratio: 16/9; background: #000; }
.modal-video-wrap iframe, .modal-video-wrap video { width: 100%; height: 100%; border: none; }
.modal-meta { padding: 20px 24px; }
.modal-meta h3 { font-family: var(--font-head); font-size: 20px; color: var(--text); margin-bottom: 4px; }
.modal-meta p { font-size: 13px; color: var(--text3); }

/* ── RTL SUPPORT ────────────────────────────────────────────── */
[dir="rtl"] .eyebrow-line { order: 1; }
[dir="rtl"] .qc-arrow { transform: scaleX(-1); }
[dir="rtl"] .event-card:hover { transform: translateX(-4px); }
[dir="rtl"] .devo-verse { border-left: none; border-right: 3px solid var(--primary); border-radius: 8px 0 0 8px; }
[dir="rtl"] .media-type-badge { left: auto; right: 10px; }
[dir="rtl"] .live-badge { left: auto; right: 10px; }
[dir="rtl"] .modal-close { right: auto; left: 14px; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .quick-cards { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-direction: column; gap: 40px; padding: 60px 24px; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-eyebrow { justify-content: center; }
  .hero-btns { justify-content: center; }
  .hero-sub { margin: 0 auto 36px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .quick-cards { grid-template-columns: 1fr 1fr; }
  .topbar-inner span:first-child { display: none; }
  .player-controls { flex: 1; }
  .ctrl-time { display: none; }
}
@media (max-width: 480px) {
  .quick-cards { grid-template-columns: 1fr; }
  .quick-card { border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); }
  .media-grid, .live-grid, .devos-grid { grid-template-columns: 1fr; }
  .event-card { flex-direction: column; gap: 16px; }
}
