/* ============================================
   Quran Page Styles (Clean + Valid CSS)
   ============================================ */

:root {
  --midnight: #1A2A40;
  --gold: #D4AF37;
  --ivory: #F8F5F0;
  --charcoal: #2E2E2E;
  --teal: #4C8D82;
}

/* Section Container */
.q-section {
  max-width: 980px;
  margin: 32px auto 64px;
  padding: 0 16px;
  color: var(--charcoal);
}

.q-title {
  color: var(--midnight);
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Toolbar */
.q-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.q-form label {
  margin-right: 8px;
  color: var(--midnight);
  font-weight: 700;
}

.q-form select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid var(--gold);
  background-color: #fff;
  color: var(--midnight);
  font-size: 16px;
}

.q-page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 600px) {
  .q-toolbar {
    flex-direction: column;
    align-items: center;
  }

  .q-page-controls {
    justify-content: center;
    width: 100%;
  }
}


.q-page-info {
  color: var(--midnight);
  font-weight: 700;
}

/* Buttons */
.q-btn {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  padding: 10px 18px;
  transition: all 0.3s ease-in-out;
}

.q-btn-primary {
  background-color: var(--gold);
  color: var(--midnight);
  box-shadow: 0 3px 0 rgba(26, 42, 64, 0.18);
}

.q-btn-primary:hover {
  filter: brightness(0.95);
}

.q-btn-ghost {
  background-color: transparent;
  color: var(--midnight);
  border: 2px solid var(--midnight);
}

.q-btn-ghost:hover {
  background-color: rgba(26, 42, 64, 0.06);
}

/* Decorative Mushaf Frame */
.mushaf-frame {
  position: relative;
  background-color: #fff;
  border-radius: 16px;
  padding: 28px 30px 36px;
  box-shadow: 0 10px 30px rgba(26, 42, 64, 0.12);

  /* Outer ornamental border */
  border: 10px solid transparent;
  background-image:
    linear-gradient(#fff, #fff),
    repeating-linear-gradient(
      45deg,
      var(--midnight) 0 6px,
      #ffffff 6px 12px
    ),
    repeating-linear-gradient(
      -45deg,
      var(--midnight) 0 6px,
      #ffffff 6px 12px
    );
  background-origin: padding-box, border-box, border-box;
  background-clip: padding-box, border-box, border-box;
}

/* Inner gold keyline */
.mushaf-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  border: 2px solid var(--gold);
  pointer-events: none;
}

/* Surah Header */
.mushaf-plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 8px;
  padding: 8px 22px;
  background-color: var(--midnight);
  border: 2px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(26, 42, 64, 0.15);
}

.plaque-text {
  color: var(--ivory);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.plaque-sub {
  color: var(--gold);
  font-size: 12px;
  margin-top: 2px;
}

/* Quranic Page Text */
.ayah-container {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  font-size: 30px;
  line-height: 2.25;
  color: var(--midnight);
  padding: 22px 10px 6px;
  min-height: 420px;
  font-family: "Scheherazade New", "Amiri Quran", "KFGQPC Uthmanic Script HAFS", "Noto Naskh Arabic",serif;
}

.ayah {
  display: block;
  text-align: center;
  margin-inline: 6px;
  padding-inline: 2px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.ayah .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-size: 0.55em;
  font-weight: 700;
  color: var(--teal, #4C8D82);
  width: 1.6em;
  height: 1.6em;
  margin-inline-start: 0.35em;
  border: 2px solid var(--teal, #4C8D82);
  border-radius: 50%;
  line-height: 2;
  text-align: center;
  background-color: #fff;
  box-sizing: border-box;
}


.ayah.active {
  background-color: rgba(212, 175, 55, 0.12);
  color: var(--midnight);
  outline: 2px solid rgba(212, 175, 55, 0.55);
}

/* Audio Controls */
.q-audio-controls {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}



/* Responsive Typography */
@media (max-width: 768px) {

  .ayah-container {
    font-size: 24px;
    line-height: 2.1;
    min-height: 360px;
  }
  .ayah {
    display: block;          /* Forces new line for each ayah */
    margin: 12px 0;          /* Adds comfortable vertical spacing */
    text-align: center;      /* Keeps centered look */
  }

  .ayah .badge {
    margin-inline-start: 6px;
    margin-inline-end: 4px;
  }
}


