/* Schriftarten einbinden */
@font-face {
    font-family: "KuranFont";
    src: url("../fonts/shaik.ttf") format('truetype');
}
@font-face {
    font-family: "comic";
    src: url("../fonts/comic-sans.ttf") format('truetype');
}
@font-face {
    font-family: "amiri";
    src: url("../fonts/Amiri.ttf") format('truetype');
}

/* ========== CSS-Variablen für dein Farbschema ========== */
:root {
  --bs-primary:   #0d6efd;
  --bs-secondary: #6c757d;
  --bs-dark:      #212529;
  --bs-light:     #f8f9fa;
  --bs-accent:    #d9534f;
  --page: #fdf7e4;
}

/* ========== Globales Reset & Basis ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ========== Utility-Klassen ========== */
.mat-0  { margin-top:    0.23rem; }
.mt-1  { margin-top:    0.25rem; }
.mt-2  { margin-top:    0.5rem;  }
.mt-3  { margin-top:    1rem;    }
.mt-4  { margin-top:    1.5rem;  }
.mab-0  { margin-bottom: 0.22rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem;  }
.mb-3  { margin-bottom: 1rem;    }
.mb-4  { margin-bottom: 1.5rem;  }

/* margin-left */
.ml-1 { margin-left:  0.25rem !important; }
.ml-2 { margin-left:  0.5rem  !important; }
.ml-3 { margin-left:  1rem    !important; }
.ml-4 { margin-left:  1.5rem  !important; }

/* margin-right */
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem  !important; }
.mr-3 { margin-right: 1rem    !important; }
.mr-4 { margin-right: 1.5rem  !important; }

/* margin-left + margin-right */
.mx-0 { margin-left:  0.15rem !important; margin-right: 0.15rem !important; }
.mx-1 { margin-left:  0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left:  0.5rem  !important; margin-right: 0.5rem  !important; }
.mx-3 { margin-left:  1rem    !important; margin-right: 1rem    !important; }
.mx-4 { margin-left:  1.5rem  !important; margin-right: 1.5rem  !important; }

/* Padding – alle Richtungen */

/* Padding rundum */
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem  !important; }
.p-3 { padding: 1rem    !important; }
.p-4 { padding: 1.5rem  !important; }

/* Padding vertikal (top & bottom) */
.py-1 { padding-top:    0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top:    0.5rem  !important; padding-bottom: 0.5rem  !important; }
.py-3 { padding-top:    1rem    !important; padding-bottom: 1rem    !important; }
.py-4 { padding-top:    1.5rem  !important; padding-bottom: 1.5rem  !important; }

/* Padding horizontal (left & right) */
.px-1 { padding-left:   0.25rem !important; padding-right:  0.25rem !important; }
.px-2 { padding-left:   0.5rem  !important; padding-right:  0.5rem  !important; }
.px-2-5 { padding-left:   0.85rem  !important; padding-right:  0.85rem  !important; }
.px-3 { padding-left:   1rem    !important; padding-right:  1rem    !important; }
.px-4 { padding-left:   1.5rem  !important; padding-right:  1.5rem  !important; }

/* Padding oben */
.pt-1 { padding-top:    0.25rem !important; }
.pt-2 { padding-top:    0.5rem  !important; }
.pt-3 { padding-top:    1rem    !important; }
.pt-4 { padding-top:    1.5rem  !important; }

/* Padding unten */
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem  !important; }
.pb-3 { padding-bottom: 1rem    !important; }
.pb-4 { padding-bottom: 1.5rem  !important; }

/* Padding links */
.pl-1 { padding-left:   0.25rem !important; }
.pl-2 { padding-left:   0.5rem  !important; }
.pl-3 { padding-left:   1rem    !important; }
.pl-4 { padding-left:   1.5rem  !important; }

/* Padding rechts */
.pr-1 { padding-right:  0.25rem !important; }
.pr-2 { padding-right:  0.5rem  !important; }
.pr-3 { padding-right:  1rem    !important; }
.pr-4 { padding-right:  1.5rem  !important; }

/* Body-Hintergrund */
body {
    background: rgba(10, 10, 10, 0.99);
    background-image: url("../images/hatsanat2.png");
    background-repeat: repeat;
    font-family: 'Inter', sans-serif;
}

.header-container {
          position: relative;
          padding-top: 1rem;
          text-align: center;
          padding-left: 1rem;
          background: rgba(0, 0, 0, 0.3);
        }
.header-content-row {
  position: relative;
  display: inline-block;
}
.language-switch {
  position: absolute;
  top: 50%;
  left: -12px;
  transform: translate(-100%, -50%);
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  padding: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  overflow: hidden;
}
.language-switch select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
}
.language-switch::before {
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255,255,255,0.3);
}
.language-switch.flag-tr::before {
  background-image: url('../images/icons8-turkey-48.png');
}
.language-switch.flag-de::before {
  background-image: url('../images/icons8-germany-48.png');
}
.language-switch.flag-en::before {
  background-image: url('../images/icons8-great-britain-48.png');
}
.language-switch.flag-fr::before {
  background-image: url('../images/icons8-frankreich-rundschreiben-48.png');
}
.language-switch.flag-es::before {
  background-image: url('../images/icons8-spain-48.png');
}
.language-switch.flag-it::before {
  background-image: url('../images/icons8-italien-rundschreiben-48.png');
}
.language-switch.flag-pt::before {
  background-image: url('../images/icons8-portugal-rundschreiben-48.png');
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
        .custom-title {
          margin: 0;
          font-family: 'amiri', serif;
          font-size: clamp(1.8rem, 4vw, 3.8rem);
          color: #dca56c;
          letter-spacing: clamp(0.06em, 0.8vw, 0.16em);
          text-transform: uppercase;
          white-space: nowrap;
          line-height: 1.1;
        }

/* Rahmen und Glüheffekt um Titelbereich */

/* Header-Schriftart und Effekte */
header {
    font-family: "comic", sans-serif;
    color: #d9534f;
    text-shadow: 0 0 1em #d9534f, 0 0 5em white, 0 0 10em white;
}

header.p-1 {
  width: 100% !important;
  text-align: center !important;
}

/* Horizontale Linie mit weniger Abstand */
hr {
    margin-top: 0.7rem;
    margin-bottom: 0.7rem;
}

/* ========== Sticky Footer & Grund-Layout ========== */
/* HTML und Body auf volle Höhe setzen */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}
/* Body als Flex-Container, damit Footer unten bleibt */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Hauptbereich (alles zwischen Header und Footer) soll flexibel wachsen */
main {
  flex: 1 0 auto; /* Nimmt verbleibenden Platz ein */
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Footer nicht fixieren, sondern ans Ende des Flex-Containers schieben */
footer.bottom-nav,
footer {
    flex-shrink: 0;
    background: whitesmoke;
    display: flex;
    justify-content: space-around;
    border-radius: 10px 10px 0 0;
    align-items: center;
    width: 100%;
    margin: 1.5rem auto 0;
}

/* active-Mode Highlight */
.active-mode {
  border: 3px solid var(--bs-accent) !important;
  color: var(--bs-dark)      !important;  /* dunkler Text */

}

.line{
  height: 0.2rem;
  border-radius: 999px;
  background: #c19b4a;
  opacity: 0.8;
  margin: 1.5rem auto 1rem;
  width: 100%;
}

/* Scroll-to-Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 40px;
    right: 20px;
    background-color: #d9534f;
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    display: none; /* Start hidden */
    transition: opacity 0.4s ease;
    transition: bottom 0.6s ease-in-out;
    opacity: 0.3;
    z-index: 999;
}
#scrollToTopBtn:hover {
    background-color: #c0392b;
}

/* Hauptanzeigebereich */
.bgnew {
  position: relative;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  background: var(--page);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  margin-top: -2rem;
}


/* Bismillah-Block */
.bismillah {
    padding-bottom: 5px;
}

/* Navigationsleiste */
.navbar {
    text-align: center;
    display: flex;
    justify-content: center;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
}

/* Flex-Utility */
.flex,
.nav-item {
    display: inline-flex;
}
.img-fluid{
    width: 100%;
    max-width: 1200px;
    min-width: 290px;
    height: auto;
    padding:1% 4%;
  }
.line{margin-top:2rem;}

/* Button-Styling */
.btn-outline-success {
    color: #d9534f;
    border-color: #d9534f;
    background-color: transparent;
    transition: all 0.2s ease;
}

.btn-outline-success:hover,
.btn-outline-success:active,
.btn-outline-success:focus,
.btn-outline-success.active {
    color: white;
    background-color: #d9534f;
    border-color: #d9534f;
    outline: none;
}


/* Koran-Textblöcke */
.left {
    font-size: 2rem;
    line-height: 2.5rem;
    padding-bottom: 0.5rem;
    text-align: left;
}

.right {
  font-size: 3.2rem;
  font-family: "KuranFont";
  line-height: 6rem;
  letter-spacing: 0.1px;
  word-spacing: 2px;
  direction: rtl;
  text-align: right;
}
.translation{
font-size:2rem;
line-height:3rem;
direction: ltr;
}


/* Toolbar mit Pfeilen und Schnell-Aktionen */
.nav-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    float: none !important; /* override Bootstrap col-md float so the bar can stay centered */
}

.is-touch .nav-toolbar {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.6rem;
}

.is-touch .nav-toolbar .arrow {
    display: none;
}

@media (pointer: coarse) {
  .nav-toolbar {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.6rem;
  }
  .nav-toolbar .arrow {
    display: none;
  }
  .zoom-slider-inline {
    display: none !important;
  }
  #cookset {
    margin-left: 0;
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  .nav-toolbar {
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-left: auto;
    margin-right: auto;
  }
  .nav-toolbar .arrow {
    order: 1;
    width: 100%;
    justify-content: center;
  }
  .zoom-slider-inline {
    order: 2;
    width: 100%;
    justify-content: center;
  }
  #cookset {
    order: 3;
    margin-left: 0;
    justify-content: center;
  }
}

/* Navigationsleiste */
.arrow {
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.zoom-slider-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.01);
    box-shadow: 0 2px 6px rgba(0,0,0,0.01);
    color: #222;
    flex: 0 1 auto;
}

.zoom-slider-inline input[type="range"] {
    flex: 1 1 60px;
    min-width: 40px;
    max-width: 70px;
    accent-color: #d9534f;
    cursor: pointer;
    width: 70px;
}

.zoom-icon-btn {
    border: none;
    background: #fff;
    color: #d9534f;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.zoom-icon-btn:focus-visible {
    outline: 2px solid #d9534f;
    outline-offset: 2px;
}

.zoom-icon-btn:hover {
    transform: translateY(-1px);
}

.zoom-icon-btn:active {
    transform: translateY(0);
}

.is-touch #zoomSliderWrapper {
    display: none !important;
}

@media (hover: none) and (pointer: coarse) {
  #zoomSliderWrapper {
    display: none !important;
  }
}

/* 1) Mach aus Deinem #navAyet / #navSayfa Span einen Flex-Container */
#navAyet, #navSayfa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem; /* Abstand zwischen Icon, Text und Icon */
}

@media (max-width: 640px) {
  .nav-toolbar {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.6rem;
  }
  .nav-toolbar .arrow {
    display: none !important;
  }
  .zoom-slider-inline {
    width: 100%;
    justify-content: center;
  }
  #cookset {
    margin-left: 0;
    justify-content: center;
  }
}

/* 2) Einheitliche Schrift-/Icon-Größen und Line-Height */
#navAyet .left_arrow,
#navSayfa .left_arrow_1,
#navAyet .right_arrow,
#navSayfa .right_arrow_1 {

  line-height: 1;
}

/* 3) Text ebenfalls mittig */
#navAyet span.left_arrow,
#navSayfa span.left_arrow_1 {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

.left_arrow,
.right_arrow,
.left_arrow_1,
.right_arrow_1,
#toggleSearchIcon{
    color: whitesmoke;
    font-size: 1.4rem;
    padding: 0 2px;
    cursor: pointer;
}

/* Hinweisbox "Gespeichert" */
#saved {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 12000;
  pointer-events: none;
  width: min(90vw, 360px);
}

#saved .saved-content {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(12, 29, 43, 0.92), rgba(36, 73, 102, 0.95));
  box-shadow: 0 25px 60px rgba(7, 13, 19, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f9f5ea;
  backdrop-filter: blur(6px);
}

#saved .saved-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #f5c56a;
  flex-shrink: 0;
}

#saved .saved-text {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
}

/* 1) Basis-Style versteckt */
#cookset input#searchInput.form-control {
  display: none !important;        /* ausgeblendet per Default */
  width: clamp(60px, 10vw, 160px) !important;
  min-width: 60px;
  max-width: 100%;/* gleiche Breite wie Cüz-Input */
  padding: 0.15rem !important;
  text-align: center !important;
  border-radius: 4px !important;
  opacity: 0;
  transition: opacity 0.2s ease !important;
}

/* 2) Sobald .visible dazukommt, einblenden */
#cookset input#searchInput.form-control.visible {
  display: inline-block !important;
  opacity: 1 !important;
}

.search-results {
  position: fixed;
  top: 110px;
  right: 1rem;
  width: min(420px, calc(100% - 2rem));
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(13, 20, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  padding: 0.75rem 0.75rem 0.5rem;
  display: none;
  z-index: 2500;
  color: #f5f5f5;
}

.search-results.visible {
  display: block;
}

.search-results__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.search-results__count {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
}

.search-results__close {
  border: none;
  background: transparent;
  color: #f5f5f5;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}

.search-result-item {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.search-result-item:hover,
.search-result-item:focus-within {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.search-result-item__meta {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.search-result-item__text {
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  color: #fdfdfd;
}

.search-result-item__lang {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}

.search-results__empty {
  font-size: 0.9rem;
  opacity: 0.85;
  padding: 0.25rem 0;
}

@media (max-width: 768px) {
  .search-results {
    top: 160px;
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translate(-50%, -60%); }
  10%  { opacity: 1; transform: translate(-50%, -50%); }
  90%  { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}

/* Steuer-Icons oben rechts */
#osx,
#addBookmark,
#toggleThemeIcon,
#toggleOrnaIcon,
#toggleSetupIcon,
#toggleBookmarksIcon {
  color: whitesmoke;
  font-size: 1.6rem;
  padding-left: 0.2rem;
  cursor: pointer;
}

/* Container für Bookmark-Symbole */
#cookset {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;         /* Abstand zwischen den Elementen */
    margin-left: auto;
}

.is-touch #cookset {
  margin-left: 0;
  justify-content: center;
}

/* override Bootstrap .form-control so dein Cüz-Input nicht 100% breit wird */
#cookset .form-control {
  display: inline-block !important;
  width: auto !important;
  min-width: 20px;
  max-width: 30px;
  padding: 0.05rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom:0.5rem;
}



@media (max-width: 900px) {
  #cookset {
    flex-wrap: wrap;
    justify-content: center;
  }
  #zoomSliderWrapper {
    order: 99;
    justify-content: center;
    margin-top: 0.4rem;
  }
}




/* Schließen-Symbol */
#closeBookmarks:hover {
  color: whitesmoke;
}

#closeBookmarks {
  color: whitesmoke;
  position: relative;            /* für absolutes Positionieren des Buttons */
    display: flex;
    align-items: center;           /* vertikal zentrieren */
    justify-content: right;       /* Inhalt (Text) horizontal zentrieren */
    padding: 0.4rem 1rem;          /* Höhe verkleinern */
    max-width: 300px;              /* bei Bedarf Breite einschränken */
    margin: 0.3rem auto;
}

/* 1) Den Bookmark-Eintrag als Flex-Container mittig ausrichten */
#bookmarkList .list-group-item {
  position: relative;            /* für absolutes Positionieren des Buttons */
  display: flex;
  align-items: center;           /* vertikal zentrieren */
  justify-content: center;       /* Inhalt (Text) horizontal zentrieren */
  padding: 0.5rem 1rem;          /* Höhe verkleinern */
  max-width: 300px;              /* bei Bedarf Breite einschränken */
  margin: 0.3rem auto;           /* Abstand und zentrieren im Parent */
}


/* Justified Text */
#just {
  text-align: justify;
}


/* Innenabstände */
.p-0-5 {
  padding: 0 0 1.5rem;
}
.p-0-6 {
  padding-bottom: 2rem;
}

.nrbg3 {
  display: inline;
  vertical-align: middle;
  padding: 0.7rem;
  background-image: url(../images/vahid_1.png);
  background-repeat: no-repeat;
  background-position: center;
  font-family: 'amiri', serif;

  /* Icon-Box etwas größer machen */
  width: clamp(2.5em, 6vw, 4.5em);
  height: clamp(2.5em, 6vw, 4.5em);

  /* Zahlproportion zur Box */
  font-size: clamp(0.5rem, 3vw, 2.5rem);
  line-height: 1;
  background-size: 85% auto;  /* Icon skaliert auf 80% der Box-Breite */
  margin: 0 0.3rem;
  color: white;
  align-items: center;
  justify-content: center;
}

.inline-symbol {
  width: 1em;
  height: auto;
  vertical-align: middle;
}

/* Trennerlinie */


/* Aktiver Zustand für Bootstrap Buttons */
.btn-outline-success.active,
.btn-outline-success.active:focus,
.btn-outline-success.active:hover,
.btn-outline-success.focus:active,
.btn-outline-success:active:focus,
.btn-outline-success:active:hover,
.open > .btn-outline-success.dropdown-toggle.focus,
.open > .btn-outline-success.dropdown-toggle:focus,
.open > .btn-outline-success.dropdown-toggle:hover {
  color: white;
  background-color: #d9534f;
  border-color: #d9534f;
  outline-color: transparent;
}


/* Visuell abgerundete Box mit Leuchteffekt */
.rounded {
  padding: 1.3rem;
  box-shadow: 0 0 1em white, 0 0 1em white, 0 0 1em white;
}

/* Arabischer Text rechtsbündig & Blocksatz */
.arabic-text {
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
}

/* Surenname */
.surename {
  font-family: 'KuranFont', serif;
  font-size: 2.5rem;
  color: #d9534f;
  text-align: center;
  line-height: 2rem;
}

/* Bismillah-Text */
.bismillah {
  font-family: 'KuranFont', serif;
  font-size: 2rem;
  text-align: center;
}

/* Seitenzähler */
.sayfa {
  font-weight: bold;
}

/* Hervorhebungen im Text */
.red-word{color: #d9534f;}
.
/*.red-top-mark{top: -0.10em;}*/
/*.red-top-mark { transform: translateY(0.25em); }*/
/*.red-top-meddeh { column-span: all; top: -0.3em; color: #d9534f !important;}*/
/*.red-bottom-mark { transform: translateY(0em); }*/


#cuez::placeholder {
  color: #000;
  opacity: 0.7;
}



/* Shake-Effekt bei falschem Swipe */
@keyframes softShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-1px); }
  40% { transform: translateX(1px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: softShake 0.1s ease;
}

/* Lesezeichenbereich */
#bookmarkList {
  transform-origin: top center;
  margin-bottom: 1rem;
}

/* Inhalt-Sektion mit Transition für Swipe */
.bgnew {
    transition: transform 0.2s ease, opacity 0.2s ease;
    overflow-y: auto;     /* sorgt dafür, dass gescrollt wird */
    touch-action: pan-y;   /* erlaubt vertikales Panning, sperrt horizontales & Pinch */
    padding-top: 2rem;
  padding-bottom: 2rem;
}

#cuzInput.form-control {
  width: clamp(30px, 15vw, 65px) !important;
  max-width: 65px;
  text-align:center;
  padding:0.2rem;
}

/* Vertikale Cüz-Anzeige */
#vertical-cuez {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #c19b4a;
  border-radius: 9px;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  direction: ltr;
}

#vertical-sure {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 0.35rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #c19b4a;
  border-radius: 9px;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  direction: ltr;
}

body.no-mushaf #vertical-cuez,
body.no-mushaf #vertical-sure {
  background: rgba(217, 83, 79, 0.8);
  border: none;
  color: #fff;
}

body.no-arabic .bgnew .right,
body.no-arabic .bgnew .bismillah {
  display: none !important;
}

body.no-arabic .bgnew > .nrbg3 {
  display: none !important;
}

body.no-arabic .translation .nrbg3 {
  display: inline-flex !important;
}


.surah-title {
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;

  /* KEIN extra linkes/rechtes padding –
     sondern nur oben/unten für Abstand */
  padding: 1.5em 0;
  margin: 0.5em 0;

  border: 2px solid #d9534f;
  border-radius: 8px;
  background: rgba(255,255,255,0.8);

  font-size: 1.25rem;
  color: #d9534f;
  font-family: 'KuranFont', serif;

  /* Die beiden Halbbilder als Hintergründe: */
  background-image:
    url('../images/orna1_links.png'),
    url('../images/orna1_rechts.png');
  background-repeat: no-repeat, no-repeat;
  background-position:
    left center,
    right center;
  background-size:
    auto 100%,   /* volle Höhe, Breite automatisch */
    auto 100%;
}

@media (max-width: 600px) {
  #vertical-cuez {
    font-size: 0.9rem;
    padding: 3px 3px;
  }
  #vertical-sure {
      font-size: 0.9rem;
      padding: 3px 3px;
    }
}

.nav-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}


/* ========== Responsive Meta-Overrides ========== */
/* Wenn du im <head> noch shrink-to-fit hattest, sorgt Bootstrap 5+ für proper scaling.
   Hier nur ergänzend, falls nötig: */
@media (max-width: 768px) {
  /* Beispiel: Hero-Header-Padding o.ä. */
  header {
    padding-top: 1rem;
  }
}

@media (orientation: landscape) {
  #controls {
    gap: 1rem;               /* mehr Abstand in Quer */
  }
  #controls .form-select,
  #controls .form-control {
    min-width: 140px;        /* etwas breiter */
  }
  footer .nav-icon {
    width: 36px;             /* evtl. Icons etwas kleiner */
    height: auto;
  }

   .nrbg3 {
        /* hier z.B. max‐Font‐Size auf 1.2rem begrenzen */
         font-size: clamp(0.4rem, 2.0vw, 1rem);
   }
   .surename {
       font-size: 3rem;
     }

}


/* 1) Definiere die Puls-Animation */
@keyframes pulse-glow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217,83,79, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 10px 6px rgba(217,83,79, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217,83,79, 0.0);
  }
}

/* 2) Wende sie auf dein Icon an */
.highlight-icon {
  display: inline-block;           /* falls es ein <img> ist */
  animation: pulse-glow 2s ease-in-out infinite;
  border-radius: 50%;              /* rund, falls gewünscht */
  cursor: pointer;                 /* optional */
}

/* Optional: Hover-State noch stärker betonen */
.highlight-icon:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px 8px rgba(217,83,79, 0.6);
}

/* Wenn es ein <img> ist, stell‘s so sicher in der Zeile dar */
.highlight-icon img {
  width: 2.5em;
  height: auto;
  vertical-align: middle;
}

.cuez,
  .sayfa
  {
      font-size: 1.2rem;
      margin-bottom: -2rem;
    }

 /* Wrapper für alle Controls */
 #controls {
   display: flex;
   justify-content: center;
   gap: 0.5rem;
   flex-wrap: nowrap;               /* kein Umbruch */
   padding: 0rem 0;
   max-width: 100%;
   margin: 0 auto;
   overflow-x: auto;                /* Falls sehr eng, scrollbar */
 }

 #controls > * {
   flex: 1 1 auto;
   text-align: center;
   width: auto !important;
   min-width: 90px !important;
   max-width: 180px !important;
   padding: 0.2rem 0.2rem !important;
   white-space: nowrap;
   font-size: clamp(0.95rem, 1.3vw, 1.2rem); /* Dynamisch skalierbar */
 }

 #ayetno.form-control,
 #cuez.form-control {
   padding: 0.05rem 0.1rem !important; /* sehr kleines vertikales & horizontales Padding */
 }

/* Footer */
.app-footer {
  position: relative;
  width: 100%;
  margin-top: 2rem;
  padding: 4rem 0.5rem 0rem;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 -25px 45px rgba(20,20,20,0.3);
  overflow: hidden;
}

.app-footer .footer-wave {
  position: absolute;
  top: -120px;
  left: 0;
  width: 100%;
  height: 180px;
  background: #fff;
  box-shadow: 0 35px 60px rgba(20,20,20,0.3);
}

.app-footer .footer-inner {
  position: relative;
  margin: 0 auto;
  text-align: center;
}

#footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0;
  margin-top: -3.5rem;
}

#footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#footer-nav img.nav-icon {
  width: 48px;
  height: auto;
  margin: 0 0.5rem;
}

.app-footer .footer-meta {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: whitesmoke;
}

@media (min-width: 290px) and (max-width: 768px) {
.btn-group > .btn:first-child{
	margin-bottom:3px;
}
	.bgnew{padding: 1rem 1rem;}
}

/* Smartphones (290px–512px) */
@media (min-width: 290px) and (max-width: 512px) {
  .btn-group > .btn:first-child {
    margin-bottom: 3px;
  }
  .mushaf-page{
    padding: 1rem 0.5rem;
  }

     .footer-apps__title {
          margin-top: 2rem;
        }

  .language-switch {
  left: -10px;
  }
    #controls > * {
       flex: 0 0 auto;
       text-align: center;
       width: auto !important;
       min-width: 0 !important;
       max-width: none !important;
       padding: 0.1rem 0.2rem !important;
       white-space: nowrap;
       font-size: 0.85rem;
     }
  .bgnew {
    padding: 1rem;
  }
  #cuzInput.form-control {
    width: 55px !important;
    padding:0.1rem;
  }
  #footer-nav img.nav-icon {
    width: 36px;
    gap: 1rem;
    margin: 0;
    }
  .p-0-5 {
    padding-bottom: 3.2rem;
  }
  .left {
    font-size: 1.2rem;
    line-height: 1.5rem;
  }
  .right {
    font-size: 1.8rem;
    line-height: 3.8rem;
  }
  .surename {
    font-size: 1.8rem;
    line-height: 2rem;
  }
  .line{margin-top:1rem;}
  .kuran-text{font-size:30px;}
  .cuez,
  .sayfa
  {
      font-size: 0.7rem;
    }
  #osx,
  #addBookmark,
   #toggleBookmarksIcon {
    font-size: 1.3rem;
  }
  #cookset {
    margin-left: 0;
    justify-content: center;
  }
  .red-top-mark{top: -0.27em;}

  .left_arrow,
  .right_arrow,
  .left_arrow_1,
  .right_arrow_1,
   #toggleSearchIcon{
    font-size: 1.2rem;
  }
  #cookset input#searchInput.form-control {
    width: clamp(100px, 10vw, 120px) !important;
  }
  .klein{font-size: 1.1rem;}
  .nrbg3 {

           font-size: clamp(0.6rem, 2.0vw, 1.1rem);
     }
     .surah-title {
        padding: 0.5rem 0;
     }
     .translation{
     font-size:1.1rem;
     line-height:1.7rem;
     }
}

/* Kleine Tablets (513px–768px) */
@media (min-width: 513px) and (max-width: 768px) {
  .p-0-5 {
    padding-bottom: 3.2rem;
  }
  .left {
    font-size: 1.4rem;
    line-height: 1.8rem;
  }
  .right {
    font-size: 1.9rem;
    line-height: 3.8rem;
  }
  .surename {
    font-size: 2.5rem;
    line-height: 3rem;
  }
  .nrbg3 {

           font-size: clamp(0.4rem, 2.0vw, 1rem);
     }

}

/* Tablets/Laptops (769px–1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .left {
    font-size: 2.9rem;
    line-height: 4.5rem;
  }
  .translation{
  font-size: 1.5rem;
      line-height: 2.5rem;
  }
  .right {
    font-size: 2.7rem;
    line-height: 5.5rem;
  }
  .surename {
    font-size: 2.7rem;
    line-height: 3rem;
  }
.red-top-mark{top: -0.30em;}

  .bgnew {
    padding: 1rem 1.5rem;
  }
  .nrbg3 {
           font-size: clamp(0.4rem, 2.0vw, 1.3rem);
     }
   .cuez,
     .sayfa
     {
         font-size: 1rem;
       }
       .line{margin-top:1rem;}
       .surah-title {
               padding: 0.7rem 0;
            }


}



/* Default: orna1 */
/*body.unca-orna1 .surah-title {
  background-image:
    url('../images/orna1_links.png'),
    url('../images/orna1_rechts.png');
}*/

/* Alternativ: orna2 */
/*body.unca-orna2 .surah-title {
  background-image:
    url('../images/orna2_links.png'),
    url('../images/orna2_rechts.png');
}*/

/* ==============================
   Dark Theme Overrides
   ============================== */
body.dark-theme {
  /* Seiten-Hintergrund */
  background: rgba(30, 30, 30, 1) !important;
  background-image: url("../images/hatsanat2.png") !important;
      background-repeat: repeat;
}

html body.dark-theme .bgnew {
  background: rgba(50, 50, 50, 0.99) !important;
  background-image: none     !important;
  color:white !important;
}
html body.dark-theme .nrbg3 {
  background-image: url(../images/vahid_2.png);
  }

html body.dark-theme .surah-title {
    background-image: url('../images/orna2_links.png'),
                          url('../images/orna2_rechts.png');
    }

 html body.dark-theme #swipeIndicator, #zoomIndicator{
          background: rgba(255,255,255,0.9) !important;
          color: #000 !important;
    }



.theme-switcher {
  position: relative;
  display: inline-block;
}

#openThemeMenu {
  font-size: 1.4rem;
  padding: 0.2rem;
  cursor: pointer;
  color: #fff;
}

.theme-menu {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  background: #fff;
  border-radius: 6px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10000;
}

.theme-menu .theme-button {
  width: 30px;
  height: 30px;
  margin: 5px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ccc;
  transition: transform 0.2s ease;
}

.theme-menu .theme-button:hover {
  transform: scale(1.1);
  border-color: #000;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #222;
}

.theme-option .justify-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  color: #333;
  cursor: pointer;
}

.theme-option .justify-toggle-icon .fa {
  font-size: 1.1rem;
}

.theme-option input[type="checkbox"] {
  accent-color: #c19b4a;
  width: 1rem;
  height: 1rem;
}


/* 1. Ganzes Fenster abdunkeln */
.tour-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  pointer-events: none;
}

/* 2. Ziel-Element hervorheben */
.tour-highlight {
  position: absolute;
  border: 3px solid #1abc9c;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.65), 0 0 18px rgba(26, 188, 156, 0.55);
  z-index: 10001;
  pointer-events: none;
}

/* 3. Tooltip-Box */
.tour-tooltip {
  position: absolute;
  width: clamp(240px, 80%, 400px);
  background: #fff;
  color: #333;
  padding: clamp(0.6rem, 2vw, 1rem);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 10002;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.4;
  text-align: center;
}


.tour-controls {
  position: absolute;
  /* unten: immer 1rem über der System-Nav/Notch */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
    right: 10%;
  display: flex;
  gap: 0.5rem;
  z-index: 10003;
}

/* Für ältere iOS-WebViews zusätzlich: */
@supports (bottom: constant(safe-area-inset-bottom)) {
  .tour-controls {
    bottom: calc(constant(safe-area-inset-bottom) + 1rem);
  }
}
.tour-controls button {
  background: #1abc9c;
  border: 1px solid rgba(26, 188, 156, 0.65);
  padding: clamp(0.4rem, 1.5vw, 0.8rem) clamp(0.6rem, 2vw, 1rem);
 font-size: clamp(0.9rem, 2vw, 1rem);
  cursor: pointer;
  border-radius: 8px;
  color: #06211b;
  box-shadow: 0 8px 18px rgba(26, 188, 156, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.tour-controls button:hover,
.tour-controls button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(26, 188, 156, 0.35);
}

.tour-controls button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: rgba(26, 188, 156, 0.35);
  color: #0f2f2a;
  border-color: rgba(26, 188, 156, 0.4);
}

/* ---------- Tour Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 35, 30, 0.92);
  backdrop-filter: blur(6px);
  z-index: 20000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease;
  touch-action: none;
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-box {
  width: min(420px, 100%);
  background: #0d2f2a;
  color: #e4fff7;
  padding: 1.5rem;
  border-radius: 18px;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(26, 188, 156, 0.4);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-overlay.is-visible .modal-box {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  background: #1abc9c;
  color: #06211b;
  box-shadow: 0 8px 24px rgba(26, 188, 156, 0.35);
  font-size: 1.3rem;
}

.modal-body {
  text-align: left;
}

.modal-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: rgba(228, 255, 247, 0.72);
}

.modal-message {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #e4fff7;
}

.modal-buttons {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-btn {
  flex: 1 1 120px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.modal-btn--primary {
  background: #1abc9c;
  color: #06211b;
  box-shadow: 0 10px 25px rgba(26, 188, 156, 0.35);
}

.modal-btn--primary:hover,
.modal-btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 188, 156, 0.45);
}

.modal-btn--ghost {
  background: rgba(26, 188, 156, 0.08);
  color: #e4fff7;
  border-color: rgba(26, 188, 156, 0.6);
}

.modal-btn--ghost:hover,
.modal-btn--ghost:focus-visible {
  transform: translateY(-2px);
  background: rgba(26, 188, 156, 0.14);
  border-color: rgba(26, 188, 156, 0.75);
}

body.modal-open {
  overflow: hidden;
}

@media (pointer: coarse) {
  .modal-box {
    width: min(480px, 100%);
    padding: 1.75rem;
    border-radius: 20px;
  }
  .modal-btn {
    padding: 1rem 1.2rem;
    font-size: 1.05rem;
  }
  .modal-buttons {
    gap: 0.9rem;
  }
  .tour-controls button {
    padding: 0.7rem 1.1rem;
    font-size: 1rem;
  }
}

/* ausgegraut im Free-Mode */
.locked #cookset {
  filter: grayscale(100%) opacity(0.6);
}

/* Der Cursor bleibt ein Pointer, damit man weiß, dass man klicken kann */
.locked #cookset * {
  cursor: pointer;
}

/* ausgegraut im Free-Mode */
body.locked #cuzInput {
  filter: grayscale(100%) opacity(0.6);
  cursor: pointer; /* damit man sieht, dass Klicks abgefangen werden */
}

/* 2.2 Modal-Grundgerüst */
.upgrade-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: none;           /* versteckt */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.upgrade-modal.active {
  display: flex;           /* sichtbar, wenn .active gesetzt */
}
/* halbtransparenter Hintergrund */
/*.upgrade-modal__backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}*/
/* Box in der Mitte */
/*.upgrade-modal__content {
  position: relative;
  background: #fff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 1;
}
.upgrade-modal__content h2 {
  margin-top: 0;
}
.upgrade-modal__content button {
  margin: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 1rem;
}*/

.mushaf-app {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  /*padding: clamp(1.2rem, 4vw, 2.5rem);*/
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 1 0 auto;
}
.mushaf-page {
  position: relative;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  background: var(--page);
  border-radius: 20px;
  border: 8px double #c19b4a;
  padding: 3rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  direction: rtl;
  text-align: justify;
  text-justify: inter-word;
  margin-top: -2rem;
}

body.no-justify .mushaf-page {
  text-align: center;
  text-justify: auto;
}

body.no-justify .bgnew {
  text-align: center;
  text-justify: auto;
}

body.no-mushaf .line {
  background: #d9534f;
}

.translation-hint {
  margin: 0.5rem 0 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: rgba(217, 83, 79, 0.12);
  color: #d9534f;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(217, 83, 79, 0.35);
}

/* Smartphones (290px–512px) */
@media (min-width: 290px) and (max-width: 512px) {
  .mushaf-page{
    padding: 2rem 1rem;
  }
}
