/* ============================================================
   Kur'an-ı Kerim — Nüzul Sırası | Tema (sıcak & mistik)
   Gerçek (telifsiz) fotoğraflar + sıcak altın/krem palet.
   Canlı varlık görseli içermez.
   ============================================================ */

:root {
  --bg-deep: #1a1330;        /* sıcak gece moru */
  --bg-deep2: #2a1b38;
  --panel: rgba(38, 26, 52, 0.72);
  --panel-solid: #271a37;
  --cream: #f3ebdd;          /* ana metin */
  --ink-soft: #cdbfa9;
  --gold: #d9b25f;
  --gold-soft: #f0d79a;
  --terra: #c4703d;          /* sıcak vurgu */
  --line: rgba(217, 178, 95, 0.30);
  --radius: 18px;
  --maxw: 1120px;
  --shadow: 0 14px 50px rgba(0, 0, 0, 0.5);
  --arabic-font: "Amiri", "Scheherazade New", serif;
  --header-h: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  color: var(--cream);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  background:
    linear-gradient(180deg, rgba(26,19,48,0.86), rgba(20,14,34,0.94)),
    radial-gradient(1100px 700px at 78% -8%, rgba(217,178,95,0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 108%, rgba(196,112,61,0.16), transparent 55%),
    linear-gradient(160deg, var(--bg-deep), var(--bg-deep2));
}
/* Tüm siteye hafif, sıcak fotoğraf dokusu (okunabilirliği bozmadan) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url("../img/desert.jpg") center/cover no-repeat;
  opacity: 0.10;
}

a { color: inherit; text-decoration: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(20,14,34,0.92), rgba(20,14,34,0.45));
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 1.9rem; color: var(--gold-soft); line-height: 1; text-shadow: 0 0 18px rgba(217,178,95,0.5); }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: "Cormorant Garamond", serif; font-size: 1.25rem; font-weight: 600; color: var(--gold-soft); }
.brand-sub { font-size: 0.78rem; color: var(--ink-soft); }

.lang-select select, .jump-select {
  appearance: none;
  background: var(--panel-solid); color: var(--cream);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 32px 9px 14px; font-size: 0.92rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d9b25f' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
[dir="rtl"] .lang-select select { padding: 9px 14px 9px 32px; background-position: left 12px center; }

/* ============================================================
   ANA SAYFA — tek ekran, dikey kaydırma yok, yatay karusel
   ============================================================ */
body.home { overflow: hidden; }
.home-main {
  height: calc(100vh - var(--header-h));
  max-width: 100%;
  display: flex; flex-direction: column;
  padding: 0; margin: 0;
}
.home-hero {
  position: relative; flex: 0 0 auto;
  padding: clamp(20px, 5vh, 54px) 20px clamp(14px, 3vh, 26px);
  text-align: center;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/night2.jpg") center 30%/cover no-repeat;
  opacity: 0.55;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 120% at 50% 0%, rgba(26,19,48,0.25), rgba(20,14,34,0.85));
}
.home-hero h1 {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(1.8rem, 4.4vw, 3rem); color: var(--gold-soft);
  margin: 0 0 8px; text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}
.home-hero p { color: var(--cream); margin: 0 0 18px; font-size: 1.05rem; opacity: .92; }
.jump-row { display: flex; justify-content: center; }
.jump-select { min-width: min(360px, 80vw); text-align: center; }

/* Karusel */
.carousel-wrap {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 10px clamp(8px, 4vw, 48px) 22px;
}
.carousel {
  display: flex; gap: 18px; height: 100%;
  align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px 4px 16px; flex: 1 1 auto;
  scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 8px; }
.carousel::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); }

.car-arrow {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: var(--panel-solid); color: var(--gold-soft);
  border: 1px solid var(--line); cursor: pointer; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.car-arrow:hover { background: var(--terra); color: #fff; transform: scale(1.06); }

/* Sure kartı (karusel) */
.surah-card {
  position: relative; overflow: hidden; flex: 0 0 auto;
  width: clamp(220px, 24vw, 270px);
  scroll-snap-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; color: var(--cream); cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  isolation: isolate;
}
.surah-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.surah-card .card-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transition: transform .5s ease;
}
.surah-card:hover .card-bg { transform: scale(1.07); }
.surah-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,14,34,0.15) 0%, rgba(20,14,34,0.55) 45%, rgba(20,14,34,0.92) 100%);
}
.card-top {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
[dir="rtl"] .card-top { flex-direction: row-reverse; }
.card-order {
  font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase;
  color: #2a1b38; background: var(--gold-soft); padding: 3px 10px;
  border-radius: 999px; font-weight: 700;
}
.card-type { font-size: 0.72rem; color: var(--cream); background: rgba(0,0,0,0.35); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; }
.card-arabic { font-family: var(--arabic-font); font-size: 2.1rem; color: var(--gold-soft); text-align: right; direction: rtl; margin: 0 0 2px; text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
.card-latin { font-family: "Cormorant Garamond", serif; font-size: 1.3rem; font-weight: 600; }
.card-context {
  font-size: 0.82rem; color: var(--ink-soft); margin: 6px 0 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { font-size: 0.78rem; color: var(--gold); margin-top: 8px; opacity: .9; }

/* ============================================================
   SURE SAYFASI
   ============================================================ */
.container { max-width: 820px; margin: 0 auto; padding: 24px 20px 110px; }

.status {
  text-align: center; padding: 28px; margin: 30px auto; max-width: 540px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--ink-soft);
}
.status.error { border-color: #8a4a3a; color: #f0c0b0; }

.surah-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 54px 24px; text-align: center; margin-top: 6px;
}
.surah-hero .hero-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.surah-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,14,34,0.45), rgba(20,14,34,0.82));
}
.hero-overlay { position: relative; z-index: 2; }
.hero-order {
  display: inline-block; font-size: 0.78rem; letter-spacing: .12em; text-transform: uppercase;
  color: #2a1b38; background: var(--gold-soft); padding: 4px 13px; border-radius: 999px; font-weight: 700;
}
.hero-arabic { font-family: var(--arabic-font); font-size: clamp(2.6rem, 8vw, 3.8rem); color: var(--gold-soft); margin: 16px 0 6px; text-shadow: 0 2px 24px rgba(0,0,0,0.7); }
.hero-latin { font-family: "Cormorant Garamond", serif; font-size: 1.6rem; margin: 0 0 6px; }
.hero-meta { color: var(--cream); margin: 0; font-size: 0.94rem; opacity: .92; }

/* İniş sebebi paneli */
.context-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 18px 20px; margin: 18px 0 6px;
  display: flex; gap: 14px; align-items: flex-start;
}
.context-panel .ico { font-size: 1.5rem; color: var(--gold-soft); line-height: 1; }
.context-body { flex: 1; }
.context-panel h2 { font-family: "Cormorant Garamond", serif; font-size: 1.2rem; color: var(--gold-soft); margin: 0 0 10px; font-weight: 600; letter-spacing: .02em; }
.context-panel h3 { font-size: 0.8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin: 14px 0 4px; }
.context-panel p { margin: 0; color: var(--cream); font-size: 0.98rem; }
.context-meta { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.context-meta li { display: flex; flex-direction: column; background: rgba(0,0,0,0.18); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.cm-key { font-size: 0.72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.cm-val { font-size: 0.98rem; color: var(--gold-soft); }

/* Besmele */
.bismillah-block { text-align: center; padding: 26px 10px 8px; }
.bismillah { font-family: var(--arabic-font); text-align: center; direction: rtl; font-size: 1.9rem; color: var(--gold-soft); }
.bismillah-read { font-family: "Inter", sans-serif; font-style: italic; color: var(--ink-soft); font-size: 1rem; margin-top: 6px; }

/* Üst sure gezinme */
.surah-nav--top { margin: 6px 0 0; }

/* Ayet listesi */
.ayah-list { margin: 12px 0 90px; }
.ayah {
  border: 1px solid transparent; border-bottom-color: var(--line);
  padding: 22px 16px; border-radius: 14px;
  transition: background .35s ease, box-shadow .35s ease;
}
.ayah-arabic { font-family: var(--arabic-font); direction: rtl; text-align: right; font-size: clamp(1.8rem, 5.5vw, 2.4rem); line-height: 2.15; color: var(--cream); }
.ayah-num {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Inter", sans-serif; font-size: 0.82rem; font-weight: 600;
  min-width: 1.9em; height: 1.9em; margin: 0 6px; color: var(--gold);
  border: 1px solid var(--line); border-radius: 50%; vertical-align: middle;
}
.ayah-trans { margin: 12px 2px 0; color: var(--ink-soft); font-size: 1.04rem; }
.ayah.active {
  background: linear-gradient(90deg, rgba(217,178,95,0.20), rgba(196,112,61,0.06));
  box-shadow: inset 0 0 0 1px var(--gold-soft);
}
.ayah.active .ayah-arabic { color: var(--gold-soft); }
.ayah.active .ayah-trans { color: var(--cream); }

/* Süre gezinme */
.surah-nav { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0 40px; }
.nav-btn { flex: 1; text-align: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--cream); transition: border-color .2s, color .2s, background .2s; }
.nav-btn:hover { border-color: var(--gold-soft); color: var(--gold-soft); background: rgba(217,178,95,0.08); }
.nav-btn.disabled { opacity: .35; pointer-events: none; }

/* Sesli okuma çubuğu */
.audio-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-solid); border: 1px solid var(--gold-soft);
  border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow);
}
.audio-btn { background: transparent; border: none; color: var(--cream); font-size: 1.1rem; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; transition: background .2s, color .2s; }
.audio-btn:hover { background: rgba(217,178,95,0.2); color: var(--gold-soft); }
.audio-btn--main { background: var(--gold-soft); color: #2a1b38; font-size: 1.2rem; width: 48px; height: 48px; }
.audio-btn--main:hover { background: var(--terra); color: #fff; }
.audio-info { font-size: 0.85rem; color: var(--ink-soft); min-width: 86px; text-align: center; }

/* ---------- Ana menü (header) ---------- */
.main-nav { display: flex; gap: 6px; margin-left: auto; margin-right: 14px; }
[dir="rtl"] .main-nav { margin-left: 14px; margin-right: auto; }
.main-nav a {
  padding: 7px 14px; border-radius: 999px; font-size: 0.92rem; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.main-nav a:hover { background: rgba(217,178,95,0.14); color: var(--gold-soft); }

/* ---------- Sureler liste sayfası ---------- */
.list-toggle { display: flex; gap: 8px; justify-content: center; margin: 0 0 20px; }
.toggle-btn {
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-size: 0.92rem;
  background: rgba(38,26,52,0.6); border: 1px solid var(--line); color: var(--cream);
  transition: background .2s, color .2s, border-color .2s;
}
.toggle-btn:hover { border-color: var(--gold-soft); }
.toggle-btn.active { background: var(--gold-soft); color: #2a1b38; font-weight: 600; border-color: var(--gold-soft); }

.surah-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.surah-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  color: var(--cream); transition: border-color .2s, transform .2s, background .2s;
}
.surah-row:hover { border-color: var(--gold-soft); transform: translateY(-2px); background: rgba(217,178,95,0.06); }
.row-no { min-width: 64px; font-size: 0.74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #2a1b38; background: var(--gold-soft); padding: 5px 8px; border-radius: 999px; text-align: center; }
.row-main { flex: 1; display: flex; flex-direction: column; }
.row-name { font-family: "Cormorant Garamond", serif; font-size: 1.2rem; font-weight: 600; }
.row-sub { font-size: 0.8rem; color: var(--ink-soft); }
.row-arabic { font-family: var(--arabic-font); font-size: 1.7rem; color: var(--gold-soft); }

/* ---------- Arama kutusu ---------- */
.search-wrap { position: relative; display: inline-block; width: min(440px, 88vw); text-align: left; }
.search-input {
  width: 100%; box-sizing: border-box;
  background: rgba(20,14,34,0.7); color: var(--cream);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 13px 20px; font-size: 1rem; outline: none;
  backdrop-filter: blur(6px);
}
.search-input:focus { border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(217,178,95,0.18); }
.search-input::placeholder { color: var(--ink-soft); }
.search-results {
  list-style: none; margin: 8px 0 0; padding: 6px;
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto;
}
.search-results li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--cream);
}
.search-results li:hover { background: rgba(217,178,95,0.14); }
.sr-no { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #2a1b38; background: var(--gold-soft); border-radius: 50%; }
.sr-name { font-family: "Cormorant Garamond", serif; font-size: 1.1rem; flex: 1; }
.sr-ar { font-family: var(--arabic-font); color: var(--gold-soft); font-size: 1.2rem; }

/* ---------- Konu çubuğu / chip ---------- */
.themes-row {
  flex: 0 0 auto; display: flex; gap: 10px; align-items: center;
  overflow-x: auto; padding: 4px clamp(8px, 4vw, 48px) 6px;
  scrollbar-width: none; justify-content: center;
}
.themes-row::-webkit-scrollbar { display: none; }
.themes-row--page { flex-wrap: wrap; justify-content: flex-start; margin: 6px 0 18px; overflow: visible; padding: 0; }
.theme-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px; white-space: nowrap;
  background: rgba(38,26,52,0.6); border: 1px solid var(--line); color: var(--cream);
  font-size: 0.92rem; transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.theme-chip:hover { background: rgba(217,178,95,0.16); border-color: var(--gold-soft); transform: translateY(-2px); }
.theme-chip.active { background: var(--gold-soft); color: #2a1b38; border-color: var(--gold-soft); font-weight: 600; }
.chip-ico { font-size: 1.05rem; }

/* ---------- Okunuş (transliterasyon) & ayet referansı ---------- */
.ayah-translit { margin: 8px 2px 0; color: var(--gold-soft); font-style: italic; font-size: 0.98rem; opacity: .92; }
.ayah-ref { font-size: 0.78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; font-weight: 600; }
.themes-title { font-family: "Cormorant Garamond", serif; font-weight: 600; color: var(--gold-soft); font-size: clamp(1.5rem, 4vw, 2.2rem); text-align: center; margin: 8px 0 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .themes-row { justify-content: flex-start; }
  .brand-sub { display: none; }
  .car-arrow { display: none; }                 /* mobilde parmakla kaydırma */
  .surah-card { width: 78vw; }
  .ayah { padding: 18px 8px; }
}
@media (max-height: 560px) {
  .home-hero { padding-top: 14px; padding-bottom: 8px; }
  .home-hero p { display: none; }
}
