/* ═══════════════════════════════════════════════════════════════
   QURAN HOME PAGE — LUXURY ISLAMIC DESIGN SYSTEM
   Zero Emojis | Emerald & Gold Palette | Cinematic Hero | Dual Navigation
   ═══════════════════════════════════════════════════════════════ */

.quran-index-page {
  background: #F8FAF9;
  min-height: 100vh;
  padding-bottom: 4rem;
}

/* ─── Hero Section ───────────────────────────────────────────── */
.qh-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  padding: 3.5rem 1.25rem 4rem;
  text-align: center;
  color: #FFFFFF;
  background: linear-gradient(180deg, rgba(11, 59, 44, 0.88) 0%, rgba(6, 42, 31, 0.95) 100%),
              url('/static/images/quran_hero_cover.jpg') center/cover no-repeat;
  box-shadow: 0 10px 30px rgba(11, 59, 44, 0.18);
  margin-bottom: 2.5rem;
}

.qh-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  direction: rtl;
}

.qh-hero-ayah {
  font-family: var(--font-quran), 'Amiri Quran', 'Scheherazade New', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #F3E5AB;
  margin-bottom: 0.35rem;
  line-height: 1.8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.qh-hero-ayah-trans {
  font-family: var(--font-urdu);
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.qh-hero-title {
  font-family: var(--font-arabic-heading), 'Cairo', 'Amiri', serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.6rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.qh-hero-meta-pills {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.qh-meta-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 168, 76, 0.45);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: 0.8rem;
  font-family: var(--font-urdu);
  font-weight: 600;
  color: #FFFDF8;
}

/* ─── Mode Cards Grid (Reading vs Translation) ───────────────── */
.qh-mode-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto 2.25rem;
}

.qh-mode-card {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  text-align: right;
  transition: all 0.25s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.qh-mode-card:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #C9A84C;
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.qh-mode-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.qh-mode-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.25) 0%, rgba(11, 59, 44, 0.4) 100%);
  border: 1.5px solid #C9A84C;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F3E5AB;
  flex-shrink: 0;
}

.qh-mode-card-title {
  font-family: var(--font-arabic-heading), var(--font-arabic);
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.qh-mode-card-desc {
  font-family: var(--font-urdu);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 1.15rem;
}

.qh-mode-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #C9A84C;
  color: #0B3B2C;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-urdu);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
}

.qh-mode-card:hover .qh-mode-card-btn {
  background: #E0C988;
  color: #064E3B;
}

/* ─── Hero Live Search ───────────────────────────────────────── */
.qh-search-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  z-index: 10;
}

.qh-search-input-box {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 2px solid #C9A84C;
  border-radius: 30px;
  padding: 0.35rem 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.2s;
}

.qh-search-input-box:focus-within {
  border-color: #B45309;
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.4);
}

.qh-search-icon {
  color: #0B3B2C;
  margin-left: 0.6rem;
  flex-shrink: 0;
}

.qh-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-urdu);
  font-size: 1.05rem;
  color: #0F172A;
  padding: 6px 0;
  text-align: right;
  direction: rtl;
}

.qh-search-input::placeholder {
  color: #94A3B8;
  font-size: 0.95rem;
}

.qh-search-clear {
  background: #E2E8F0;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.qh-search-clear:hover {
  background: #CBD5E1;
  color: #0F172A;
}

/* Search Dropdown */
.qh-search-results-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1.5px solid #C9A84C;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
  text-align: right;
  direction: rtl;
}

.qh-results-list {
  padding: 0.5rem;
}

.qh-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: #0F172A;
  transition: background 0.15s;
  border-bottom: 1px solid #F1F5F9;
}

.qh-result-item:last-child {
  border-bottom: none;
}

.qh-result-item:hover {
  background: #FAF6ED;
}

.qh-result-badge {
  font-family: var(--font-urdu);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.qh-badge-surah { background: rgba(11, 59, 44, 0.1); color: #0B3B2C; }
.qh-badge-para { background: rgba(201, 168, 76, 0.15); color: #78350F; }
.qh-badge-ayah { background: rgba(5, 150, 105, 0.12); color: #059669; }
.qh-badge-trans { background: rgba(2, 132, 199, 0.1); color: #0284C7; }

.qh-result-info { flex: 1; min-width: 0; }
.qh-result-title { font-family: var(--font-arabic); font-size: 1.05rem; font-weight: 700; color: #0B3B2C; }
.qh-result-subtitle { font-family: var(--font-urdu); font-size: 0.78rem; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh-result-arrow { font-weight: 700; color: #C9A84C; font-size: 1rem; }

/* Famous Chips */
.qh-chips-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.qh-chip-label {
  font-family: var(--font-urdu);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

.qh-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 2px 11px;
  font-family: var(--font-arabic);
  font-size: 0.84rem;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s;
}

.qh-chip:hover {
  background: #C9A84C;
  color: #0B3B2C;
  border-color: #C9A84C;
  transform: translateY(-1px);
}

/* ─── Tabs & Filters Section ─────────────────────────────────── */
.qh-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  direction: rtl;
}

.qh-tabs-group {
  display: inline-flex;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.qh-tab-btn {
  border: none;
  background: transparent;
  padding: 7px 18px;
  border-radius: 9px;
  font-family: var(--font-urdu);
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qh-tab-btn.is-active {
  background: #0B3B2C;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(11, 59, 44, 0.25);
}

.qh-filter-input-wrap {
  position: relative;
  min-width: 260px;
}

.qh-filter-input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  font-family: var(--font-urdu);
  font-size: 0.88rem;
  color: #0F172A;
  outline: none;
  direction: rtl;
  transition: all 0.2s;
}

.qh-filter-input:focus {
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.qh-filter-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
}

/* ─── Surahs Grid ────────────────────────────────────────────── */
.qh-surahs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.15rem;
  direction: rtl;
}

.qh-surah-card {
  background: #FFFFFF;
  border: 1.2px solid #E2E8F0;
  border-radius: 14px;
  padding: 1.1rem 1.25rem 1rem;
  transition: all 0.22s ease;
  box-shadow: 0 2px 5px rgba(11, 59, 44, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.qh-surah-card:hover {
  border-color: #C9A84C;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.14);
  transform: translateY(-2px);
}

.qh-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.qh-surah-num-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F8FAF9;
  border: 1.5px solid #C9A84C;
  color: #0B3B2C;
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qh-card-meta-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qh-tag-rev {
  font-family: var(--font-urdu);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.qh-tag-makki {
  background: rgba(217, 119, 6, 0.1);
  color: #92400E;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.qh-tag-madani {
  background: rgba(5, 150, 105, 0.1);
  color: #065F46;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.qh-tag-ayahs {
  font-family: var(--font-urdu);
  font-size: 0.74rem;
  color: #64748B;
  font-weight: 600;
}

.qh-card-main {
  margin-bottom: 0.9rem;
}

.qh-card-surah-ar {
  font-family: var(--font-arabic);
  font-size: 1.45rem;
  font-weight: 700;
  color: #0B3B2C;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.qh-card-surah-sub {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-urdu);
  font-size: 0.82rem;
  color: #475569;
}

.qh-card-surah-en {
  font-family: var(--font-en);
  font-size: 0.76rem;
  color: #94A3B8;
}

/* Dual Mode Action Buttons */
.qh-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #F1F5F9;
}

.qh-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 7px;
  font-family: var(--font-urdu);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.qh-btn-translation {
  background: #FFFDF8;
  border: 1.2px solid #C9A84C;
  color: #78350F;
}

.qh-btn-translation:hover {
  background: #C9A84C;
  color: #FFFFFF;
}

.qh-btn-mushaf {
  background: #F0FDF4;
  border: 1.2px solid #059669;
  color: #065F46;
}

.qh-btn-mushaf:hover {
  background: #059669;
  color: #FFFFFF;
}

/* ─── Paras Grid ─────────────────────────────────────────────── */
.qh-paras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 1.15rem;
  direction: rtl;
}

.qh-para-card {
  background: #FFFFFF;
  border: 1.2px solid #E2E8F0;
  border-radius: 14px;
  padding: 1.1rem 1.25rem 1rem;
  transition: all 0.22s ease;
  box-shadow: 0 2px 5px rgba(11, 59, 44, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.qh-para-card:hover {
  border-color: #C9A84C;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.14);
  transform: translateY(-2px);
}

.qh-para-num-badge {
  background: rgba(11, 59, 44, 0.08);
  border: 1px solid rgba(11, 59, 44, 0.2);
  border-radius: 8px;
  padding: 2px 8px;
  font-family: var(--font-urdu);
  font-size: 0.78rem;
  font-weight: 700;
  color: #0B3B2C;
}

.qh-para-name-ar {
  font-family: var(--font-arabic);
  font-size: 1.45rem;
  font-weight: 700;
  color: #0B3B2C;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.qh-para-sub {
  font-family: var(--font-urdu);
  font-size: 0.82rem;
  color: #64748B;
}

/* ─── Mushaf 604 Pages Quick Jump Panel ──────────────────────── */
.qh-pages-panel {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  direction: rtl;
}

.qh-pages-panel-header {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

.qh-pages-title {
  font-family: var(--font-arabic-heading), var(--font-arabic);
  font-size: 1.5rem;
  font-weight: 700;
  color: #0B3B2C;
  margin-bottom: 0.35rem;
}

.qh-pages-desc {
  font-family: var(--font-urdu);
  font-size: 0.88rem;
  color: #64748B;
}

.qh-page-jump-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 360px;
  margin: 0 auto 2rem;
}

.qh-page-jump-input {
  width: 140px;
  padding: 8px 12px;
  border: 2px solid #C9A84C;
  border-radius: 10px;
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.qh-page-jump-btn {
  background: #0B3B2C;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 8px 20px;
  font-family: var(--font-urdu);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.qh-page-jump-btn:hover {
  background: #059669;
}

.qh-para-milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}

.qh-milestone-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  background: #F8FAF9;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  text-decoration: none;
  color: #0F172A;
  transition: all 0.15s;
}

.qh-milestone-btn:hover {
  background: #FFFDF8;
  border-color: #C9A84C;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(201, 168, 76, 0.15);
}

.qh-mb-pnum {
  font-family: var(--font-urdu);
  font-size: 0.74rem;
  font-weight: 700;
  color: #92400E;
}

.qh-mb-page {
  font-family: var(--font-urdu);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0B3B2C;
}

@media (max-width: 640px) {
  .qh-hero { padding: 1.8rem 0.85rem 2.5rem; }
  .qh-hero-title { font-size: 1.85rem; }
  .qh-hero-ayah { font-size: 1.25rem; }
  .qh-hero-meta-pills { gap: 0.35rem; }
  .qh-meta-pill { font-size: 0.72rem; padding: 3px 9px; }
  .qh-mode-cards-grid { grid-template-columns: 1fr; gap: 1rem; }
  .qh-surahs-grid, .qh-paras-grid { grid-template-columns: 1fr; }
  .qh-tabs-bar { flex-direction: column; align-items: stretch; }
  .qh-tabs-group { width: 100%; justify-content: space-between; }
  .qh-filter-input-wrap { width: 100%; }
}
