/* ============================================
   مكتبة بر الوالدين - Main Stylesheet
   Design: Deep Navy, Gold, Cream palette
   Font: Cairo (Arabic-optimized Google Font)
   ============================================ */

/* ---------- Google Font ---------- */
/* Loaded directly in HTML head to optimize performance */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primary palette – extracted from cover & logo */
  --navy: #0a1628;
  --navy-light: #132240;
  --navy-mid: #1a2d50;
  --gold: #c5a044;
  --gold-light: #dbb960;
  --gold-dark: #9e7e2e;
  --cream: #f5f0e6;
  --cream-dark: #e8dfc9;
  --white: #ffffff;
  --text-dark: #1e1e1e;
  --text-muted: #6b7280;
  --text-light: #d4d4d8;

  /* Shadows & effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, .12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .18);
  --shadow-gold: 0 4px 20px rgba(197, 160, 68, .25);

  /* Layout */
  --container: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: .3s ease;

  /* Font */
  --font: 'Cairo', sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 80px;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100vw;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text-dark);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

.page-wrapper {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-x: clip;
  position: relative;
}

main {
  width: 100%;
  overflow: hidden;
}

img,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  outline: none;
}

/* ---------- Skip Link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  right: 20px;
  background: var(--gold);
  color: var(--navy);
  padding: 10px 24px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  z-index: 9999;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

/* ---------- Focus Visible (a11y) ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: clamp(1.4rem, 2.5vw + 0.9rem, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  margin: 10px auto 0;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 22, 40, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(197, 160, 68, .15);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.nav-brand span {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  font-size: .95rem;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
  z-index: 1001;
  position: relative;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  /* Reduced from 100vh to bring content closer */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
      rgba(10, 22, 40, .6) 0%,
      rgba(10, 22, 40, .85) 70%,
      var(--navy) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 80px 20px 40px;
  /* Reduced padding from 100px 20px 60px to bring elements closer */
}

.hero-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 6px solid var(--gold);
  box-shadow: var(--shadow-gold), 0 0 80px rgba(197, 160, 68, .3);
  margin: 0 auto 28px;
  animation: floatLogo 5s ease-in-out infinite;
  background: var(--cream);
  padding: 4px;
  display: block;
  will-change: transform;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

@keyframes floatLogo {

  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  25% {
    transform: translate3d(10px, -15px, 0) rotate(2deg);
  }

  50% {
    transform: translate3d(-5px, -25px, 0) rotate(-1deg);
  }

  75% {
    transform: translate3d(-12px, -10px, 0) rotate(-3deg);
  }
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw + 0.8rem, 3.2rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 6px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
}

.hero h1 .gold {
  color: var(--gold-light);
}

.hero .tagline {
  font-size: clamp(0.95rem, 1.2vw + 0.75rem, 1.3rem);
  color: var(--cream-dark);
  font-weight: 400;
  margin-bottom: 12px;
}

.hero .verse {
  font-size: clamp(0.85rem, 1vw + 0.65rem, 1.15rem);
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 32px;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-socials a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(197, 160, 68, .3);
  color: var(--gold-light);
  font-size: 1.2rem;
  transition: var(--transition);
}

.hero-socials a:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream-dark);
  font-size: .9rem;
  animation: bounce 2s infinite;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* ---------- SCHOLARS SECTION ---------- */
.scholars {
  padding: 90px 0;
  background: var(--cream);
}

.scholars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  justify-items: center;
}

.scholar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, .04);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 300px;
}

.scholar-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.scholar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 160, 68, .2);
}

.scholar-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--gold);
  transition: var(--transition);
  background: var(--cream);
}

.scholar-card:hover img {
  box-shadow: var(--shadow-gold);
  transform: scale(1.05);
}

.scholar-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 15px;
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scholar-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: var(--gold-light);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: .85rem;
  font-weight: 600;
  transition: var(--transition);
}

.scholar-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
}

/* Scholar Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 22, 40, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(197, 160, 68, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 22, 40, 0.05);
  color: var(--navy);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-close:hover {
  background: #dc2626;
  color: var(--white);
  border-color: #dc2626;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.modal img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  margin: 0 auto 16px;
}

.modal h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}

.modal p {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.modal-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--gold-light);
  font-size: 1rem;
  transition: var(--transition);
}

.modal-socials a:hover {
  background: var(--gold);
  color: var(--navy);
  transform: scale(1.1);
}

/* ---------- VIDEOS SECTION ---------- */
.videos {
  padding: 90px 0;
  background: var(--navy);
}

/* ---------- ARTICLES SECTION ---------- */
.articles {
  padding: 90px 0;
  background: var(--cream);
}

.videos .section-header h2 {
  color: var(--white);
}

.videos .section-header p {
  color: var(--text-light);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-light);
  border: 1px solid rgba(197, 160, 68, .1);
  transition: var(--transition);
}

.video-card:hover {
  border-color: rgba(197, 160, 68, .3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.video-card .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-card iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video placeholder (lazy-loaded iframes) */
.video-wrapper[data-yt] {
  cursor: pointer;
  background: var(--navy-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper[data-yt]::after {
  content: '▶';
  font-size: 3rem;
  color: var(--gold-light);
  opacity: .7;
  transition: opacity var(--transition), transform var(--transition);
}

.video-wrapper[data-yt]:hover::after {
  opacity: 1;
  transform: scale(1.15);
}

.video-card .video-info {
  padding: 16px 18px;
}

.video-card .video-info h3 {
  color: var(--cream);
  font-size: .95rem;
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--navy-mid);
  color: var(--gold-light);
  border: 1px solid rgba(197, 160, 68, .2);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.pagination-btn.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.pagination-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* REDUNDANT ARTICLES SECTION REMOVED - STYLES ARE AT THE END OF THE FILE */


/* ---------- SCHEDULE SECTION ---------- */
.schedule {
  padding: 90px 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
}

.schedule .section-header h2 {
  color: var(--white);
}

.schedule .section-header p {
  color: var(--text-light);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.schedule-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(197, 160, 68, .15);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.schedule-card.today-highlight {
  border: 1.5px solid var(--gold);
  background: rgba(197, 160, 68, 0.08);
  box-shadow: var(--shadow-gold), 0 0 25px rgba(197, 160, 68, 0.15);
}

.schedule-card.today-highlight::before {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.schedule-today-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(197, 160, 68, 0.3);
  animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(197, 160, 68, 0.5);
  }

  100% {
    transform: scale(1);
  }
}

.schedule-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), var(--gold-light));
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.schedule-card:hover {
  background: rgba(255, 255, 255, .1);
  transform: translateY(-3px);
  border-color: rgba(197, 160, 68, .35);
}

.schedule-card .schedule-day {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.schedule-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.schedule-card .schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-light);
  font-size: .85rem;
}

.schedule-card .schedule-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(197, 160, 68, .15);
  padding: 50px 0 24px;
  width: 100%;
  overflow: hidden;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .nav-brand {
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--text-light);
  font-size: .9rem;
  line-height: 1.8;
}

.visitor-counter {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
  border-radius: 12px;
  margin-top: 25px;
  transition: var(--transition);
  max-width: max-content;
}

.visitor-counter:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(197, 160, 68, 0.4);
}

.counter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(197, 160, 68, 0.15);
  color: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.counter-details {
  display: flex;
  flex-direction: column;
}

.counter-label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 2px;
}

.counter-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  font-family: monospace;
  letter-spacing: 1px;
}

.footer-links h4 {
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  color: var(--text-light);
  font-size: .9rem;
  padding: 4px 0;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--gold-light);
  padding-right: 6px;
}

.footer-contact .whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: var(--white);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: .95rem;
  transition: var(--transition);
  margin-bottom: 20px;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.footer-location svg {
  color: var(--gold-light);
}

.footer-map {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 320px;
}

.footer-map iframe {
  display: block;
  width: 100% !important;
}

.footer-contact-heading {
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-contact .whatsapp-btn:hover {
  background: #1fb855;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, .35);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  color: var(--text-light);
  font-size: .85rem;
}

.footer-bottom .developer {
  color: var(--white);
  font-weight: 500;
}

.footer-bottom .developer a {
  color: var(--gold);
  font-weight: 700;
  transition: var(--transition);
}

.footer-bottom .developer a:hover {
  color: var(--gold-light);
}

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  left: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(197, 160, 68, .45);
}

/* ---------- FADE-IN ANIMATION ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .hero-logo {
    width: 130px;
    height: 130px;
  }

  .videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .scholars-grid {
    gap: 24px;
  }

  .scholars,
  .videos,
  .articles,
  .schedule {
    padding: 70px 0;
  }
}

@media (max-width: 768px) {

  /* Mobile Navigation */
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: calc(100vh - 70px);
    background: rgba(10, 22, 40, .96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 40px 24px;
    gap: 20px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .4s ease, transform .4s cubic-bezier(.4, 0, .2, 1), visibility .4s ease;
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .hamburger {
    display: flex !important;
  }

  /* Hero */
  .hero-logo {
    width: 240px;
    height: 240px;
  }

  .hero-content {
    padding: 90px 16px 50px;
  }

  .hero-socials {
    gap: 14px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Scholars */
  .scholars-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .scholar-card {
    padding: 20px 14px;
  }

  .scholar-card img {
    width: 90px;
    height: 90px;
  }

  .scholar-card h3 {
    font-size: .95rem;
  }

  .scholar-btn {
    padding: 6px 16px;
    font-size: .8rem;
  }

  /* Radio */
  .radio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Videos */
  .videos-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  /* Articles */
  .articles-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .article-card .article-img {
    height: 180px;
  }

  /* Schedule */
  .schedule-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .schedule-card {
    padding: 22px 18px;
  }

  /* Sections padding */
  .scholars,
  .videos,
  .articles,
  .schedule {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 35px;
  }

  /* Footer */
  .footer-top {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-brand .nav-brand {
    justify-content: center;
  }

  .footer-links {
    width: 100%;
  }

  .footer-contact {
    width: 100%;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }

  /* Modal */
  .modal {
    max-width: 92vw;
    padding: 30px 20px;
  }

  /* Scroll to top */
  .scroll-top {
    bottom: 20px;
    right: 20px;
    left: auto;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 200px;
    height: 200px;
    border-width: 4px;
  }

  .hero-content {
    padding: 85px 12px 40px;
  }

  .hero-socials a {
    width: 40px;
    height: 40px;
  }

  .hero-socials a svg {
    width: 16px;
    height: 16px;
  }

  .section-header p {
    font-size: .9rem;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .scholars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .scholar-card {
    padding: 18px 12px;
  }

  .scholar-card img {
    width: 75px;
    height: 75px;
    border-width: 2px;
    margin-bottom: 8px;
  }

  .scholar-card h3 {
    font-size: .85rem;
    margin-bottom: 8px;
  }

  .scholar-btn {
    padding: 5px 12px;
    font-size: .75rem;
  }

  .article-card .article-img {
    height: 160px;
  }

  .article-card .article-body {
    padding: 16px;
  }

  .article-card h3 {
    font-size: 1rem;
  }

  .article-card p {
    font-size: .85rem;
  }

  .schedule-card {
    padding: 18px 14px;
  }

  .schedule-card h3 {
    font-size: 1rem;
  }

  .schedule-card .schedule-meta {
    font-size: .8rem;
    gap: 10px;
  }

  .modal {
    padding: 24px 14px;
  }

  .modal img {
    width: 85px;
    height: 85px;
  }

  .modal h3 {
    font-size: 1.1rem;
  }

  .modal p {
    font-size: .85rem;
  }

  .footer {
    padding: 35px 0 20px;
  }

  .footer-top {
    gap: 35px;
    justify-content: center;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
  }

  .footer-brand .nav-brand {
    justify-content: center;
    margin-bottom: 16px;
  }

  .visitor-counter {
    margin: 20px auto 0;
  }

  .footer-location {
    justify-content: center;
  }

  .footer-map {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }



  .container {
    padding: 0 14px;
  }

  .scroll-top {
    bottom: 16px;
    right: 16px;
    left: auto;
    width: 40px;
    height: 40px;
  }
}

/* ---------- Reduced Motion (a11y) ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }

  /* Exempt hero logo from reduced motion as it's a key design element requested */
  .hero-logo {
    animation-duration: 5s !important;
    animation-iteration-count: infinite !important;
  }
}

/* content-visibility removed: it breaks IntersectionObserver fade-up animations */

/* ---------- SEARCH BARS ---------- */
.search-wrapper {
  max-width: 500px;
  margin: 0 auto 40px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 24px;
  border-radius: 30px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

/* Search in dark sections */
.videos .search-input {
  background: var(--navy-light);
  border-color: rgba(197, 160, 68, .2);
  color: var(--cream);
}

.videos .search-input::placeholder {
  color: var(--text-light);
}

.videos .search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 68, .15);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  font-family: var(--font);
  font-weight: 700;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ---------- LOADING SPINNER ---------- */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  grid-column: 1 / -1;
}

.loading-spinner::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 4px solid rgba(197, 160, 68, .2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- HERO DECORATIVE PARTICLES ---------- */
.hero::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 160, 68, .12) 0%, transparent 70%);
  top: 20%;
  left: 10%;
  z-index: 2;
  animation: floatParticle 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatParticle {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -40px) scale(1.2);
  }
}

/* Hide decorative particles on mobile to prevent overflow */
@media (max-width: 768px) {
  .hero::after {
    display: none;
  }

  .radio-section::before {
    display: none;
  }
}

/* ---------- VIDEO LIGHTBOX ---------- */
.video-modal-content {
  background: transparent;
  box-shadow: none;
  width: 95%;
  max-width: 1000px;
  padding: 0;
  border: none;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== ARTICLES SECTION & TABS ========== */
.articles-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 45px;
  flex-wrap: wrap;
  padding: 8px;
  background: rgba(10, 22, 40, 0.03);
  border-radius: 60px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark mode version for video section */
.videos .articles-tabs {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.art-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  white-space: nowrap;
}

.art-tab-btn:hover {
  color: var(--navy);
  background: rgba(0, 0, 0, 0.04);
}

.videos .art-tab-btn {
  color: var(--text-light);
}

.videos .art-tab-btn:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
}

.art-tab-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(197, 160, 68, 0.3);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-content: center;
}

.article-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.article-img {
  position: relative;
  overflow: hidden;
  padding: 12px 12px 0 12px;
  background: #fbfbfb;
}

.article-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.6s ease;
}

.article-card:hover .article-img img {
  transform: scale(1.05);
}

.article-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.article-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.article-labels {
  display: flex;
  gap: 5px;
}

.article-tag {
  background: rgba(197, 160, 68, 0.1);
  color: var(--gold-dark);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.article-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--navy);
}

.article-title a {
  color: inherit;
  transition: color 0.3s;
}

.article-title a:hover {
  color: var(--gold);
}

.article-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.read-more {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  transition: gap 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more:hover {
  gap: 12px;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .art-tab-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
  }

  /* Horizontal Scroll for Tabs */
  .articles-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    border-radius: 0;
    background: transparent;
    border: none;
    padding: 10px 5px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    gap: 8px;
  }

  .articles-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  .art-tab-btn {
    flex-shrink: 0;
    background: rgba(10, 22, 40, 0.05);
  }

  .videos .art-tab-btn {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* ========== ARTICLE MODAL ========== */
.article-modal {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: right;
  position: relative;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(197, 160, 68, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Reading Progress Bar */
.reading-progress-container {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  z-index: 10;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.15s ease-out;
  border-radius: 0 2px 2px 0;
}

.modal-scroll-area {
  padding: 40px 40px 0 40px;
  overflow-y: auto;
  flex: 1;
}

.article-modal-header {
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 20px;
}

.article-modal-header h2 {
  font-size: 2rem;
  color: var(--navy);
  line-height: 1.3;
  margin-top: 10px;
}

.article-modal-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.article-modal-labels .article-tag {
  background: rgba(197, 160, 68, 0.12);
  color: var(--gold-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.article-modal-img {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-modal-img img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  background: #fdfdfd;
  display: block;
  border-radius: 8px;
}

.article-modal-content {
  font-size: 1.15rem;
  line-height: 2;
  color: #333;
  text-align: right;
  direction: rtl;
}

.article-modal-content>*:last-child {
  margin-bottom: 0;
}

.article-modal-content img.article-content-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px auto;
  display: block;
  object-fit: contain;
}

/* Ensure images with separators or specific alignment are handled */
.article-modal-content .separator,
.article-modal-content .tr-caption-container {
  clear: both;
  text-align: center;
  margin-bottom: 25px;
}

.article-modal-content .tr-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* Allow Blogger's original alignment classes if present */
.article-modal-content img[style*="float: left"],
.article-modal-content .separator[style*="float: left"] {
  float: left;
  margin-right: 20px;
  margin-bottom: 15px;
  display: inline;
}

.article-modal-content img[style*="float: right"],
.article-modal-content .separator[style*="float: right"] {
  float: right;
  margin-left: 20px;
  margin-bottom: 15px;
  display: inline;
}

.article-modal-content img.emoji {
  display: inline !important;
  margin: 0 1px !important;
  width: 1.2em !important;
  height: 1.2em !important;
  vertical-align: middle;
  border-radius: 0;
  box-shadow: none !important;
  border: none !important;
}

.article-modal-content a {
  color: var(--gold-dark);
  text-decoration: none;
  border-bottom: 1px dashed var(--gold);
  transition: var(--transition);
}

.article-modal-content a:hover {
  color: var(--navy);
  border-bottom-style: solid;
}

.article-modal-content p {
  margin-bottom: 1.5rem;
}

.article-modal-content h1,
.article-modal-content h2,
.article-modal-content h3,
.article-modal-content h4 {
  color: var(--navy);
  margin: 1.5rem 0 0.8rem;
  line-height: 1.4;
}

.article-modal-content ul,
.article-modal-content ol {
  margin: 1rem 1.5rem 1.5rem 0;
  padding-right: 1.5rem;
}

.article-modal-content li {
  margin-bottom: 0.5rem;
}

.article-modal-content blockquote {
  border-right: 4px solid var(--gold);
  padding: 15px 20px;
  margin: 1.5rem 0;
  background: rgba(197, 160, 68, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--navy-mid);
}

.article-modal-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
  padding-bottom: 20px;
}

/* ========== SHARE BUTTONS ========== */
.article-share-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--cream);
  color: var(--text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn.share-fb:hover {
  background: #1877F2;
  color: white;
  border-color: #1877F2;
}

.share-btn.share-tw:hover {
  background: #1DA1F2;
  color: white;
  border-color: #1DA1F2;
}

.share-btn.share-wa:hover {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

.share-btn.share-tg:hover {
  background: #0088cc;
  color: white;
  border-color: #0088cc;
}

.share-btn.share-copy:hover {
  background: var(--navy);
  color: var(--gold-light);
  border-color: var(--navy);
}

.share-btn.copied {
  background: #f0fff4;
  border-color: #25D366;
}

/* ========== SKELETON LOADING ========== */
.article-card-skeleton {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  max-width: 320px;
  margin: 0 auto;
}

.skeleton-img {
  height: 180px;
  margin: 12px 12px 0 12px;
  border-radius: 10px;
  background: linear-gradient(110deg, #f0ede5 30%, #e8e4da 50%, #f0ede5 70%);
}

.skeleton-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(110deg, #f0ede5 30%, #e8e4da 50%, #f0ede5 70%);
}

.skeleton-pulse {
  animation: skeletonPulse 1.5s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes skeletonPulse {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ========== ARTICLE CARD GLOW EFFECT ========== */
.article-card {
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, transparent 40%, rgba(197, 160, 68, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.article-card:hover::before {
  opacity: 1;
}



@media (max-width: 768px) {


  .modal-scroll-area {
    padding: 25px 15px 5px 15px;
  }

  .article-modal-header h2 {
    font-size: 1.4rem;
  }

  .article-modal-content {
    font-size: 1rem;
  }

  .article-modal-img img {
    max-height: 280px;
  }

  .share-btn {
    width: 38px;
    height: 38px;
  }

  .article-share-bar {
    gap: 8px;
  }
}

/* ---------- Scholar Lessons in Modal ---------- */
.modal-lessons-container {
  margin-top: 25px;
  text-align: right;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 15px;
}

.modal-lessons-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.scholar-lessons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.scholar-lessons-list::-webkit-scrollbar {
  width: 6px;
}

.scholar-lessons-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

.scholar-lessons-list::-webkit-scrollbar-thumb {
  background: var(--gold-light);
  border-radius: 3px;
}

.scholar-lesson-item {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 12px 15px;
  border: 1px solid rgba(197, 160, 68, 0.15);
  transition: var(--transition);
}

.scholar-lesson-item:hover {
  border-color: rgba(197, 160, 68, 0.4);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.scholar-lesson-title {
  color: var(--navy-mid);
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: block;
}

.scholar-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Scholar Image in Schedule Card ---------- */
.scholar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.scholar-info span {
  color: var(--gold-light);
}

.scholar-avatars {
  display: flex;
  align-items: center;
}

.schedule-scholar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--white);
  position: relative;
  transition: transform 0.2s ease;
}

.schedule-scholar-img:hover {
  transform: scale(1.2);
  z-index: 50 !important;
}

.clickable-schedule {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable-schedule:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(197, 160, 68, 0.4);
}

/* ========== ARTICLE CARD IMAGE LOADING ========== */
.article-img img {
  transition: opacity 0.5s ease, transform 0.6s ease;
}

/* ========== CUSTOM SCROLLBAR FOR MODAL ========== */
.modal-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.modal-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

.modal-scroll-area::-webkit-scrollbar-thumb {
  background: var(--gold-light);
  border-radius: 3px;
}

.modal-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ---------- Ultra-small device layout enhancements ---------- */
@media (max-width: 360px) {
  .scholars-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .scholar-card {
    max-width: 100% !important;
  }

  .nav-brand span {
    font-size: 1rem;
  }

  .nav-brand img {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   📻 أنماط قسم الإذاعة الدعوية والقرآنية - Radio Section Styles
   ========================================================================== */

.radio-section {
  padding: 50px 0 90px;
  /* Reduced top padding to bring it closer to the hero scroll button */
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
}

/* Gold background grid decorative circles */
.radio-section::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(197, 160, 68, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.radio-section .section-header h2 {
  color: var(--white);
}

.radio-section .section-header p {
  color: var(--text-light);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

/* Glassmorphism Radio Card */
.radio-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(197, 160, 68, 0.15);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background-color 0.4s ease;
  overflow: hidden;
  height: fit-content;
}

.radio-card:hover {
  transform: translateY(-5px);
  border-color: rgba(197, 160, 68, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(197, 160, 68, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

/* Glowing card playing state */
.radio-card.card-playing {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-gold), 0 0 25px rgba(197, 160, 68, 0.12);
}

.radio-card.card-buffering {
  border-color: rgba(197, 160, 68, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

/* Card Header */
.radio-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.radio-card-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.header-main {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(197, 160, 68, 0.12);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 160, 68, 0.22);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(197, 160, 68, 0.05);
}

.radio-card:hover .header-icon-wrapper,
.radio-card.card-playing .header-icon-wrapper {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 0 15px rgba(197, 160, 68, 0.45);
  border-color: var(--gold);
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 14px;
  min-width: 0;
}

.header-text h3 {
  color: var(--cream);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.radio-card:hover .header-text h3,
.radio-card.card-playing .header-text h3 {
  color: var(--gold-light);
}

.stations-badge {
  font-size: 0.72rem;
  color: var(--gold-light);
  background: rgba(197, 160, 68, 0.18);
  padding: 1px 8px;
  border-radius: 12px;
  width: fit-content;
  font-weight: 600;
  border: 1.5px solid rgba(197, 160, 68, 0.1);
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Collapsible Accordion Arrow */
.accordion-arrow-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.radio-card:hover .accordion-arrow-wrapper {
  color: var(--gold-light);
}

.radio-card.expanded .accordion-arrow-wrapper {
  transform: rotate(180deg);
  color: var(--gold);
}

.accordion-arrow {
  display: block;
}

/* Card Header Mini Play/Pause controllers */
.card-mini-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: none;
  /* Injected by Javascript when active */
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 10px rgba(197, 160, 68, 0.35);
  cursor: pointer;
}

.card-mini-play-btn:hover {
  transform: scale(1.1);
  background: var(--gold-light);
  box-shadow: 0 4px 15px rgba(197, 160, 68, 0.55);
}

.card-mini-play-btn.playing {
  background: #dc2626;
  /* Premium Red Stop Button */
  color: var(--white);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.card-mini-play-btn.playing:hover {
  background: #b91c1c;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.55);
}

/* Mini Audio Equalizer Animating Bars */
.card-mini-visualizer {
  display: none;
  /* Injected by JS */
  align-items: flex-end;
  gap: 3.5px;
  width: 18px;
  height: 16px;
}

.card-mini-visualizer.active {
  display: flex;
}

.eq-bar {
  width: 3px;
  height: 100%;
  background: var(--gold-light);
  border-radius: 1.5px;
  transform-origin: bottom;
}

.bar1 {
  animation: eqAnimation 1s ease-in-out infinite alternate;
}

.bar2 {
  animation: eqAnimation 0.7s ease-in-out infinite alternate 0.2s;
}

.bar3 {
  animation: eqAnimation 0.9s ease-in-out infinite alternate 0.4s;
}

@keyframes eqAnimation {
  0% {
    transform: scaleY(0.2);
  }

  100% {
    transform: scaleY(1);
  }
}

/* Accordion Station List Container */
.radio-stations-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(197, 160, 68, 0.06);
}

.stations-list-inner {
  padding: 16px 20px 24px 20px;
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Custom Scrollbar for Accordion lists */
.stations-list-inner::-webkit-scrollbar {
  width: 5px;
}

.stations-list-inner::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
}

.stations-list-inner::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 68, 0.35);
  border-radius: 3px;
}

.stations-list-inner::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* Single Station Row */
.radio-station-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 12px;
}

.radio-station-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(197, 160, 68, 0.18);
  transform: translateX(-4px);
}

.radio-station-item.playing {
  background: rgba(197, 160, 68, 0.07);
  border-color: rgba(197, 160, 68, 0.3);
}

.radio-station-item.buffering {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(197, 160, 68, 0.15);
}

/* Avatar elements */
.station-details {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  /* Allows text overflow ellipsis */
}

.station-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(197, 160, 68, 0.2);
  transition: all 0.3s ease;
  background: var(--navy-mid);
  flex-shrink: 0;
}

.radio-station-item:hover .station-avatar,
.radio-station-item.playing .station-avatar {
  border-color: var(--gold-light);
  transform: scale(1.06);
  box-shadow: 0 0 10px rgba(197, 160, 68, 0.15);
}

.station-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.station-name {
  color: var(--cream);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.radio-station-item.playing .station-name {
  color: var(--gold-light);
}

.station-subtitle {
  color: var(--text-light);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

/* Play/Stop Button inside rows */
.station-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(197, 160, 68, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  cursor: pointer;
}

.radio-station-item:hover .station-play-btn {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 3px 10px rgba(197, 160, 68, 0.4);
}

.radio-station-item.playing .station-play-btn {
  background: #dc2626;
  /* Premium Red Stop Button */
  color: var(--white);
  border-color: #dc2626;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.radio-station-item.playing:hover .station-play-btn {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Spinners (Live Streaming Buffering Animation) */
.radio-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--gold);
  animation: radioSpin 0.75s linear infinite;
}

.radio-mini-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(10, 22, 40, 0.25);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: radioSpin 0.75s linear infinite;
}

@keyframes radioSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile responsive padding and structures */
@media (max-width: 480px) {
  .radio-section {
    padding: 60px 0;
  }

  .radio-card-header {
    padding: 18px 14px;
  }

  .stations-list-inner {
    padding: 12px 14px 18px 14px;
  }

  .header-icon-wrapper {
    width: 42px;
    height: 42px;
  }

  .header-text {
    margin-right: 10px;
  }

  .header-text h3 {
    font-size: 0.95rem;
  }

  .radio-station-item {
    padding: 10px 10px;
  }

  .station-avatar {
    width: 36px;
    height: 36px;
  }

  .station-name {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   📻 Premium Glassmorphic Floating Audio Player (Widget)
   ========================================================================== */
.floating-player {
  position: fixed;
  bottom: -120px;
  /* Hidden by default */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 550px;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 160, 68, 0.25);
  border-radius: 50px;
  padding: 10px 24px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  z-index: 1002;
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
}

.floating-player.active {
  bottom: 24px;
  opacity: 1;
  pointer-events: all;
}

.fp-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  direction: rtl;
  position: relative;
}

.fp-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  transition: var(--transition);
  order: 4;
  /* Far left in RTL */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.fp-close:hover {
  color: #ff4a4a;
  transform: scale(1.1);
}

.fp-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.fp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  flex-shrink: 0;
  animation: fp-spin 8s linear infinite;
  animation-play-state: paused;
}

.floating-player.playing .fp-avatar {
  animation-play-state: running;
}

.fp-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fp-title {
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font);
}

.fp-subtitle {
  color: var(--gold);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font);
}

.fp-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.fp-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(197, 160, 68, 0.4);
}

.fp-play-btn:hover {
  background: var(--gold-light);
  transform: scale(1.05);
}

.fp-play-btn svg {
  display: block;
}

.fp-volume-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
}

.fp-volume-icon {
  flex-shrink: 0;
  opacity: 0.8;
}

.fp-volume-slider {
  width: 70px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  accent-color: var(--gold);
}

.fp-volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.fp-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: -4px;
  border: none;
  transition: transform 0.1s;
}

.fp-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

@keyframes fp-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 576px) {
  .floating-player {
    width: 92%;
    bottom: -120px;
    padding: 8px 18px;
    border-radius: 35px;
  }

  .floating-player.active {
    bottom: 15px;
  }

  .fp-volume-wrapper {
    display: none;
    /* Hide volume control on very small mobile screens for width */
  }
}

/* ==========================================================================
   📅 دروس اليوم المثبتة (Featured/Pinned Today's Lessons)
   ========================================================================== */
.today-lessons-container {
  background: rgba(197, 160, 68, 0.05);
  border: 1px solid rgba(197, 160, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 45px;
  position: relative;
  box-shadow: 0 10px 30px rgba(10, 22, 40, 0.5), inset 0 0 15px rgba(197, 160, 68, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.today-lessons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  direction: rtl;
}

.today-lessons-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-glowing-dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #2ecc71;
  animation: today-glow 1.8s infinite ease-in-out;
}

.today-lessons-title-wrapper h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  font-family: var(--font);
}

.today-date-badge {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid rgba(197, 160, 68, 0.2);
  font-family: var(--font);
  font-weight: 700;
}

.today-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Custom glow animation */
@keyframes today-glow {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

@media (max-width: 576px) {
  .today-lessons-container {
    padding: 16px;
    margin-bottom: 30px;
  }

  .today-lessons-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .today-date-badge {
    align-self: flex-end;
  }
}

/* ============================================
   LIVESTREAM SECTION - البثوث المرئية المباشرة
   ============================================ */

.livestream-section {
  padding: 80px 0;
  background: linear-gradient(160deg, var(--navy) 0%, #0d1f3c 50%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative background glow */
.livestream-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.livestream-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(197, 160, 68, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.livestream-section .section-header h2 {
  color: var(--white);
}

.livestream-section .section-header p {
  color: var(--text-light);
}

/* Section title LIVE indicator */
.section-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.15);
  color: #ff4d4d;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 10px;
  vertical-align: middle;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.section-live-badge .live-dot {
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.6);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 77, 77, 0);
    transform: scale(1.15);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    transform: scale(1);
  }
}

/* Livestream cards grid */
.livestream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
  margin-top: 10px;
}

/* Subsection titles (Live Now / Scheduled) */
.livestream-subsection-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  margin-top: 10px;
}

.livestream-subsection-title:first-child {
  margin-top: 0;
}

.livestream-subsection-title h3 {
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}

.livestream-subsection-title .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(197, 160, 68, 0.3), transparent);
}

/* Glassmorphic livestream card */
.livestream-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(197, 160, 68, 0.12);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  position: relative;
}

.livestream-card:hover {
  transform: translateY(-5px);
  border-color: rgba(197, 160, 68, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(197, 160, 68, 0.08);
}

/* Card with live status glow */
.livestream-card.is-live {
  border-color: rgba(220, 38, 38, 0.3);
}

.livestream-card.is-live:hover {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 25px rgba(220, 38, 38, 0.1);
}

/* YouTube iframe embed wrapper */
.livestream-embed {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: var(--navy-mid);
}

.livestream-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Card body info */
.livestream-info {
  padding: 20px 22px;
}

/* Status badge: LIVE */
.livestream-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.livestream-badge.badge-live {
  background: rgba(220, 38, 38, 0.18);
  color: #ff5252;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.livestream-badge.badge-live .badge-dot {
  width: 7px;
  height: 7px;
  background: #ff5252;
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

/* Status badge: Scheduled */
.livestream-badge.badge-scheduled {
  background: rgba(197, 160, 68, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(197, 160, 68, 0.3);
}

.livestream-badge.badge-scheduled .badge-icon {
  font-size: 0.85rem;
}

.livestream-info h3 {
  color: var(--cream);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.6;
}

.livestream-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.livestream-meta span {
  color: var(--text-light);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* External link button (Facebook / Telegram / Scheduled YouTube) */
.livestream-external-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  text-align: center;
  border: 1px solid transparent;
}

.livestream-external-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* YouTube button */
.livestream-external-btn.btn-youtube {
  background: linear-gradient(135deg, #cc0000, #e53935);
  color: #fff;
}

.livestream-external-btn.btn-youtube:hover {
  background: linear-gradient(135deg, #e53935, #ff1744);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.35);
}

/* Facebook button */
.livestream-external-btn.btn-facebook {
  background: linear-gradient(135deg, #1877f2, #42a5f5);
  color: #fff;
}

.livestream-external-btn.btn-facebook:hover {
  background: linear-gradient(135deg, #42a5f5, #64b5f6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
}

/* Telegram button */
.livestream-external-btn.btn-telegram {
  background: linear-gradient(135deg, #0088cc, #29b6f6);
  color: #fff;
}

.livestream-external-btn.btn-telegram:hover {
  background: linear-gradient(135deg, #29b6f6, #4fc3f7);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
}

/* Platform card placeholder (for Facebook / Telegram / scheduled) */
.livestream-placeholder {
  position: relative;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
  min-height: 180px;
}

.livestream-placeholder .platform-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.livestream-card:hover .livestream-placeholder .platform-icon {
  opacity: 1;
  transform: scale(1.08);
}

.livestream-placeholder .platform-label {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Nav dot indicator for LIVE */
.live-nav-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #ff4d4d;
  border-radius: 50%;
  margin-right: 4px;
  animation: livePulse 1.5s ease-in-out infinite;
  vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .livestream-section {
    padding: 60px 0;
  }

  .livestream-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .livestream-info {
    padding: 16px 18px;
  }

  .livestream-external-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .livestream-placeholder {
    min-height: 140px;
    padding: 30px 16px;
  }

  .livestream-placeholder .platform-icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .livestream-info h3 {
    font-size: 0.95rem;
  }

  .livestream-meta span {
    font-size: 0.8rem;
  }
}

/* Hybrid Layout - Centered Prominent Live Video */
.livestream-live-featured {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto 45px auto;
}

.livestream-live-featured .livestream-card {
  width: 100%;
  border-width: 2px;
}

.livestream-live-featured .livestream-info h3 {
  font-size: 1.25rem;
  line-height: 1.6;
}

@media (max-width: 992px) {
  .livestream-live-featured {
    max-width: 100%;
    padding: 0 10px;
  }
}

/* Vertical Orientation (9:16 Aspect Ratio) for Reels & Shorts */
.livestream-embed.is-vertical {
  padding-bottom: 177.77%;
  /* 16:9 vertical orientation */
  background: #000000;
}

.livestream-live-featured .livestream-card.is-vertical {
  max-width: 380px;
  margin: 0 auto;
}

/* ==========================================================================
   🕋 قسم البث المباشر للحرمين الشريفين - مكة المكرمة والمدينة المنورة
   ========================================================================== */
.haramain-section {
  padding: 90px 0;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(197, 160, 68, 0.1);
}

.haramain-section .section-header h2 {
  color: var(--white);
}

.haramain-section .section-header p {
  color: var(--text-light);
}

.haramain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: 35px;
  margin-bottom: 50px;
}

@media (max-width: 992px) {
  .haramain-grid {
    grid-template-columns: 1fr;
    max-width: 750px;
    margin: 0 auto 40px auto;
  }
}

.haramain-card {
  background: var(--navy-light);
  border: 1px solid rgba(197, 160, 68, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.haramain-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(197, 160, 68, 0.15);
  border-color: rgba(197, 160, 68, 0.35);
}

.haramain-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.haramain-card-header h3 {
  color: var(--gold-light);
  font-size: clamp(1.1rem, 1.5vw + 0.8rem, 1.35rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.haramain-live-badge {
  background: #dc2626;
  color: var(--white);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.4);
  animation: livePulse 2s infinite;
}

.haramain-live-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
}

.haramain-player-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.05);
  background: #000;
  aspect-ratio: 16 / 9;
}

.haramain-stream {
  display: none;
  width: 100%;
  height: 100%;
}

.haramain-stream.active {
  display: block;
}

.haramain-stream video {
  width: 100%;
  height: 100%;
  display: block;
}

.haramain-yt-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.haramain-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 8px;
}

.haramain-selectors {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.haramain-selector-btn {
  background: none;
  border: none;
  outline: none;
  color: var(--text-light);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.haramain-selector-btn:hover {
  color: var(--white);
}

.haramain-selector-btn.active {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(197, 160, 68, 0.3);
}

.haramain-theater-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.haramain-theater-btn:hover {
  color: var(--gold-light);
  border-color: var(--gold-light);
  background: rgba(197, 160, 68, 0.08);
  transform: scale(1.03);
}

.haramain-theater-btn.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(197, 160, 68, 0.3);
}

.haramain-stats {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.haramain-stats-card {
  background: rgba(19, 34, 64, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: min(100%, 320px);
  box-shadow: 0 0 25px rgba(197, 160, 68, 0.1);
}

.haramain-stats-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-icon {
  font-size: 1.4rem;
}

.stats-label {
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 600;
}

.haramain-stats-count {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold-light);
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 6px;
  text-shadow: 0 0 15px rgba(197, 160, 68, 0.4);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 28px;
  border-radius: 10px;
  border: 1px solid rgba(197, 160, 68, 0.25);
  direction: ltr;
}

/* Custom video.js customization for our premium brand */
.haramain-section .video-js {
  width: 100% !important;
  height: 100% !important;
  font-family: var(--font);
}

.haramain-section .vjs-big-play-button {
  background-color: rgba(197, 160, 68, 0.75) !important;
  border: none !important;
  width: 75px !important;
  height: 75px !important;
  line-height: 75px !important;
  border-radius: 50% !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  transition: all var(--transition) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.haramain-section .video-js:hover .vjs-big-play-button {
  background-color: var(--gold) !important;
  transform: translate(-50%, -50%) scale(1.1) !important;
  box-shadow: var(--shadow-gold) !important;
}

.haramain-section .vjs-play-progress {
  background-color: var(--gold) !important;
}

.haramain-section .vjs-volume-level {
  background-color: var(--gold) !important;
}

.haramain-section .vjs-control-bar {
  background-color: rgba(10, 22, 40, 0.85) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Custom Cinematic Theater Mode */
body.haramain-theater-active {
  overflow: hidden !important;
}

.haramain-card.theater-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  inset: 0;
  margin: 0;
  border-radius: 0 !important;
  background: rgba(4, 8, 15, 0.99) !important;
  /* خلفية داكنة فائقة التعتيم للمشاهدة */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-shadow: 0 0 120px rgba(0, 0, 0, 1);
  border: none !important;
  transform: none !important;
  animation: haramainTheaterFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  --theater-reserved-height: 140px;
  /* القيمة المثالية لجمع الهوامش شريطة بقاء شريط التحكم سليماً */
  --theater-width: min(95vw, calc((100vh - var(--theater-reserved-height)) * 16 / 9.5));
}

/* وهج هالة إيمانية ذهبية/خضراء متموجة خلف المشغل في الوضع الصافي */
.haramain-card.theater-mode::after {
  content: "";
  position: absolute;
  width: calc(var(--theater-width) + 140px);
  height: calc((var(--theater-width) * 9.5 / 16) + 140px);
  background: radial-gradient(circle, rgba(197, 160, 68, 0.18) 0%, rgba(6, 78, 59, 0.12) 50%, transparent 100%);
  z-index: -1;
  filter: blur(60px);
  border-radius: 50%;
  pointer-events: none;
  animation: haramainAmbientPulse 10s ease-in-out infinite alternate;
}

@keyframes haramainAmbientPulse {
  0% {
    transform: scale(0.95) translate(0, 0);
    opacity: 0.65;
  }

  50% {
    background: radial-gradient(circle, rgba(6, 78, 59, 0.18) 0%, rgba(197, 160, 68, 0.12) 50%, transparent 100%);
    transform: scale(1.05) translate(-12px, 12px);
    opacity: 0.85;
  }

  100% {
    transform: scale(1) translate(12px, -12px);
    opacity: 0.75;
  }
}

@keyframes haramainTheaterFadeIn {
  from {
    opacity: 0;
    background: rgba(4, 8, 15, 0);
  }

  to {
    opacity: 1;
    background: rgba(4, 8, 15, 0.99);
  }
}

/* إخفاء ترويسة البطاقة تماماً في الوضع الصافي على كل الشاشات لتكبير البث */
.haramain-card.theater-mode .haramain-card-header {
  display: none !important;
}

/* أنيميشن دخول شريط التحكم السفلي */
.haramain-card.theater-mode .haramain-card-footer {
  width: var(--theater-width);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  animation: haramainCinemaSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* شريط تحكم عائم زجاجي فاخر في الأسفل */
.haramain-card.theater-mode .haramain-card-footer {
  background: rgba(19, 34, 64, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(197, 160, 68, 0.25);
  padding: 10px 24px;
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  margin-top: 15px;
}

/* تكبير ناعم وتجاوب للمشغل */
.haramain-card.theater-mode .haramain-player-wrapper {
  width: var(--theater-width);
  max-width: 1100px;
  margin: 10px auto;
  border: 2px solid var(--gold);
  box-shadow: 0 0 60px rgba(197, 160, 68, 0.28);
  animation: haramainCinemaZoomIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.haramain-card.theater-mode .vjs-tech,
.haramain-card.theater-mode .haramain-yt-iframe {
  object-fit: contain !important;
}

@keyframes haramainCinemaSlideDown {
  from {
    transform: translateY(-25px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes haramainCinemaSlideUp {
  from {
    transform: translateY(25px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes haramainCinemaZoomIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Glass alert notification */
.haramain-fallback-alert {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: haramainAlertSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  direction: rtl;
}

@keyframes haramainAlertSlide {
  from {
    opacity: 0;
    transform: translate(-50%, -30px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Responsive media queries */
@media (max-width: 768px) {
  .haramain-section {
    padding: 60px 0;
  }

  .haramain-card {
    padding: 18px;
  }

  .haramain-card.theater-mode {
    padding: 15px;
    --theater-reserved-height: 120px;
    /* مسافة أقل محجوزة لأن أدوات التحكم تظهر في صف واحد، مما يزيد حجم الفيديو المتاح */
    --theater-width: min(95vw, calc((100vh - var(--theater-reserved-height)) * 16 / 9.5));
  }

  .haramain-card.theater-mode .haramain-card-footer {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 40px !important;
    padding: 8px 16px !important;
    width: var(--theater-width) !important;
  }

  .haramain-card.theater-mode .haramain-player-wrapper {
    width: var(--theater-width) !important;
    margin: 8px auto;
  }

  .haramain-stats-card {
    padding: 15px 30px;
    min-width: 280px;
  }

  .haramain-stats-count {
    font-size: 2.2rem;
    padding: 3px 20px;
  }
}

@media (max-width: 480px) {
  .haramain-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .haramain-card-header h3 {
    font-size: 1.15rem;
  }

  .haramain-live-badge {
    font-size: 0.75rem;
    padding: 2px 10px;
  }

  .haramain-card-footer {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .haramain-selectors {
    padding: 2px !important;
    gap: 2px !important;
  }

  .haramain-selector-btn {
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
  }

  .haramain-theater-btn {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
    width: auto !important;
    justify-content: center;
  }
}

/* دعم الشاشات العريضة القصيرة (الهواتف في وضع التدوير الأفقي Landscape) */
@media (max-height: 500px) {
  .haramain-card.theater-mode {
    padding: 10px;
    --theater-reserved-height: 90px;
    --theater-width: min(95vw, calc((100vh - var(--theater-reserved-height)) * 16 / 9.5));
  }

  .haramain-card.theater-mode .haramain-card-header {
    display: none !important;
    /* إخفاء العنوان لتعظيم مساحة الفيديو */
  }

  .haramain-card.theater-mode .haramain-player-wrapper {
    margin: 5px auto;
  }

  .haramain-card.theater-mode .haramain-card-footer {
    margin-top: 4px;
    gap: 6px;
    flex-direction: row !important;
    padding: 6px 12px !important;
    width: var(--theater-width) !important;
  }
}

/* إخفاء البطاقة الأخرى وعناصر الموقع المشتتة عند تفعيل الوضع الصافي لعدم حدوث خلل في التنسيق */
body.haramain-theater-active .haramain-card:not(.theater-mode) {
  display: none !important;
}

body.haramain-theater-active .floating-player,
body.haramain-theater-active .scroll-top,
body.haramain-theater-active .navbar {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: opacity var(--transition) !important;
}

/* حل هندسي فائق لمنع انحباس تموضع fixed داخل الأقسام التي تحتوي على حركات متحركة fade-up */
body.haramain-theater-active main,
body.haramain-theater-active .page-wrapper,
body.haramain-theater-active .haramain-section,
body.haramain-theater-active .container,
body.haramain-theater-active .haramain-grid {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  will-change: auto !important;
  overflow: visible !important;
}

/* رفع قسم الحرمين فوق كل الأقسام الأخرى لمنع تغطيته بأي قسم يليه في شجرة DOM */
body.haramain-theater-active .haramain-section {
  z-index: 999999 !important;
  position: relative !important;
}

/* ==========================================================================
   إضافات التحسينات الفنية والجمالية (مكتبة بر الوالدين)
   ========================================================================== */

/* ---------- 1. مؤشر تقدم القراءة العلوي ---------- */
.page-scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 10001; /* أعلى من كل شيء */
  pointer-events: none;
}
.page-scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.1s ease-out;
  border-radius: 0 2px 2px 0;
}

/* ---------- 2. أزرار التحكم في الهيدر ---------- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-action-btn {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  padding: 0;
}
.nav-action-btn:hover {
  background: rgba(197, 160, 68, 0.15);
  color: var(--white);
  transform: translateY(-2px);
}

/* ---------- 3. لوحة البحث الشامل الذكي (Command Palette) ---------- */
.search-palette-content {
  max-width: 650px !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(197, 160, 68, 0.2) !important;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 20px 50px rgba(0,0,0,0.3) !important;
}

.search-palette-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(197, 160, 68, 0.15);
  gap: 15px;
}

.search-palette-icon {
  font-size: 1.3rem;
  color: var(--gold);
}

#searchPaletteInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 1.15rem;
  color: var(--text-dark);
  direction: rtl;
}

#searchPaletteInput::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.search-palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 20px 24px;
  text-align: right;
}

.search-palette-placeholder,
.search-palette-no-results {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 40px 0;
  text-align: center;
}

.search-group {
  margin-bottom: 24px;
}
.search-group:last-child {
  margin-bottom: 0;
}

.search-group h4 {
  font-size: 0.9rem;
  color: var(--gold-dark);
  border-bottom: 1px dashed rgba(197, 160, 68, 0.2);
  padding-bottom: 6px;
  margin-bottom: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(10, 22, 40, 0.03);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.search-item:hover {
  background: rgba(197, 160, 68, 0.08);
  border-color: rgba(197, 160, 68, 0.2);
  transform: translateX(-4px);
}

.search-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
}

.search-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(197, 160, 68, 0.1);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.search-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-palette-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(10, 22, 40, 0.02);
  border-top: 1px solid rgba(10, 22, 40, 0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-palette-footer kbd {
  background: rgba(10, 22, 40, 0.05);
  border: 1px solid rgba(10, 22, 40, 0.1);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.75rem;
  font-family: inherit;
}

/* ---------- 4. نظام حفظ ومفضلة المقالات ---------- */
.article-img {
  position: relative;
}

.bookmark-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 22, 40, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(197, 160, 68, 0.25);
  color: var(--gold-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
  padding: 0;
}

.bookmark-btn:hover {
  background: var(--gold);
  color: var(--navy);
  transform: scale(1.1);
}

.bookmark-btn.is-bookmarked {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.bookmark-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-mid) !important;
  color: var(--gold-light) !important;
  border: 1px solid rgba(197, 160, 68, 0.2) !important;
  padding: 10px 20px !important;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
}

.bookmark-modal-btn:hover {
  background: var(--gold) !important;
  color: var(--navy) !important;
  border-color: var(--gold) !important;
}

.bookmark-modal-btn.is-bookmarked {
  background: var(--gold) !important;
  color: var(--navy) !important;
  border-color: var(--gold) !important;
}

/* ---------- 5. موجات الصوت للمشغل العائم ---------- */
.fp-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.fp-wave {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.85);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5px;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.floating-player.playing .fp-wave {
  opacity: 1;
}

.fp-wave .stroke {
  background: var(--gold);
  height: 30%;
  width: 2.5px;
  border-radius: 50px;
  animation: fpWaveAnim 1.2s ease-in-out infinite alternate;
}

.fp-wave .stroke:nth-child(2) { animation-delay: 0.15s; }
.fp-wave .stroke:nth-child(3) { animation-delay: 0.3s; }
.fp-wave .stroke:nth-child(4) { animation-delay: 0.45s; }
.fp-wave .stroke:nth-child(5) { animation-delay: 0.6s; }

@keyframes fpWaveAnim {
  0% { height: 15%; }
  100% { height: 75%; }
}

/* ---------- 6. الوضع الفاتح الكامل (Light Theme) ---------- */
body.light-theme {
  background-color: #fcfaf2 !important; /* خلفية كريمية دافئة وناعمة للعين */
  color: #2c210d !important; /* نصوص داكنة بتباين ممتاز */
}

/* تنسيق النصوص والعناوين العامة */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: #1a1105 !important;
}

body.light-theme .section-header h2 {
  color: #1a1105 !important;
}

body.light-theme .section-header p {
  color: #5c4e3b !important;
}

/* تعديل الهيدر والنافبار */
body.light-theme .navbar {
  background: rgba(253, 251, 247, 0.96) !important;
  border-bottom: 1px solid rgba(179, 140, 43, 0.25) !important;
}

body.light-theme .nav-brand span {
  color: #1a1105 !important;
}

body.light-theme .nav-links a {
  color: #4a3e2e !important;
}

body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active {
  color: #b38c2b !important;
}

body.light-theme .nav-links a::after {
  background: #b38c2b !important;
}

body.light-theme .nav-action-btn {
  color: #b38c2b !important;
}

body.light-theme .nav-action-btn:hover {
  background: rgba(179, 140, 43, 0.1) !important;
  color: #7a5c12 !important;
}

body.light-theme .hamburger span {
  background: #4a3e2e !important;
}

/* قسم الهيرو الرئيسي */
body.light-theme .hero {
  background: #fdfaf3 !important;
}

body.light-theme .hero-bg img {
  opacity: 0.18 !important; /* خفض شفافية صورة الخلفية لضمان وضوح النص فوقها */
}

body.light-theme .hero-overlay {
  background: linear-gradient(180deg,
      rgba(253, 250, 243, 0.45) 0%,
      rgba(253, 250, 243, 0.9) 70%,
      #fcfaf2 100%) !important;
}

body.light-theme .hero h1 {
  color: #1a1105 !important;
  text-shadow: none !important;
}

body.light-theme .hero h1 .gold {
  color: #b38c2b !important;
}

body.light-theme .hero .tagline {
  color: #5a4e3e !important;
}

body.light-theme .hero .verse {
  color: #7a5c12 !important;
  text-shadow: none !important;
}

body.light-theme .hero-socials a {
  background: rgba(179, 140, 43, 0.1) !important;
  border: 1px solid rgba(179, 140, 43, 0.3) !important;
  color: #b38c2b !important;
}

body.light-theme .hero-socials a:hover {
  background: #b38c2b !important;
  color: #ffffff !important;
}

body.light-theme .hero-scroll {
  color: #5a4e3e !important;
}

/* قسم الإذاعة الدعوية */
body.light-theme .radio-section {
  background: linear-gradient(180deg, #fcfaf2 0%, #f5eedc 100%) !important;
}

body.light-theme .radio-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.25) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .radio-card:hover {
  background: #ffffff !important;
  border-color: rgba(179, 140, 43, 0.45) !important;
  box-shadow: 0 10px 30px rgba(179, 140, 43, 0.08) !important;
}

body.light-theme .radio-card.card-playing {
  border-color: #b38c2b !important;
  box-shadow: 0 4px 20px rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .header-icon-wrapper {
  background: rgba(179, 140, 43, 0.08) !important;
  color: #b38c2b !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
}

body.light-theme .radio-card:hover .header-icon-wrapper,
body.light-theme .radio-card.card-playing .header-icon-wrapper {
  background: #b38c2b !important;
  color: #ffffff !important;
  border-color: #b38c2b !important;
}

body.light-theme .header-text h3 {
  color: #2c210d !important;
}

body.light-theme .radio-card:hover .header-text h3,
body.light-theme .radio-card.card-playing .header-text h3 {
  color: #b38c2b !important;
}

body.light-theme .stations-badge {
  color: #b38c2b !important;
  background: rgba(179, 140, 43, 0.1) !important;
  border-color: rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .accordion-arrow-wrapper {
  color: #5a4e3e !important;
}

body.light-theme .radio-stations-list {
  background: #fdfbf7 !important;
  border-top-color: rgba(179, 140, 43, 0.1) !important;
}

body.light-theme .radio-station-item {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .radio-station-item:hover {
  background: rgba(179, 140, 43, 0.04) !important;
  border-color: rgba(179, 140, 43, 0.3) !important;
}

body.light-theme .radio-station-item.playing {
  background: rgba(179, 140, 43, 0.08) !important;
  border-color: rgba(179, 140, 43, 0.4) !important;
}

body.light-theme .station-name {
  color: #2c210d !important;
}

body.light-theme .radio-station-item.playing .station-name {
  color: #b38c2b !important;
}

body.light-theme .station-subtitle {
  color: #6a5e4e !important;
}

body.light-theme .station-play-btn {
  background: rgba(0, 0, 0, 0.03) !important;
  color: #b38c2b !important;
  border-color: rgba(179, 140, 43, 0.2) !important;
}

body.light-theme .radio-station-item:hover .station-play-btn {
  background: #b38c2b !important;
  color: #ffffff !important;
  border-color: #b38c2b !important;
}

/* قسم البث المباشر للحرمين */
body.light-theme .haramain-section {
  background: #fdfbf7 !important;
}

body.light-theme .haramain-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .haramain-card:hover {
  box-shadow: 0 10px 30px rgba(179, 140, 43, 0.08) !important;
  border-color: rgba(179, 140, 43, 0.35) !important;
}

body.light-theme .haramain-card-header h3 {
  color: #1a1105 !important;
}

body.light-theme .haramain-selectors {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .haramain-selector-btn {
  color: #4a3e2e !important;
}

body.light-theme .haramain-selector-btn:hover {
  color: #1a1105 !important;
}

body.light-theme .haramain-selector-btn.active {
  background: #b38c2b !important;
  color: #ffffff !important;
}

body.light-theme .haramain-theater-btn {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
  color: #4a3e2e !important;
}

body.light-theme .haramain-theater-btn:hover {
  background: rgba(179, 140, 43, 0.08) !important;
  color: #b38c2b !important;
}

body.light-theme .haramain-theater-btn.active {
  background: #b38c2b !important;
  color: #ffffff !important;
}

body.light-theme .haramain-stats-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.3) !important;
  box-shadow: 0 4px 15px rgba(179, 140, 43, 0.05) !important;
}

body.light-theme .stats-label {
  color: #4a3e2e !important;
}

body.light-theme .haramain-stats-count {
  color: #b38c2b !important;
  background: rgba(0, 0, 0, 0.03) !important;
  text-shadow: none !important;
}

/* قسم البث المباشر للفيديو */
body.light-theme .livestream-section {
  background: #fdfbf7 !important;
}

body.light-theme .livestream-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .livestream-card:hover {
  border-color: rgba(179, 140, 43, 0.4) !important;
  box-shadow: 0 12px 30px rgba(179, 140, 43, 0.08) !important;
}

body.light-theme .livestream-info h3 {
  color: #1a1105 !important;
}

body.light-theme .livestream-meta span {
  color: #5a4e3e !important;
}

body.light-theme .livestream-placeholder {
  background: #f5eedc !important;
}

/* قسم المشايخ والعلماء */
body.light-theme .scholars {
  background: #fdfbf7 !important;
}

body.light-theme .scholar-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.15) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
}

body.light-theme .scholar-card:hover {
  border-color: rgba(179, 140, 43, 0.35) !important;
  box-shadow: 0 8px 25px rgba(179, 140, 43, 0.08) !important;
}

body.light-theme .scholar-card h3 {
  color: #1a1105 !important;
}

body.light-theme .scholar-card img {
  border-color: #b38c2b !important;
}

body.light-theme .scholar-btn {
  background: linear-gradient(135deg, #b38c2b, #a47d20) !important;
  color: #ffffff !important;
}

body.light-theme .scholar-btn:hover {
  background: linear-gradient(135deg, #1a1105, #2c210d) !important;
  color: #ffffff !important;
}

/* قسم الدروس المرئية */
body.light-theme .videos {
  background: #f5eedc !important;
}

body.light-theme .video-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .video-card:hover {
  border-color: rgba(179, 140, 43, 0.4) !important;
  box-shadow: 0 10px 25px rgba(179, 140, 43, 0.08) !important;
}

body.light-theme .video-card .video-info h3 {
  color: #1a1105 !important;
}

body.light-theme .videos .search-input {
  background: #ffffff !important;
  border-color: rgba(179, 140, 43, 0.3) !important;
  color: #1a1105 !important;
  box-shadow: var(--shadow-sm) !important;
}

body.light-theme .videos .search-input::placeholder {
  color: #6a5e4e !important;
}

/* قسم المقالات العلمية */
body.light-theme .articles {
  background: #fdfbf7 !important;
}

body.light-theme .article-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.15) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
}

body.light-theme .article-card:hover {
  border-color: rgba(179, 140, 43, 0.35) !important;
  box-shadow: 0 8px 25px rgba(179, 140, 43, 0.08) !important;
}

body.light-theme .article-title a {
  color: #1a1105 !important;
}

body.light-theme .article-title a:hover {
  color: #b38c2b !important;
}

body.light-theme .article-excerpt {
  color: #5a4e3e !important;
}

body.light-theme .article-date {
  color: #b38c2b !important;
}

body.light-theme .read-more {
  color: #b38c2b !important;
}

body.light-theme .read-more:hover {
  color: #7a5c12 !important;
}

/* تبويبات الأقسام للمقالات */
body.light-theme .art-tab-btn {
  background: #ffffff !important;
  color: #4a3e2e !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
}

body.light-theme .art-tab-btn:hover {
  background: rgba(179, 140, 43, 0.05) !important;
  color: #b38c2b !important;
}

body.light-theme .art-tab-btn.active {
  background: #b38c2b !important;
  color: #ffffff !important;
  border-color: #b38c2b !important;
}

/* قسم جدول الدروس */
body.light-theme .schedule {
  background: linear-gradient(135deg, #f5eedc, #e8dfc9) !important;
}

body.light-theme .schedule-card {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.25) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .schedule-card:hover {
  background: #ffffff !important;
  border-color: rgba(179, 140, 43, 0.45) !important;
  box-shadow: 0 8px 25px rgba(179, 140, 43, 0.08) !important;
}

body.light-theme .schedule-card.today-highlight {
  border-color: #b38c2b !important;
  background: rgba(179, 140, 43, 0.04) !important;
  box-shadow: var(--shadow-gold), 0 0 25px rgba(179, 140, 43, 0.1) !important;
}

body.light-theme .schedule-card h3 {
  color: #1a1105 !important;
}

body.light-theme .schedule-card .schedule-meta {
  color: #5a4e3e !important;
}

body.light-theme .schedule-card .schedule-day {
  background: linear-gradient(135deg, #b38c2b, #a47d20) !important;
  color: #ffffff !important;
}

body.light-theme .schedule-today-badge {
  background: linear-gradient(135deg, #b38c2b, #a47d20) !important;
  color: #ffffff !important;
}

/* الفوتر */
body.light-theme .footer {
  background: #fdfaf3 !important;
  border-top: 1px solid rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .footer-brand p {
  color: #5a4e3e !important;
}

body.light-theme .visitor-counter {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.2) !important;
}

body.light-theme .visitor-counter:hover {
  background: #ffffff !important;
  border-color: rgba(179, 140, 43, 0.35) !important;
}

body.light-theme .counter-label {
  color: #5a4e3e !important;
}

body.light-theme .counter-number {
  color: #b38c2b !important;
}

body.light-theme .footer-links h4 {
  color: #b38c2b !important;
}

body.light-theme .footer-links a {
  color: #5a4e3e !important;
}

body.light-theme .footer-links a:hover {
  color: #b38c2b !important;
}

body.light-theme .footer-location {
  color: #5a4e3e !important;
}

body.light-theme .footer-map {
  border: 1px solid rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .footer-bottom {
  border-top: 1px solid rgba(179, 140, 43, 0.1) !important;
  color: #6a5e4e !important;
}

body.light-theme .footer-bottom .developer a {
  color: #b38c2b !important;
}

body.light-theme .footer-bottom .developer a:hover {
  color: #7a5c12 !important;
}

/* النوافذ المنبثقة (Modals) */
body.light-theme .modal {
  background: #ffffff !important;
  color: #2c210d !important;
}

body.light-theme .modal h3 {
  color: #1a1105 !important;
}

body.light-theme .modal p {
  color: #5a4e3e !important;
}

body.light-theme .modal-close {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #2c210d !important;
}

body.light-theme .modal-close:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

body.light-theme .article-modal-header h2 {
  color: #1a1105 !important;
}

body.light-theme .article-modal-content {
  color: #2c210d !important;
}

body.light-theme .article-modal-content p,
body.light-theme .article-modal-content li {
  color: #2c210d !important;
}

/* لوحة البحث الشامل التفاعلية */
body.light-theme .search-palette-content {
  background: #ffffff !important;
  border-color: rgba(179, 140, 43, 0.3) !important;
}

body.light-theme .search-group h4 {
  color: #b38c2b !important;
  border-bottom-color: rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .search-item {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .search-item:hover {
  background: rgba(179, 140, 43, 0.08) !important;
  border-color: rgba(179, 140, 43, 0.25) !important;
}

body.light-theme .search-item-title {
  color: #1a1105 !important;
}

body.light-theme .search-item-sub {
  color: #6a5e4e !important;
}

body.light-theme .search-item-icon {
  background: rgba(179, 140, 43, 0.1) !important;
  color: #b38c2b !important;
}

body.light-theme #searchPaletteInput {
  color: #1a1105 !important;
}

body.light-theme .search-palette-footer {
  background: rgba(0, 0, 0, 0.02) !important;
  border-top-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .search-palette-footer kbd {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #4a3e2e !important;
}

/* المشغل العائم */
body.light-theme .floating-player {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(179, 140, 43, 0.25) !important;
  box-shadow: var(--shadow-lg), 0 4px 20px rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .fp-title {
  color: #1a1105 !important;
}

body.light-theme .fp-subtitle {
  color: #5a4e3e !important;
}

body.light-theme .fp-close {
  color: #2c210d !important;
}

body.light-theme .fp-close:hover {
  color: #ff4a4a !important;
}

body.light-theme .fp-volume-icon {
  color: #2c210d !important;
}

body.light-theme .fp-wave {
  background: rgba(255, 255, 255, 0.9) !important;
}

/* ---------- 7. تحسينات إضافية لضمان تباين ووضوح المحتوى في الوضع الفاتح ---------- */

/* ألوان العناوين الرئيسية للأقسام لضمان تخطي التحديد الأصلي وبتباين عالٍ */
body.light-theme .videos .section-header h2,
body.light-theme .schedule .section-header h2,
body.light-theme .radio-section .section-header h2,
body.light-theme .livestream-section .section-header h2,
body.light-theme .haramain-section .section-header h2 {
  color: #1a1105 !important;
}

body.light-theme .videos .section-header p,
body.light-theme .schedule .section-header p,
body.light-theme .radio-section .section-header p,
body.light-theme .livestream-section .section-header p,
body.light-theme .haramain-section .section-header p {
  color: #5c4e3b !important;
}

/* قسم "دروس اليوم" والتقويم الهجري والميلادي */
body.light-theme .today-lessons-container {
  background: rgba(179, 140, 43, 0.05) !important;
  border: 1px solid rgba(179, 140, 43, 0.25) !important;
  box-shadow: 0 10px 30px rgba(179, 140, 43, 0.04), inset 0 0 15px rgba(179, 140, 43, 0.02) !important;
}

body.light-theme .today-lessons-header {
  border-bottom-color: rgba(179, 140, 43, 0.15) !important;
}

body.light-theme .today-lessons-title-wrapper h3 {
  color: #1a1105 !important;
}

body.light-theme .today-date-badge {
  background: rgba(179, 140, 43, 0.08) !important;
  color: #b38c2b !important;
  border-color: rgba(179, 140, 43, 0.25) !important;
}

/* أزرار التنقل والترقيم (Pagination Buttons) */
body.light-theme .pagination-btn {
  background: #ffffff !important;
  color: #b38c2b !important;
  border: 1px solid rgba(179, 140, 43, 0.25) !important;
}

body.light-theme .pagination-btn:hover:not(:disabled),
body.light-theme .pagination-btn.active {
  background: #b38c2b !important;
  color: #ffffff !important;
  border-color: #b38c2b !important;
  box-shadow: 0 3px 10px rgba(179, 140, 43, 0.2) !important;
}

body.light-theme .pagination-btn:disabled {
  background: #f7f7f7 !important;
  color: #c2b8a3 !important;
  border-color: #e2dcc8 !important;
  opacity: 0.6 !important;
}

/* أيقونات الفوتر ومظهر عداد الزوار */
body.light-theme .footer-location svg {
  color: #b38c2b !important;
}

body.light-theme .counter-icon {
  color: #b38c2b !important;
  background: rgba(179, 140, 43, 0.1) !important;
}

/* القائمة الجانبية المنسدلة للهواتف (Mobile Menu Navigation) */
@media (max-width: 768px) {
  body.light-theme .nav-links {
    background: rgba(253, 251, 247, 0.98) !important;
    border-bottom: 1px solid rgba(179, 140, 43, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  }
}

/* زر المفضلة للمودال وبلوك الاقتباس في المقالات */
body.light-theme .bookmark-modal-btn {
  background: #ffffff !important;
  color: #b38c2b !important;
  border: 1px solid rgba(179, 140, 43, 0.3) !important;
}

body.light-theme .bookmark-modal-btn:hover,
body.light-theme .bookmark-modal-btn.is-bookmarked {
  background: #b38c2b !important;
  color: #ffffff !important;
  border-color: #b38c2b !important;
}

body.light-theme .article-modal-content blockquote {
  color: #4a3e2e !important;
  background: rgba(179, 140, 43, 0.05) !important;
  border-right-color: #b38c2b !important;
}

/* تصنيف الكلمات الدلالية للمقالات (Article Tags) لتصبح بتباين ممتاز */
body.light-theme .article-tag,
body.light-theme .article-modal-labels .article-tag {
  background: rgba(179, 140, 43, 0.08) !important;
  color: #7a5c12 !important;
}

/* مشغل الصوت العائم: شريط الصوت وعناصر التحكم */
body.light-theme .fp-volume-slider {
  background: rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .fp-volume-wrapper {
  color: #5a4e3e !important;
}

/* مربعات البحث العامة والخاصة بالأقسام لضمان وضوح نصوص الإدخال والتلميحات */
body.light-theme .search-input {
  background: #ffffff !important;
  border: 1px solid rgba(179, 140, 43, 0.3) !important;
  color: #1a1105 !important;
  box-shadow: var(--shadow-sm) !important;
}

body.light-theme .search-input::placeholder {
  color: #6a5e4e !important;
}

body.light-theme .search-input:focus {
  border-color: #b38c2b !important;
  box-shadow: 0 0 0 3px rgba(179, 140, 43, 0.15) !important;
}

/* زر إغلاق المودال وألوانه */
body.light-theme .modal-close {
  background: rgba(179, 140, 43, 0.08) !important;
  color: #5a4e3e !important;
}

body.light-theme .modal-close:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* تصحيح ألوان شريط الحقوق والمطور في أسفل الفوتر لتبدو واضحة بتباين عالٍ */
body.light-theme .footer-bottom p {
  color: #5a4e3e !important;
}

body.light-theme .footer-bottom .developer {
  color: #1a1105 !important;
}

/* ==========================================================================
   📻 Floating Player Minimize & Bubble Styles
   ========================================================================== */

.fp-minimize {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  transition: var(--transition);
  order: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.fp-minimize:hover {
  color: var(--gold);
  transform: scale(1.1);
}

body.light-theme .fp-minimize {
  color: #2c210d !important;
}

body.light-theme .fp-minimize:hover {
  color: #b38c2b !important;
}

/* Floating Player Bubble Style */
.floating-player-bubble {
  position: fixed;
  bottom: 30px;
  left: 30px;
  right: auto;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--gold);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.4s;
  z-index: 1001;
  padding: 0;
  overflow: hidden;
}

.floating-player-bubble.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.floating-player-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  transition: transform 0.3s ease;
}

/* Rotation and pulsing animations */
.floating-player-bubble.playing {
  animation: fp-bubble-pulse 2s infinite ease-in-out;
}

.floating-player-bubble.playing img {
  animation: fp-bubble-rotate 12s infinite linear;
}

.floating-player-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(197, 160, 68, 0.5);
  border-color: var(--gold-light);
}

.floating-player-bubble:hover img {
  filter: brightness(0.7);
}

/* Interactive expand indicator inside bubble on hover */
.bubble-play-indicator {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.floating-player-bubble:hover .bubble-play-indicator {
  opacity: 1;
}

@keyframes fp-bubble-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fp-bubble-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 160, 68, 0.6);
    border-color: var(--gold);
  }
  50% {
    box-shadow: 0 0 20px 6px rgba(197, 160, 68, 0.4);
    border-color: var(--gold-light);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(197, 160, 68, 0.6);
    border-color: var(--gold);
  }
}

/* Scroll Top Lifted State */
.scroll-top.lifted {
  bottom: 90px;
}

/* Light Theme Overrides for Bubble */
body.light-theme .floating-player-bubble {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #b38c2b !important;
  box-shadow: 0 4px 15px rgba(179, 140, 43, 0.25) !important;
}

body.light-theme .floating-player-bubble.playing {
  animation: fp-bubble-pulse-light 2s infinite ease-in-out;
}

body.light-theme .floating-player-bubble:hover {
  border-color: #dbb960 !important;
  box-shadow: 0 6px 20px rgba(179, 140, 43, 0.4) !important;
}

body.light-theme .bubble-play-indicator {
  background: rgba(255, 255, 255, 0.7);
  color: #8c6d1c;
}

@keyframes fp-bubble-pulse-light {
  0% {
    box-shadow: 0 0 0 0 rgba(179, 140, 43, 0.5);
    border-color: #b38c2b;
  }
  50% {
    box-shadow: 0 0 20px 6px rgba(179, 140, 43, 0.35);
    border-color: #dbb960;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(179, 140, 43, 0.5);
    border-color: #b38c2b;
  }
}

/* Mobile Responsive */
@media (max-width: 576px) {
  .fp-minimize {
    font-size: 14px;
    padding: 3px;
  }

  .floating-player-bubble {
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
  }

  .bubble-play-indicator {
    font-size: 0.85rem;
  }

  .scroll-top.lifted {
    bottom: 80px;
  }
}