/* =========================================================
   QURAN SECTION PAGE — STYLES
   Same design tokens as azhar.html / library.html / exams.html.
   Light theme, gold accent, Cairo font.
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #c9a84c;
  --gold-light: #f5ecd4;
  --gold-hover: #b8923e;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;

  --radius-card: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Cairo", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  direction: rtl;
  min-height: 100vh;
}

/* =========================================================
   HEADER — identical pattern to azhar.html
========================================================= */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-icon {
  width: 42px;
  height: 42px;
  background: var(--gold-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.header-title {
  font-size: 19px;
  font-weight: 700;
}
.header-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 1px;
}

.back-link {
  margin-right: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.back-link:hover {
  color: var(--gold-hover);
}

/* Hero Section Styling */
/* ══ HERO ══ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 28px 80px;

  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #eef2ff 100%);
}
.hero-content {
  max-width: 820px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 100px;
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s forwards;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero-title {
  font-family: "Cairo", sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 28px;
}
.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.7s forwards;
}
.hero-title .line:nth-child(1) {
  animation-delay: 0.2s;
}
.hero-title .line:nth-child(2) {
  animation-delay: 0.35s;
  color: var(--gold);
}
.hero-title .line:nth-child(3) {
  animation-delay: 0.5s;
}

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

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 44px;
  opacity: 0;
  animation: fadeUp 0.7s 0.65s forwards;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.7s 0.8s forwards;
  margin-bottom: 72px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, #a07828 100%);
  color: #0a0a0f;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Tajawal", sans-serif;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(201, 168, 76, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Tajawal", sans-serif;
}
.btn-outline:hover {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ── Hero stats row ── */
.hero-stats {
  display: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.7s 1s forwards;
  max-width: 680px;
  margin: 0 auto;
}
.hstat {
  background: var(--surface);
  padding: 24px 16px;
  text-align: center;
  transition: background 0.2s;
}
.hstat:hover {
  background: var(--surface2);
}
.hstat-num {
  font-family: "Cairo", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.hstat-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-azhar {
  height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("../../images/hero-bg.webp") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* الكلام على اليمين */
  padding: 0 8%;
  color: #fff;
  font-family: "Cairo", sans-serif;
}

.hero-content {
  max-width: 600px;
  text-align: right; /* النص يمين */
}

.hero-content h1 {
  font-size: 3rem;
  color: #ffd700; /* دهبي */
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 30px;
}

.cta-btn {
  background-color: #ffd700;
  color: #000;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.cta-btn:hover {
  background-color: #fff;
  color: #000;
}

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 40px;

  background: url("../../images/Arabic-sec-img.webp");
  background-size: cover;
  background-position: center;
}

/* طبقة فوق الصورة */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

/* الكونتينر */
.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;

  align-items: center;
  gap: 40px;
}

/* النص */
.hero-text {
  color: white;
  text-align: right;
}

/* badge */
.hero-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  margin-bottom: 20px;
}

/* العنوان */
.hero-title {
  font-size: 3rem;
  font-weight: 900;
  font-family: "Cairo", sans-serif;
  margin-bottom: 20px;

  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);

  background: linear-gradient(90deg, #c9a84c, #e8c96d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* النص */
.hero-desc {
  color: #e5e7eb;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* الأزرار */
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

/* stats */
.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stats .num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
}

.hero-stats .label {
  display: block;
  font-size: 0.8rem;
  color: #d1d5db;
}

/* الصورة */
.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* موبايل */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 24px 100px;
}

/* =========================================================
   SHARED SECTION HEADERS
========================================================= */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.section-label::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 22px;
}

/* =========================================================
   SECTION 1 — ACCORDION (identical to azhar.css)
========================================================= */
.intro-section {
  margin-bottom: 56px;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.acc-item.open {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}

.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
}

.acc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.acc-item.open .acc-icon {
  background: var(--gold);
}

.acc-heading {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}

.acc-chevron {
  font-size: 18px;
  color: var(--gray-400);
  transition:
    transform 0.25s var(--ease),
    color 0.2s var(--ease);
}
.acc-item.open .acc-chevron {
  color: var(--gold);
  transform: rotate(180deg);
}

.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.acc-item.open .acc-panel {
  max-height: 600px;
}

.acc-list {
  list-style: none;
  padding: 0 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-list li {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.7;
  padding-right: 18px;
  position: relative;
}
.acc-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.reviews-grid {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.review-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 14px;
}
.review-stars {
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.review-text {
  font-size: 12.5px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 8px;
}
.review-author {
  font-size: 11.5px;
  color: var(--gray-400);
  font-weight: 600;
}

/* =========================================================
   SECTION 2 — CTA (identical to azhar.css)
========================================================= */
.cta-section {
  display: flex;
  justify-content: center;
  margin-bottom: 56px;
}

.cta-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: var(--gold);
  border: none;
  padding: 16px 48px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.cta-btn:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.42);
}

/* =========================================================
   SECTION 3 — FLOW
========================================================= */
.flow-section {
  scroll-margin-top: 90px;
}

.flow-step {
  animation: fadeUp 0.35s var(--ease);
}
.flow-step.is-hidden {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.step-back {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition:
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
.step-back:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.step-head .section-title {
  margin-bottom: 0;
}

/* =========================================================
   STAGE STACK — Step 1 (5 sections, full-width rows)
========================================================= */
.stage-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-row {
  width: 100%;
  font-family: inherit;
  text-align: right;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.stage-row:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stage-row-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.stage-row:hover .stage-row-icon {
  background: var(--gold);
}

.stage-row-text {
  flex: 1;
}

.stage-row-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 3px;
}

.stage-row-hint {
  font-size: 12px;
  color: var(--gray-400);
}

.stage-row-arrow {
  font-size: 18px;
  color: var(--gray-400);
  transition:
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.stage-row:hover .stage-row-arrow {
  color: var(--gold);
  transform: translateX(-3px);
}

/* =========================================================
   LESSONS GRID — Step 2 (same card pattern as library.css)
========================================================= */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.lesson-card-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 22px;

  display: flex;
  flex-direction: column;

  gap: 18px;

  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.lesson-card-wrapper:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.lesson-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
}

.lesson-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;

  min-height: 66px;
}

.download-btn {
  margin-top: auto;
}

.lesson-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.lesson-source {
  font-size: 12px;
  color: var(--gray-400);
}

.lesson-icon {
  width: 56px;
  height: 64px;
  border-radius: 12px;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}
.lesson-card-wrapper:hover .lesson-icon {
  background: var(--gold);
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.3);
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.download-btn:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.38);
}

/* =========================================================
   EMPTY STATE
========================================================= */
.empty-state {
  text-align: center;
  color: var(--gray-400);
  font-size: 13.5px;
  padding: 60px 0;
}
.is-hidden {
  display: none;
}
/* ═══════════ SEARCH BAR STYLE ═══════════ */
.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  margin: 20px 0;
  transition: all 0.3s ease;
}

.search-bar:focus-within {
  border-color: #c9a84c; /* الذهبي */
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
}

.search-icon {
  font-size: 18px;
  color: #c9a84c;
  margin-left: 8px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  padding: 6px;
  background: transparent;
  color: #333;
}

.search-input::placeholder {
  color: #999;
  font-size: 14px;
}
/* ═══════════ FILTER BAR ═══════════ */

.filter-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0 20px;
  margin-bottom: 18px;

  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);

  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 700;

  padding: 12px 24px;
  border-radius: 999px;

  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;

  display: flex;
  align-items: center;
  gap: 8px;

  flex-shrink: 0;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.35);
}

/* نتائج البحث */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.result-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

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

.result-header {
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}

.result-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.download-btn {
  display: inline-block;
  background: #c9a84c;
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.download-btn:hover {
  background: #b08f3d;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
  .lessons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  main {
    padding: 28px 16px 80px;
  }
  .page-header {
    padding: 14px 18px;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .lessons-grid {
    grid-template-columns: 1fr;
  }
  .stage-row {
    padding: 14px 16px;
  }
}
.logo-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
}
.TT {
  text-align: center;
}
.BTN {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: var(--gold);
  border: none;
  padding: 12px 32px; /* أصغر من 16px 48px */
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.BTN:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.42);
}
