/* ==========================================================
   أنماط وتنسيقات كنيسة الاتحاد المسيحي الإنجيلية المخصصة
   تدرجات ملكية، ظلال زجاجية، وخطوط روحية أنيقة
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-serif: 'Amiri', serif;
  --color-gold: #C5A059;
  --color-gold-light: #DFCA9B;
  --color-gold-dark: #A27B31;
  --color-navy: #0F1E36;
  --color-navy-light: #1E3A8A;
  --color-cream: #FDFBF7;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-cream);
  color: #2D3748;
  overflow-x: hidden;
}

.font-serif-spiritual {
  font-family: var(--font-serif);
}

/* التدرجات اللونية الفخمة */
.bg-gradient-holy {
  background: linear-gradient(135deg, #0A1424 0%, #152542 50%, #1E355B 100%);
}

.bg-gradient-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #C5A059 50%, #A27B31 100%);
}

.bg-gradient-cream {
  background: linear-gradient(180deg, #FFFFFF 0%, #FDFBF7 100%);
}

.text-gold-gradient {
  background: linear-gradient(135deg, #DFCA9B 0%, #C5A059 50%, #A27B31 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* تأثير الزجاج الفاخر Glassmorphism */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px -10px rgba(15, 30, 54, 0.06);
}

.glass-dark-card {
  background: rgba(15, 30, 54, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

/* تأثيرات التمرير الناعمة */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -10px rgba(15, 30, 54, 0.12);
}

/* هالة روحانية خفيفة */
.spiritual-glow {
  position: relative;
}

.spiritual-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================
   أنيميشن مسيحي هادئ وروحاني (Spiritual Christian Animations)
   أشعة نور سماوية، حمامة سلام عائمة، وهالة مقدسة للصليب
   ========================================================== */

/* أشعة ضوئية روحانية خافتة Divine Light Beams */
.divine-light-beam {
  position: absolute;
  top: -20%;
  left: 25%;
  width: 450px;
  height: 140%;
  background: radial-gradient(ellipse at top, rgba(212, 175, 55, 0.12) 0%, rgba(223, 202, 155, 0.05) 45%, transparent 75%);
  transform: rotate(-25deg);
  filter: blur(40px);
  animation: beamSway 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes beamSway {
  0% {
    transform: rotate(-28deg) translateY(-2%);
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    transform: rotate(-22deg) translateY(2%);
    opacity: 0.6;
  }
}

/* رموز مسيحية عائمة في الخلفية بنعومة بالغة */
.spiritual-particle {
  position: absolute;
  pointer-events: none;
  animation: floatAndGlow 18s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.holy-cross {
  color: #C5A059;
  opacity: 0.35;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
  transition: opacity 0.3s;
}

.holy-dove {
  color: #DFCA9B;
  opacity: 0.35;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.holy-glow-orb {
  color: #F3E5AB;
  opacity: 0.3;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

@keyframes floatAndGlow {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.25;
  }
  50% {
    transform: translateY(-35px) rotate(5deg) scale(1.1);
    opacity: 0.45;
  }
  100% {
    transform: translateY(-70px) rotate(-5deg) scale(1);
    opacity: 0.25;
  }
}

/* حركة نبض وتوهج هادئ للصلبان والرموز الرئيسية في الصفحات */
.pulse-holy {
  animation: holyPulse 4s ease-in-out infinite;
}

@keyframes holyPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(197, 160, 89, 0.4));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 16px rgba(197, 160, 89, 0.85));
  }
}

/* تأثير تحليق لطيف لحمامة الروح القدس */
.dove-fly-soft {
  animation: doveSoftFloat 6s ease-in-out infinite alternate;
}

@keyframes doveSoftFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
  100% {
    transform: translateY(-4px) rotate(-2deg);
  }
}

/* تحسين شريط التمرير */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C5A059;
}

/* تنسيقات الطباعة */
@media print {
  .no-print {
    display: none !important;
  }
}

/* ==========================================================
   الصلاة الربانية بالتشكيل خلف الترويسات الزرقاء
   The Lord's Prayer Watermark - Smooth Upward Marquee
   ========================================================== */
.lords-prayer-watermark-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 1; /* فوق الخلفية ومباشرة تحت المحتوى النصي */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  opacity: 0.12;
}

.lords-prayer-scroll-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: lordsPrayerScrollUp 42s linear infinite;
  will-change: transform;
}

@keyframes lordsPrayerScrollUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.lords-prayer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.lords-prayer-line {
  font-family: var(--font-serif), 'Amiri', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 2.2;
  color: #F8F3E6;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.4), 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
  white-space: normal;
  display: block;
}

.lords-prayer-cross-divider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold-light);
  font-size: 1.25rem;
  margin: 1.5rem 0;
  opacity: 0.8;
}

/* ==========================================================
   نافذة القراءة السريعة للكتب (Quick PDF Reader Modal)
   ضمان الظهور فوق كل العناصر وإمكانية التمرير (Scroll) في الهواتف
   ========================================================== */
#quickReaderModal {
  z-index: 2147483647 !important; /* أعلى قيمة z-index ممكنة في المتصفح */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  flex-direction: column !important;
  background-color: #1a1e24 !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
}

.pdf-viewer-container {
  position: relative !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important; /* تفعيل التمرير السلس على أجهزة iOS Safari */
  overscroll-behavior: contain !important;
  background: #323639 !important;
}

.pdf-viewer-container iframe,
.pdf-viewer-container embed,
.pdf-viewer-container object {
  width: 100% !important;
  min-height: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
  -webkit-overflow-scrolling: touch !important;
}

/* في حال استخدام المتصفح على الهاتف، ضمان شريط تحكم سريع للتنقل والتحميل */
.mobile-pdf-notice {
  display: none;
}
@media (max-width: 768px) {
  .mobile-pdf-notice {
    display: flex;
  }
}

/* ==========================================================
   حركات انتقال وتغيير آية اليوم بسلاسة
   Verse Transition: Slide Out to Right & Slide In from Left
   ========================================================== */
.verse-slide-out {
  animation: verseSlideOutRight 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.verse-slide-in {
  animation: verseSlideInLeft 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes verseSlideOutRight {
  0% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    transform: translateX(65px);
    filter: blur(4px);
  }
}

@keyframes verseSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-65px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0px);
  }
}

/* ==========================================================
   قائمة لوحة التحكم المنزلقة للهواتف الذكية والأجهزة اللوحية
   ========================================================== */
#adminSidebarBackdrop {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 1023px) {
  #adminSidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 99999 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
  }

  #adminSidebar.is-open {
    transform: translateX(0) !important;
  }

  #adminSidebarBackdrop {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(15, 30, 54, 0.7) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 99998 !important;
    display: none;
  }

  #adminSidebarBackdrop.is-open {
    display: block !important;
  }
}
