:root > * {
  --md-primary-fg-color: #3d8b3f;
  --md-primary-fg-color--light: #3d8b3f;
  --md-primary-fg-color--dark: #3d8b3f;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.3rem;
}

.md-header__topic {
  display: none;
}

.md-footer-meta__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

/* Prevents .md-footer-links from wrapping under copyright */
.md-footer-links {
  color: #b8b9ba;
  font-size: 0.64rem;
  margin-left: auto;
  white-space: nowrap; /* Keeps links in a single line */
}

.center-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.md-typeset .mondsichel-karten {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.md-typeset .mondsichel-karten figure {
  flex: 1 1 320px;
}
.md-typeset .mondsichel-karten figure,
.md-typeset .mondsichel-karten figure > p {
  margin: 0;
}
.md-typeset .mondsichel-karten img {
  width: 100%;
  height: auto;
}

/* WhatsApp button styling */
.md-header__whatsapp {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.25s;
  height: 100%;
}

.md-header__whatsapp:hover {
  color: #c7ddc6;
}

.md-header__whatsapp-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0.2rem 0.1rem; /* Reduced horizontal padding */
}

.md-header__whatsapp-icon {
  display: flex;
  width: 1.2rem;
  height: 1.2rem;
  margin-bottom: 0.1rem;
}

.md-header__whatsapp-icon svg {
  fill: currentColor;
  width: 100%;
  height: 100%;
}

.md-header__whatsapp-text {
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

@media screen and (max-width: 76.1875em) {
  .md-footer-meta__inner {
    flex-direction: column;
    /* align-items: center; */
    text-align: center;
  }

  .md-footer-links {
    margin-left: 0;
    padding-bottom: 0.2rem;
  }

  .md-copyright {
    margin: 0 !important;
  }

  /* WhatsApp button styling for mobile */
  .md-header__whatsapp {
    margin-right: 0.3rem;
  }

  .md-header__whatsapp-icon {
    width: 1rem;
    height: 1rem;
  }

  .md-header__whatsapp-text {
    font-size: 0.5rem;
  }

  /* Hide the title on mobile */
  .md-nav--primary .md-nav__title {
    height: 3.4rem !important;
  }

  .md-nav--primary .md-nav__title .md-logo {
    margin: 0 !important;
  }

  /*
   * Show the logo on mobile and hide the site title
   */

  /*
   * Make the logo visible on mobile.
   * The logo is a link with the .md-header__button class,
   * so we make it a block-level element to ensure it's rendered.
   */
  .md-header__button.md-logo {
    display: block;
    /* Remove a little space between the menu icon and the logo */
    margin-left: -0.3rem;
  }
}

@media screen and (max-width: 400px) {
  /*
   * Hide the site title, which is normally displayed
   * in place of the logo on mobile.
   */
  .md-header__title {
    display: none;
  }
}

/* === Hadith / Qurʾan typography === */
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/amiri-400.woff2") format("woff2");
}

/* Arabic font stack defined once, reused in several places */
:root {
  --font-arabic: "Amiri", serif;
}

/* Arabic wording inside a quote admonition (!!! quote arabic) */
.md-typeset .admonition.arabic > p:not(.admonition-title),
.md-typeset details.arabic > p:not(.admonition-title) {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  /* relative to the quote text: only slightly larger for Arabic legibility */
  font-size: 1.1em;
  line-height: 1.9;
}

/* Qurʾan verse: gold ornamentation (Mushaf style), neutral verse text, gold ﴿ ﴾ and dividers */
.quran-ayah {
  --ayah-gold: #b08a2e;
  margin: 1.5rem 0;
  text-align: center;
}

[data-md-color-scheme="slate"] .quran-ayah {
  --ayah-gold: #d9bb63;
}

/* short, centered divider lines (85% width) in gold */
.quran-ayah::before,
.quran-ayah::after {
  content: "";
  display: block;
  width: 85%;
  height: 1px;
  background: var(--ayah-gold);
  opacity: 0.55;
}

.quran-ayah::before {
  margin: 0 auto 1rem;
}

.quran-ayah::after {
  margin: 0.9rem auto 0;
}

.quran-ayah .ayah-ar {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--md-default-fg-color);
  margin: 0 0 0.7rem;
}

/* the ﴿ ﴾ ornaments in gold */
.quran-ayah .ayah-orn {
  color: var(--ayah-gold);
}

.quran-ayah .ayah-de {
  margin: 0 auto 0.5rem;
  max-width: 34rem;
  font-style: italic;
  line-height: 1.6;
}

.quran-ayah .ayah-ref {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}
