/* =========================================================
   MODERN QURAN UI CSS
   ========================================================= */

/* =========================
   RESET
========================= */

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

html {  scroll-behavior: smooth;}
body,h1,h2,h3,h4,h5,h6,p,ul,li,figure,blockquote { margin: 0;  padding: 0;}

img {
  max-width: 100%;
  max-height:fit-content;
  display: block;
}

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

/* =========================
   ROOT VARIABLES
========================= */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --transition: all .25s ease;
  --container: 1300px;
}

/* =========================
   DARK MODE
========================= */

body.dark-mode {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);
}

/* =========================
   BODY
========================= */

body {
  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;

  line-height: 1.7;

  transition:
    background .3s ease,
    color .3s ease;
}

/* =========================
   CONTAINER
========================= */

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* =========================
   HEADER
========================= */

header {

  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 28px;

  background:
    rgba(255,255,255,.72);

  backdrop-filter: blur(18px);

  border-bottom:
    1px solid rgba(255,255,255,.15);

  box-shadow: var(--shadow-sm);
}

body.dark-mode header {
  background:
    rgba(15,23,42,.75);
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

/* =========================
   NAVIGATION
========================= */

.nav-bar {
  position: relative;
}

.menu-icon {

  font-size: 1.8rem;
  cursor: pointer;

  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  transition: var(--transition);
}

.menu-icon:hover {
  background: var(--surface-2);
}

.menu-list {

  position: fixed;
  top: 0;
  right: -100%;

  width: 300px;
  height: 100vh;

  background: var(--surface);

  padding: 90px 30px;

  display: flex;
  flex-direction: column;
  gap: 22px;

  transition: .35s ease;

  z-index: 1001;

  border-left: 1px solid var(--border);

  box-shadow: var(--shadow-md);
}

.menu-list.open {
  right: 0;
}

.menu-list li a {

  display: block;

  padding: 14px 18px;

  border-radius: 14px;

  color: var(--text);

  font-weight: 500;

  transition: var(--transition);
}

.menu-list li a:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.overlay {

  position: fixed;
  inset: 0;

  background: rgba(0,0,0,.45);

  opacity: 0;
  visibility: hidden;

  transition: .3s ease;

  z-index: 1000;
}

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

/* =========================
   DARK MODE BUTTON
========================= */

.mode-toggle {

  width: 46px;
  height: 46px;
  padding:9px;
  display: grid;
  place-items: center;

  border-radius: 50%;

  border: 1px solid var(--border);

  background: var(--surface);

  cursor: pointer;

  transition: var(--transition);
}

.mode-toggle:hover {
  transform: rotate(10deg);
}

.mode-toggle svg {
  stroke: var(--text);
}

.sun {
  display: none;
}

body.dark-mode .sun {
  display: block;
}

body.dark-mode .moon {
  display: none;
}

/* =========================
   MAIN
========================= */

main {
  width: min(100% - 24px, var(--container));
  margin-inline: auto;
  padding-block: 40px;
}

/* =========================
   HERO
========================= */

.hero {

  padding: 80px 20px;

  text-align: center;

  border-radius: var(--radius-lg);

  background:
    linear-gradient(
      135deg,
      rgba(20,184,166,.10),
      rgba(15,118,110,.04)
    );

  border: 1px solid rgba(20,184,166,.12);
}

.hero h1 {

  font-size: clamp(2rem, 5vw, 4rem);

  line-height: 1.1;

  margin-bottom: 18px;
}

.hero p {

  max-width: 700px;
  margin-inline: auto;

  color: var(--muted);

  font-size: 1.1rem;
}

/* =========================
   SEARCH
========================= */

.search-container {
  margin: 40px auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-container input {
  width: 100%;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-container input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20,184,166,.12);
}

.selectb {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.selectb:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20,184,166,.12);
}

/* =========================
   CARDS
========================= */

.card-container {

  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(280px,1fr));

  gap: 24px;

  margin-top: 40px;
}

.card {

  background:
    rgba(255,255,255,.72);

  backdrop-filter: blur(14px);

  border:
    1px solid rgba(255,255,255,.15);

  border-radius: 24px;

  padding: 28px;

  box-shadow: var(--shadow-md);

  transition: var(--transition);
}

body.dark-mode .card {
  background: rgba(15,23,42,.72);
}

.card:hover {

  transform:
    translateY(-4px);

  border-color:
    rgba(20,184,166,.25);
}

.card p {

  font-size: 1.05rem;

  line-height: 1.9;

  margin-bottom: 18px;
}

.card span {

  color: var(--muted);

  font-size: .95rem;
}

/* =========================
   SURAH TITLE
========================= */

.surahname {

  margin-bottom: 28px;
}

.surahname h1 {

  font-size:
    clamp(2rem,4vw,3.5rem);

  font-weight: 700;

  line-height: 1.2;

  margin-bottom: 14px;
}

.surahname span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 2rem;
}

/* =========================
   AYAH CARD
========================= */

.ayet,
.ayet_box,
.translations {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.ayet:hover,
.ayet_box:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
}

.text {
  font-size: 1.1rem;
  line-height: 2;
}
.info {font-size: 12px;}
.originaltext {
  font-family: "Amiri", serif;
  font-size: clamp(2rem,5vw,3rem);
  line-height: 2.3;
  text-align: right;
  direction: rtl;
  margin-top: 30px;
}

.transtext {

  font-size: 1.1rem;

  line-height: 2;

  color: var(--text);
}

.transcription {

  margin-top: 18px;

  color: var(--primary);

  font-weight: 600;

  font-size: 1rem;
}

/* =========================
   BLOCKQUOTE
========================= */

blockquote {

  position: relative;

  padding: 40px;

  border-radius: 28px;

  background: var(--surface);

  border: 1px solid var(--border);

  box-shadow: var(--shadow-md);

  overflow: hidden;
}

blockquote::before {

  content: "❝";

  position: absolute;

  top: 18px;
  left: 24px;

  font-size: 4rem;

  opacity: .08;
}

/* =========================
   TABLE
========================= */

table {
  width: 100%;
  border-collapse: collapse;
}

th {

  text-align: left;

  color: var(--muted);

  font-weight: 600;

  padding: 18px;
}

td {

  padding: 18px;

  border-top: 1px solid var(--border);
}

/* =========================
   QURAN LIST
========================= */

.quran-wrapper {
  width: 100%;
}

.q-search {

  width: 100%;

  padding: 16px 18px;

  border-radius: 18px;

  border: 1px solid var(--border);

  background: var(--surface);

  margin-bottom: 18px;

  color: var(--text);

  outline: none;
}

.q-search:focus {

  border-color: var(--primary);

  box-shadow:
    0 0 0 4px rgba(20,184,166,.12);
}

/*.q-list {

  display: flex;
  flex-direction: column;
  gap: 14px;
}*/.q-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.q-list > * {
    width: calc(33.333% - 10px);
}

.q-card-horizontal {

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 20px;

  padding: 18px 22px;

  transition: var(--transition);
}

.q-card-horizontal:hover {

  transform: translateY(-2px);

  border-color: rgba(20,184,166,.25);

  box-shadow: var(--shadow-md);
}

.q-row {

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;
}

.q-index {

  min-width: 60px;

  text-align: center;

  padding: 8px 14px;

  border-radius: 999px;

  background: rgba(15,118,110,.12);

  color: var(--primary);

  font-weight: 700;
}

.q-title {

  flex: 1;

  font-weight: 600;

  font-size: 1rem;
}

.q-verse-count {

  color: var(--muted);

  font-size: .9rem;
}

/* =========================
   BUTTONS
========================= */

button,
.ceviributon {

  border: none;

  background: var(--primary);

  color: white;

  padding: 14px 22px;

  border-radius: 16px;

  font-size: .95rem;

  cursor: pointer;

  transition: var(--transition);
}

button:hover,
.ceviributon:hover {

  background: var(--primary-light);

  transform: translateY(-1px);
}

/* =========================
   SCROLL TOP
========================= */

.scrollup {

  position: fixed;

  right: 24px;
  bottom: 24px;

  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--primary);

  color: white;

  font-size: 1.2rem;

  box-shadow: var(--shadow-md);

  transition: var(--transition);
}

.scrollup:hover {

  transform:
    translateY(-4px);
}

/* =========================
   FOOTER
========================= */

footer {

  margin-top: 30px;

  padding: 30px 20px;

  text-align: center;

  color: var(--muted);

  border-top: 1px solid var(--border);
}

/* =========================
   UTILITIES
========================= */

.hidden {
  display: none !important;
}

.grid-container2,
.grid-container3 {

  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(320px,1fr));

  gap: 28px;
}

/* =========================
   FOCUS STATES
========================= */

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {

  outline: 3px solid rgba(20,184,166,.25);

  outline-offset: 2px;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {

  background: rgba(100,116,139,.35);

  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100,116,139,.55);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  header {
    padding: 14px 18px;
  }

  main {
    padding-block: 24px;
  }

  .search-container {
    flex-direction: column;
  }

  .menu-list {
    width: 85%;
  }

  .ayet,
  .ayet_box,
  .translations {
    padding: 22px;
  }

  .originaltext {
    font-size: 2rem;
    line-height: 2;
  }

  .q-row {
    /*flex-direction: column;
    align-items: flex-start;*/
  }

  .scrollup {
    right: 18px;
    bottom: 18px;
  }
}





/* =========================================================
   SURAH PAGE
========================================================= */

.surah-page {
  width: 100%;
}

.surah-top {

  display: flex;
  flex-direction: column;

  gap: 28px;
}

/* =========================================================
   SELECT AREA
========================================================= */

.select-wrapper {

  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(260px,1fr));

  gap: 18px;

  margin-bottom: 30px;
}

.select-group {

  display: flex;
  flex-direction: column;

  gap: 10px;
}

.select-group label {

  font-size: .95rem;

  font-weight: 600;

  color: var(--muted);
}

/* =========================================================
   SURAH HEADER CARD
========================================================= */

.surah-header-card {

  position: relative;

  display: flex;
  align-items: center;

  gap: 24px;

  padding: 32px;

  margin-bottom: 30px;

  border-radius: 28px;

  background:
    linear-gradient(
      135deg,
      rgba(20,184,166,.10),
      rgba(15,118,110,.04)
    );

  border:
    1px solid rgba(20,184,166,.12);

  overflow: hidden;
}

.surah-header-card::before {

  content: "";

  position: absolute;

  inset: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(20,184,166,.08),
      transparent 40%
    );
}

.surah-badge {
  min-width: 75px;
  height: 75px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 30px rgba(15,118,110,.25);
}

.surah-header-card h1 {

  display: flex;
  flex-direction: column;

  gap: 10px;

  font-size:
    clamp(2rem,4vw,3.4rem);

  line-height: 1.15;

  margin: 0;
}

.surah-header-card small {

  color: var(--muted);

  font-size: 1rem;

  font-weight: 500;
}

/* =========================================================
   SEARCH
========================================================= */

.search-wrapper {
  margin-bottom: 28px;
}

.sure-search-input {

  width: 100%;

  padding: 18px 22px;

  border-radius: 20px;

  border: 1px solid var(--border);

  background:
    rgba(255,255,255,.75);

  backdrop-filter: blur(12px);

  color: var(--text);

  font-size: 1rem;

  outline: none;

  transition: var(--transition);

  box-shadow:
    0 4px 14px rgba(15,23,42,.04);
}

body.dark-mode .sure-search-input {

  background:
    rgba(15,23,42,.75);
}

.sure-search-input:focus {

  border-color: var(--primary);

  box-shadow:
    0 0 0 4px rgba(20,184,166,.12);
}

/* =========================================================
   AYAH LIST
========================================================= */

.ceviriler {

  display: flex;
  flex-direction: column;

  gap: 18px;
}

/* =========================================================
   AYAH CARD
========================================================= */

.ayet {
  position: relative;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 30px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.ayet::before {

  content: "";

  position: absolute;

  top: 0;
  left: 0;

  width: 5px;
  height: 100%;

  background: var(--primary);

  opacity: .15;
}

.ayet:hover {

  transform:
    translateY(-3px);

  border-color:
    rgba(20,184,166,.25);

  box-shadow:
    0 16px 40px rgba(15,23,42,.08);
}

/* =========================================================
   AYAH NUMBER
========================================================= */

.ayet-number {

  min-width: 35px;
  height: 35px;

  border-radius: 10px;

  display: grid;
  place-items: center;

  background:
    rgba(20,184,166,.12);

  color: var(--primary);

  font-weight: 800;

  font-size: 1rem;

  flex-shrink: 0;
}

/* =========================================================
   AYAH CONTENT
========================================================= */

.ayet-content {

  width: 100%;

  display: flex;
  justify-content: space-between;

  gap: 18px;
}

.ayet .text {

  flex: 1;

  font-size: 1.12rem;

  line-height: 2;

  color: var(--text);
}

/* =========================================================
   AYAH LINK
========================================================= */

.ayet-link {

  min-width: 42px;
  height: 42px;

  border-radius: 14px;

  display: grid;
  place-items: center;

  background: var(--surface-2);

  color: var(--primary);

  transition: var(--transition);
}

.ayet-link:hover {

  background: var(--primary);

  color: white;

  transform: scale(1.05);
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
  .surah-header-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .ayet {
    flex-direction: column;
    padding: 24px;
  }

  .ayet-content {
    /*flex-direction: column;
        position: relative;
        z-index: 2;*/
  }
    .ayet-number {
        position: absolute;
        top: -1px;
        left: -1px;

        font-size: 1rem;

        opacity: .18;
        z-index: 0;

        background: var(--primary);
        color: var(--bg);
    }


  .ayet-link {
        position: absolute;
        bottom: -4px;
        right: -4px;
        opacity: .18;

    align-self: flex-start;
  }

  .ayet .text {
    font-size: 1.25rem;
    line-height: 1.9;
  }
  .q-list > * {
    width: calc(100% - 10px);
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .q-list > * {
    width: calc(50% - 10px);
  }
    
}@media (min-width: 1280px){
  .q-list > * {
    width: calc(24% - 2px);
  }
    
}