@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--navy:#0a1a3e;--navy-2:#1a2a5e;--gold:#c9a961;--gold-2:#b08334;--parchment:#f5ecd9;--brown:#2C1A0E;
      --muted:#6e5d3f;--border:#d8c9a8;--gold-light:#fdfaf3;--font-size:18px}
body{font-family:'Amiri','Traditional Arabic',serif;background:var(--parchment);
     color:var(--brown);direction:rtl;font-size:var(--font-size);line-height:1.8;min-height:100vh}
header{background:var(--navy)}
.header-inner{max-width:1100px;margin:0 auto;padding:.9rem 1.5rem;display:flex;
  align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.site-logo{display:flex;align-items:center;gap:.75rem;text-decoration:none}
.logo-cross{font-size:2rem;color:var(--gold);line-height:1}
.site-name .ar{display:block;font-size:1.15rem;font-weight:700;color:#c9a961 !important}
.site-name .en{display:block;font-size:.7rem;color:#8fa8cc;direction:ltr;letter-spacing:.5px}
nav.top-nav{display:flex;gap:.4rem;flex-wrap:wrap}
nav.top-nav a{background:rgba(201,169,97,.08);border:1px solid rgba(201,169,97,.35);
  color:#c9a961 !important;padding:.35rem .7rem;border-radius:4px;text-decoration:none;font-size:.88rem;font-weight:500;transition:.2s}
nav.top-nav a:hover{background:var(--gold);border-color:var(--gold);color:#0a1a3e !important}
main{max-width:1100px;margin:0 auto;padding:2rem 1.5rem;min-height:60vh}
.crumb{font-size:.88rem;color:var(--muted);margin-bottom:1.5rem;display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.crumb a{color:var(--gold);text-decoration:none}.crumb a:hover{text-decoration:underline}
.page-title{font-size:1.8rem;font-weight:700;color:var(--navy);margin-bottom:.25rem}
.page-sub{color:var(--muted);font-size:.9rem;margin-bottom:1.5rem}
.hero{text-align:center;padding:.9rem 0 .75rem;border-bottom:2px solid var(--border);margin-bottom:.75rem}
.hero h1{font-size:2rem;color:var(--navy);margin-bottom:.2rem}
.hero p{color:var(--muted);font-size:.9rem;max-width:540px;margin:.2rem auto 0}
.goldbar{width:60px;height:3px;background:var(--gold);margin:.4rem auto 0}
.section{margin-bottom:2.5rem}
.sec-title{font-size:1.25rem;font-weight:700;color:var(--navy);padding:.55rem 1rem;box-shadow:0 1px 3px rgba(0,0,0,.04);
  background:var(--gold-light);border-right:4px solid var(--gold);border-radius:0 6px 6px 0;margin-bottom:1.1rem}
.sec-title small{font-size:.82rem;font-weight:400;color:var(--muted);margin-right:.4rem}
.books-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:.5rem}
.book-card{background:#fff;border:1px solid var(--border);border-radius:6px;
  padding:.65rem .9rem;text-align:center;text-decoration:none;display:block;transition:.2s}
.book-card:hover{background:var(--gold-light);border-color:var(--gold);transform:translateY(-1px);box-shadow:0 2px 8px rgba(0,0,0,.07)}
.bk-ar{font-size:1.05rem;font-weight:700;color:var(--navy);display:block}
.bk-en{font-size:.7rem;color:var(--muted);direction:ltr;display:block;margin-top:.1rem}
.bk-ch{font-size:.75rem;color:var(--gold);margin-top:.2rem}
.ch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:.42rem}
.ch-btn{background:#fff;border:1px solid var(--border);border-radius:6px;padding:.55rem .2rem;
  text-align:center;text-decoration:none;font-size:1.05rem;color:var(--navy);transition:.2s;display:block}
.ch-btn:hover{background:var(--gold);color:#fff;border-color:var(--gold)}
.ch-nav{display:flex;justify-content:space-between;align-items:center;background:#fff;
  border:1px solid var(--border);border-radius:8px;padding:.7rem 1.2rem;margin-bottom:1.4rem;flex-wrap:wrap;gap:.5rem}
.ch-nav-title{font-size:1.1rem;font-weight:700;color:var(--navy)}
.arrows{display:flex;gap:.4rem}
.arrow{background:var(--navy);color:#fff;border:none;border-radius:4px;padding:.38rem .8rem;
  font-size:.95rem;text-decoration:none;display:inline-block;transition:.2s}
.arrow:hover{background:var(--gold)}.arrow.disabled{background:#ccc;pointer-events:none}
.back-link{color:var(--gold);text-decoration:none;font-size:.9rem}.back-link:hover{text-decoration:underline}
.tashkeel-btn,.font-btn,.scroll-btn{background:var(--gold);color:#fff;border:none;border-radius:4px;
  padding:.4rem .7rem;font-family:'Amiri',serif;font-size:.85rem;cursor:pointer;transition:.2s;white-space:nowrap}
.tashkeel-btn:hover,.font-btn:hover,.scroll-btn:hover{background:var(--navy)}
.tashkeel-btn.off,.scroll-btn.active{background:var(--muted)}
.tools-bar{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.vc{background:#fff;border:1px solid var(--border);border-radius:8px;padding:1.5rem 2rem;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.vr{display:flex;gap:.9rem;padding:.5rem 0;border-bottom:1px solid #F0E8D8;align-items:baseline}
.vr:last-child{border-bottom:none}
.vr:hover{background:#FDFAF5;margin:0 -.5rem;padding-right:.5rem;padding-left:.5rem;border-radius:3px}
.vr.highlight{background:#FDE68A;margin:0 -.5rem;padding-right:.5rem;padding-left:.5rem;border-radius:3px}
.vn{min-width:2rem;font-size:.78rem;color:var(--gold);font-weight:700;text-align:center;
  background:var(--gold-light);border-radius:3px;padding:.1rem .25rem;flex-shrink:0;direction:ltr;text-decoration:none;display:block}
.vn:hover{background:var(--gold);color:#fff}
.vt{font-size:calc(var(--font-size) * 1.0);line-height:2.1;color:var(--brown)}
.verse-single{background:#fff;border:1px solid var(--border);border-radius:8px;padding:2.5rem 2rem;text-align:center}
.verse-single .verse-ref{font-size:1rem;color:var(--gold);font-weight:700;margin-bottom:1rem}
.verse-single .verse-body{font-size:calc(var(--font-size) * 1.3);line-height:2.2;color:var(--brown);margin:1.5rem 0}
.verse-single .verse-back{margin-top:1.5rem}.verse-single .verse-back a{color:var(--gold);text-decoration:none;font-size:1rem}
.article-content{background:#fff;border:1px solid var(--border);border-radius:8px;padding:2rem;line-height:2.2;font-size:1.1rem;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.article-content h2{color:var(--navy);font-size:1.4rem;margin:2rem 0 .8rem;border-bottom:2px solid var(--gold);padding-bottom:.4rem}
.article-content h2:first-child{margin-top:0}
.article-content h3{color:var(--navy);font-size:1.15rem;margin:1.5rem 0 .5rem}
.article-content p{margin-bottom:1rem;text-align:justify}
.article-content .bible-verse{background:var(--gold-light);border-right:3px solid var(--gold);padding:.8rem 1.2rem;margin:1rem 0;border-radius:0 6px 6px 0;font-weight:700}
.article-content .bible-ref{
      color:var(--gold);
      font-size:.9rem;
      font-weight:600;
      display:inline-block;
      padding:.35rem .9rem;
      border-radius:6px;
      background:rgba(201,169,97,0.06);
      box-shadow: 0 0 0 1px rgba(201,169,97,0.2),
                  0 2px 4px rgba(201,169,97,0.2),
                  0 8px 24px rgba(201,169,97,0.18);
      transition: all 0.25s ease}
.article-list{list-style:none;padding:0}
.article-list li{margin-bottom:.8rem}
.article-list li a{display:block;background:#fff;border:1px solid var(--border);border-radius:6px;
  padding:1rem 1.2rem;text-decoration:none;transition:.2s}
.article-list li a:hover{background:var(--gold-light);border-color:var(--gold)}
.article-list .art-title{font-size:1.1rem;font-weight:700;color:var(--navy);display:block}
.article-list .art-en{font-size:.8rem;color:var(--muted);direction:ltr;display:block;margin-top:.2rem}
.error-page{text-align:center;padding:4rem 2rem}
.error-page h1{font-size:5rem;color:var(--gold);margin-bottom:.5rem}
.error-page h2{font-size:1.5rem;color:var(--navy);margin-bottom:1rem}
footer{background:var(--navy);color:#8fa8cc;text-align:center;padding:1.4rem;font-size:.88rem;margin-top:3rem}
footer a{color:var(--gold);text-decoration:none}footer p+p{margin-top:.35rem}

/* Search box styles */
#heroSearch:focus{border-color:var(--navy);box-shadow:0 2px 12px rgba(27,42,74,.15)}
.search-box input:focus{border-color:var(--navy)}
/* Article list shadows */
.article-list li{box-shadow:0 1px 4px rgba(0,0,0,.05)}
.article-list li:hover{box-shadow:0 3px 12px rgba(0,0,0,.1)}
/* Verse hover shadow */
.vr:hover{box-shadow:0 1px 6px rgba(0,0,0,.06)}
/* Button shadows */
.tashkeel-btn,.font-btn,.scroll-btn{box-shadow:0 1px 3px rgba(0,0,0,.1)}
.tashkeel-btn:hover,.font-btn:hover,.scroll-btn:hover{box-shadow:0 2px 6px rgba(0,0,0,.15)}

@media(max-width:620px){.books-grid{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))}
  .vc{padding:1rem}.hero h1{font-size:1.6rem}.header-inner{flex-direction:column;align-items:flex-start}
  .ch-nav{flex-direction:column;align-items:flex-start}.verse-single .verse-body{font-size:1.2rem}
  nav.top-nav a{font-size:.8rem;padding:.3rem .5rem}}


/* ============================================================ */
/* SITE-WIDE SEARCH BAR — appears on every page under nav menu  */
/* ============================================================ */
.search-bar{background:linear-gradient(180deg,#f5ecd9 0%,#FFF9F0 100%);border-bottom:1px solid var(--border);padding:.85rem 1rem;box-shadow:inset 0 -1px 0 rgba(0,0,0,.04)}
/* Search bar filter dropdowns */
.search-filters{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap}
.filter-label{color:#c9a961;font-size:.85rem;font-weight:600;white-space:nowrap}
.nav-filter{padding:.55rem 2rem .55rem 1rem;border:2px solid var(--gold);border-radius:8px;
  font-family:inherit;font-size:.9rem;background:#fff;box-shadow:0 2px 8px rgba(184,134,11,.10);
  cursor:pointer;direction:rtl;color:var(--brown);min-width:160px;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 6 5-6' stroke='%23c9a961' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat:no-repeat;background-position:left .8rem center;transition:all .2s}
.nav-filter:focus{outline:none;box-shadow:0 0 0 2px rgba(201,169,97,.3)}
.search-inner{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;justify-content:center}

.search-inner{max-width:720px;margin:0 auto}
.search-form{display:flex;gap:.5rem;align-items:stretch}
.search-input{flex:1;padding:.72rem 1rem;font-size:1rem;font-family:'Amiri',serif;border:2px solid var(--gold);border-radius:8px;direction:rtl;outline:none;background:#fff;box-shadow:0 2px 8px rgba(184,134,11,.10);transition:all .2s;color:var(--brown)}
.search-input::placeholder{color:#B5A082;opacity:1}
.search-input:focus{border-color:var(--navy);box-shadow:0 2px 12px rgba(15,26,51,.15),0 0 0 3px rgba(184,134,11,.08)}
.search-btn{background:linear-gradient(135deg,var(--gold) 0%,#9E7309 100%);color:#fff;border:none;padding:.72rem 1.5rem;border-radius:8px;font-weight:700;font-size:1rem;font-family:'Amiri',serif;cursor:pointer;box-shadow:0 2px 6px rgba(184,134,11,.28);transition:all .2s;white-space:nowrap}
.search-btn:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(184,134,11,.4)}

/* ============================================================ */
/* HOMEPAGE BOOK GRID — KJV-style two-column book listing       */
/* ============================================================ */
.book-section{max-width:1100px;margin:1.5rem auto;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 2px 12px rgba(0,0,0,.06);overflow:hidden}
.book-section-header{background:linear-gradient(135deg,var(--navy) 0%,#1A2845 100%);color:#fff;padding:.95rem 1.5rem;font-size:1.25rem;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.book-section-header .count{font-size:.82rem;opacity:.85;font-weight:400}
.book-grid-layout{display:grid;grid-template-columns:200px 1fr;gap:0;align-items:stretch}
.book-grid-label{background:linear-gradient(180deg,#f5ecd9 0%,#FFF9F0 100%);padding:2rem 1rem;border-left:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-family:'Amiri',serif;font-size:1.5rem;color:var(--navy);font-weight:700;text-align:center;line-height:1.4}
.book-list-container{display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:.8rem}
.book-link{display:block;padding:.55rem .9rem;color:var(--brown);text-decoration:none;font-size:1rem;border-radius:5px;transition:all .15s}
.book-link:hover{background:var(--gold-light);color:var(--navy)}
.book-link .ch-count{color:var(--muted);font-size:.75rem;margin-right:.3rem}

/* ============================================================ */
/* MOBILE RESPONSIVENESS                                        */
/* ============================================================ */
@media(max-width:760px){
  .book-grid-layout{grid-template-columns:1fr}
  .book-grid-label{border-left:none;border-bottom:1px solid var(--border);padding:1rem;font-size:1.15rem}
  .book-list-container{grid-template-columns:repeat(2,1fr);padding:.6rem}
}
@media(max-width:640px){
  .search-bar{padding:.6rem .7rem}
  .search-input{font-size:.95rem;padding:.6rem .8rem}
  .search-btn{padding:.6rem 1rem;font-size:.95rem}
  .top-nav{flex-wrap:wrap;gap:.3rem .7rem;padding:.4rem}
  .top-nav a{font-size:.88rem;padding:.25rem .5rem}
}
@media(max-width:480px){
  .book-list-container{grid-template-columns:1fr}
  .search-form{gap:.35rem}
}


/* ═══════════════════════════════════════════════════════════════
   SHADOW & 3D ENHANCEMENTS — Premium "WOW" Design
   Subtle elevation throughout the site
   ═══════════════════════════════════════════════════════════════ */

/* Navigation buttons — light 3D with depth */
.nav-links a, nav a[href]:not(.search-link) {
  box-shadow: 0 2px 4px rgba(15, 26, 51, 0.15), 
              0 1px 2px rgba(15, 26, 51, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  position: relative;
}
.nav-links a:hover, nav a[href]:not(.search-link):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 26, 51, 0.25),
              0 2px 4px rgba(15, 26, 51, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.nav-links a:active, nav a[href]:not(.search-link):active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 26, 51, 0.2),
              inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Search bar — premium elevated look */
.search-bar {
  box-shadow: 0 4px 12px rgba(15, 26, 51, 0.08),
              0 1px 3px rgba(15, 26, 51, 0.06);
}
.search-input {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}
.search-input:focus {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06),
              0 0 0 3px rgba(196, 156, 70, 0.15);
  outline: none;
}
.search-btn {
  box-shadow: 0 3px 6px rgba(196, 156, 70, 0.25),
              0 1px 3px rgba(196, 156, 70, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.18s ease;
  cursor: pointer;
}
.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(196, 156, 70, 0.35),
              0 2px 4px rgba(196, 156, 70, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.search-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(196, 156, 70, 0.3),
              inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Book cards on homepage — elevated card design */
.book-card, .bk-ar {
  box-shadow: 0 4px 10px rgba(15, 26, 51, 0.08),
              0 1px 3px rgba(15, 26, 51, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.book-card:hover, .bk-ar:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(15, 26, 51, 0.12),
              0 4px 8px rgba(15, 26, 51, 0.08);
}

/* Chapter and verse links */
.chapter-link, .verse-link, a.bible-verse-link {
  box-shadow: 0 2px 4px rgba(15, 26, 51, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.18s ease;
}
.chapter-link:hover, .verse-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 26, 51, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Bible verse display blocks */
.bible-verse {
  box-shadow: 0 2px 6px rgba(196, 156, 70, 0.08),
              0 1px 2px rgba(196, 156, 70, 0.05);
  transition: box-shadow 0.25s ease;
}
.bible-verse:hover {
  box-shadow: 0 4px 12px rgba(196, 156, 70, 0.12),
              0 2px 4px rgba(196, 156, 70, 0.08);
}

/* Search result cards — premium 3D */
#results > div {
  box-shadow: 0 2px 6px rgba(15, 26, 51, 0.07),
              0 1px 2px rgba(15, 26, 51, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#results > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 26, 51, 0.12),
              0 2px 4px rgba(15, 26, 51, 0.08) !important;
}

/* Pagination buttons — fully 3D */
#pagination button {
  box-shadow: 0 3px 6px rgba(15, 26, 51, 0.15),
              0 1px 2px rgba(15, 26, 51, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: all 0.15s ease;
}
#pagination button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(15, 26, 51, 0.2),
              0 2px 4px rgba(15, 26, 51, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}
#pagination button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 26, 51, 0.2),
              inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Dropdown filters on search page */
#navScope, #navBook {
  box-shadow: 0 2px 5px rgba(15, 26, 51, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.18s ease;
  cursor: pointer;
}
#navScope:hover, #navBook:hover {
  box-shadow: 0 4px 8px rgba(15, 26, 51, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#navScope:focus, #navBook:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 156, 70, 0.2),
              inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Article cards on more.html */
.article-card, .more-card {
  box-shadow: 0 4px 10px rgba(15, 26, 51, 0.08),
              0 1px 3px rgba(15, 26, 51, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.article-card:hover, .more-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 26, 51, 0.14),
              0 4px 8px rgba(15, 26, 51, 0.08);
}

/* Generic button styling — 3D depth */
button:not(.search-btn):not(#pagination button) {
  box-shadow: 0 2px 4px rgba(15, 26, 51, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.18s ease;
}
button:not(.search-btn):not(#pagination button):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 26, 51, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
button:not(.search-btn):not(#pagination button):active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 26, 51, 0.15),
              inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Page titles — subtle text-shadow for elegance */
.page-title {
  text-shadow: 0 1px 2px rgba(15, 26, 51, 0.08);
}

/* Breadcrumb container */
.crumb {
  box-shadow: 0 1px 3px rgba(15, 26, 51, 0.05);
}

/* Status text — small lift */
#status {
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Smooth scrolling for the whole site */
html {
  scroll-behavior: smooth;
}

/* Focus visible — accessible keyboard navigation */
*:focus-visible {
  outline: 3px solid rgba(196, 156, 70, 0.5);
  outline-offset: 2px;
}

/* Respect users who prefer reduced motion */
@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;
  }
  .book-card:hover, .bk-ar:hover, .article-card:hover, .more-card:hover,
  .search-btn:hover, #pagination button:hover, .nav-links a:hover {
    transform: none !important;
  }
}

/* Bible verse reference — Royal Glow Halo hover state */
.bible-ref:hover {
  box-shadow: 0 0 0 1px rgba(201,169,97,0.4),
              0 4px 8px rgba(201,169,97,0.3),
              0 12px 32px rgba(201,169,97,0.32) !important;
  transform: translateY(-1px);
}
/* Search result verse references also get hover halo intensification */
#results > div > a:first-child:hover {
  box-shadow: 0 0 0 1px rgba(201,169,97,0.45),
              0 4px 8px rgba(201,169,97,0.35),
              0 14px 36px rgba(201,169,97,0.38) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   DIVINE LIGHT — periodic golden glow on title every 3 minutes
   "I am the light of the world" — John 8:12
   ═══════════════════════════════════════════════════════════ */
@keyframes divineLightTitle {
  0%   { text-shadow: 0 0 0 rgba(201,169,97,0); filter: brightness(1); }
  20%  { text-shadow: 0 0 8px rgba(201,169,97,0.6),
                      0 0 16px rgba(201,169,97,0.45),
                      0 0 32px rgba(201,169,97,0.3); filter: brightness(1.3); }
  50%  { text-shadow: 0 0 14px rgba(255,224,150,0.9),
                      0 0 28px rgba(201,169,97,0.65),
                      0 0 56px rgba(201,169,97,0.4),
                      0 0 84px rgba(201,169,97,0.25); filter: brightness(1.55); }
  80%  { text-shadow: 0 0 8px rgba(201,169,97,0.5),
                      0 0 16px rgba(201,169,97,0.3),
                      0 0 32px rgba(201,169,97,0.2); filter: brightness(1.2); }
  100% { text-shadow: 0 0 0 rgba(201,169,97,0); filter: brightness(1); }
}
@keyframes divineLightCross {
  0%   { text-shadow: 0 0 0 rgba(201,169,97,0); filter: brightness(1); transform: scale(1); }
  20%  { text-shadow: 0 0 12px rgba(201,169,97,0.7),
                      0 0 24px rgba(201,169,97,0.5); filter: brightness(1.4); transform: scale(1.05); }
  50%  { text-shadow: 0 0 20px rgba(255,224,150,1),
                      0 0 40px rgba(201,169,97,0.75),
                      0 0 80px rgba(201,169,97,0.5),
                      0 0 120px rgba(201,169,97,0.3); filter: brightness(1.8); transform: scale(1.08); }
  80%  { text-shadow: 0 0 12px rgba(201,169,97,0.5),
                      0 0 24px rgba(201,169,97,0.3); filter: brightness(1.3); transform: scale(1.03); }
  100% { text-shadow: 0 0 0 rgba(201,169,97,0); filter: brightness(1); transform: scale(1); }
}
.divine-glow {
  animation: divineLightTitle 3.5s ease-in-out;
}
.divine-cross-glow {
  animation: divineLightCross 3.5s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .divine-glow, .divine-cross-glow { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM DROPDOWN — matches search input height + gold theme
   Replaces native <select> for full visual control
   ═══════════════════════════════════════════════════════════ */
.cdd{position:relative;min-width:180px;direction:rtl;display:inline-block;vertical-align:top}
.cdd-trigger{
  width:100%;padding:.72rem 2.2rem .72rem 1rem;
  font-size:1rem;font-family:inherit;
  border:2px solid var(--gold);border-radius:8px;
  background:#fff;box-shadow:0 2px 8px rgba(184,134,11,.10);
  cursor:pointer;direction:rtl;text-align:right;
  color:var(--brown);position:relative;
  transition:all .2s;line-height:1.4;
}
.cdd-trigger::after{
  content:"";position:absolute;left:.85rem;top:50%;
  width:10px;height:10px;
  border-right:2px solid var(--gold);border-bottom:2px solid var(--gold);
  transform:translateY(-75%) rotate(45deg);
  transition:transform .2s;pointer-events:none;
}
.cdd.open .cdd-trigger::after{transform:translateY(-25%) rotate(-135deg)}
.cdd-trigger:hover{box-shadow:0 4px 12px rgba(184,134,11,.18)}
.cdd-trigger:focus,.cdd.open .cdd-trigger{
  outline:none;
  box-shadow:0 0 0 3px rgba(201,169,97,.25),0 2px 8px rgba(184,134,11,.10);
}
.cdd-label{display:block;font-weight:500}
.cdd-panel{
  position:absolute;top:calc(100% + 6px);right:0;left:0;
  background:#fff;
  border:2px solid var(--gold);border-radius:8px;
  box-shadow:0 8px 24px rgba(184,134,11,.20),0 2px 8px rgba(15,26,62,.06);
  list-style:none;margin:0;padding:.4rem;
  z-index:100;max-height:340px;overflow-y:auto;
  display:none;direction:rtl;
}
.cdd.open .cdd-panel{display:block;animation:cddFadeIn .15s ease-out}
@keyframes cddFadeIn{
  from{opacity:0;transform:translateY(-4px)}
  to{opacity:1;transform:translateY(0)}
}
.cdd-opt{
  padding:.6rem .9rem;cursor:pointer;border-radius:6px;
  color:var(--brown);font-size:.95rem;
  direction:rtl;text-align:right;
  transition:background .15s,color .15s;
  user-select:none;
}
.cdd-opt:hover{background:rgba(201,169,97,.15);color:var(--navy)}
.cdd-opt.selected{background:var(--gold);color:#fff;font-weight:700}
.cdd-opt.selected:hover{background:var(--gold-2);color:#fff}
/* Scrollbar styling for the book panel */
.cdd-panel::-webkit-scrollbar{width:8px}
.cdd-panel::-webkit-scrollbar-track{background:rgba(201,169,97,.08);border-radius:4px}
.cdd-panel::-webkit-scrollbar-thumb{background:var(--gold);border-radius:4px}
.cdd-panel::-webkit-scrollbar-thumb:hover{background:var(--gold-2)}

/* User-facing HTML sitemap page */
.sitemap-content{max-width:900px;margin:0 auto;padding:0 1rem}
.sitemap-content h2{color:var(--navy);font-size:1.3rem;margin:2rem 0 1rem;padding-bottom:.5rem;border-bottom:2px solid var(--gold)}
.sitemap-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:.5rem}
.sitemap-list li{padding:0}
.sitemap-list a{display:block;padding:.6rem .9rem;background:#fff;border:1px solid var(--border);border-radius:6px;
  color:var(--navy);text-decoration:none;transition:all .15s;font-size:.95rem}
.sitemap-list a:hover{background:rgba(201,169,97,.08);border-color:var(--gold);transform:translateX(-2px);
  box-shadow:0 2px 8px rgba(184,134,11,.12)}
.sitemap-list .ar{font-weight:700}
.sitemap-list .en{color:var(--muted);font-size:.85rem}
.sitemap-list .ch{color:var(--gold);font-size:.82rem;font-weight:600}

/* Reading progress bar — always visible, navy idle → gold active */
.prog-bar {
  height: 8px;
  background: linear-gradient(180deg, rgba(201,169,97,0.10), rgba(201,169,97,0.22));
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 1px 2px rgba(184,134,11,0.15), 0 1px 3px rgba(201,169,97,0.18);
  position: relative;
}
.prog-bar.active {
  background: linear-gradient(180deg, rgba(201,169,97,0.05), rgba(201,169,97,0.15));
}
.prog-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  border-radius: 3px;
  transition: width 0.15s linear;
  box-shadow: 0 0 8px rgba(201,169,97,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
}
@media (prefers-reduced-motion: reduce) {
  .prog-bar, .prog-fill { transition: none; }
}

/* Contact form */
.contact-wrap{max-width:680px;margin:0 auto;padding:0 1rem}
.contact-intro{background:rgba(201,169,97,0.08);border-right:3px solid var(--gold);padding:1rem 1.25rem;border-radius:6px;margin-bottom:2rem;line-height:1.8}
.contact-intro p{margin:0 0 .5rem}
.contact-intro p:last-child{margin-bottom:0}
#contactForm{background:#fff;border:1px solid var(--border);border-radius:12px;padding:1.5rem;box-shadow:0 4px 12px rgba(15,26,62,0.06)}
.form-row{margin-bottom:1.25rem}
.form-row label{display:block;font-weight:600;color:var(--navy);margin-bottom:.4rem;font-size:.95rem}
.form-row .req{color:#c00;font-weight:700}
.form-row input,.form-row textarea{width:100%;padding:.7rem 1rem;border:2px solid var(--border);border-radius:8px;font-family:inherit;font-size:1rem;direction:rtl;background:#fff;color:var(--brown);transition:border-color .2s,box-shadow .2s;box-sizing:border-box}
.form-row input:focus,.form-row textarea:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,169,97,.18)}
.form-row textarea{resize:vertical;min-height:180px;line-height:1.8;font-family:"Amiri",serif}
.form-help{display:block;color:var(--muted);font-size:.82rem;margin-top:.35rem}
.word-counter{float:left;color:var(--muted);font-weight:500;font-size:.85rem}
.captcha-row label{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.captcha-row input[type="number"]{max-width:120px}
#captchaQuestion{font-weight:700;color:var(--gold);font-size:1.05rem;background:rgba(201,169,97,.1);padding:.25rem .7rem;border-radius:6px}
.hp-field{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.contact-btn{width:100%;padding:.85rem 1.5rem;background:var(--gold);color:#fff;border:none;border-radius:8px;font-family:inherit;font-size:1.05rem;font-weight:700;cursor:pointer;box-shadow:0 4px 12px rgba(201,169,97,.35);transition:all .2s}
.contact-btn:hover:not(:disabled){background:var(--gold-2);transform:translateY(-1px);box-shadow:0 6px 16px rgba(201,169,97,.45)}
.contact-btn:disabled{opacity:.6;cursor:wait}
.contact-status{margin-top:1.25rem}
.success-msg{background:#d4edda;border:2px solid #28a745;color:#155724;padding:1.2rem;border-radius:8px;font-weight:600;text-align:center}
.error-msg{background:#f8d7da;border:1.5px solid #dc3545;color:#721c24;padding:.85rem 1.1rem;border-radius:8px;font-weight:500}
