/* al-fatawa.com – single_fatwa.css (v7) – readable source.
   Loaded non-blocking (rel=preload → stylesheet). The rules that paint the first screen are
   duplicated in critical.css and inlined in every page template; keep the two in sync.
   Palette (unchanged): #7D6249 header · #725A43 search bar · #AB9C8E tan ground · #D9D9D9 card ·
   #5A4633 ink · #341910 icon ink · #7F6751 settings panel.
   v7 changes: system font stack (the unused web-font rules removed), contrast fixes (.FatwaScholar, .hadith),
   48px tap targets, real checkbox/radio rows in the settings panel, h1/h2 margins, source block,
   breadcrumb strip, footer nav, search status/load-more, loader.css merged in, trust-page prose. */

body {
    font-family: -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
    direction: rtl;
    background-color: #AB9C8E;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

.VisuallyHidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.BackgroundImage {
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: -1;
    background-image: url("../img/Pattern.svg"), url("../img/Pattern.svg");
    background-repeat: repeat;
    background-position: 0 0, 18vw 18.5vw;
    background-size: 36vw 37vw;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Header: calligraphy logo + aya + search bar */

.TopContainer {
    width: 100%;
}

.TopImageBackground {
    background: #7D6249;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.TopImage {
    margin: 20px 0 5px;
    width: 300px;
    height: auto;
}

.SubImage {
    width: 300px;
    margin-bottom: 20px;
    height: auto;
}

.SearchBarParent {
    background: #725A43;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.SearchBarBody {
    display: flex;
    flex-direction: row-reverse;
    height: 10vw;
    min-height: 48px;
    margin: 3.1vw 0;
    max-height: 60px;
}

.SearchGear {
    width: 14vw;
    background-color: #AB9C8E;
    border-radius: 20px 0 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-radius 0.25s ease-in-out 0.3s, background-color 0.25s ease-in-out 0.3s;
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

.SearchGear.active {
    border-radius: 20px 0 0 0;
    background-color: #7F6751;
    transition: border-radius 0.25s ease-in-out 0s, background-color 0.25s ease-in-out 0s;
}

.GearIcon {
    transition: transform 0.5s ease-in-out;
    width: 30px;
    max-width: 6.5vw;
    height: auto;
}

.SearchGear.active .GearIcon {
    transform: rotate(360deg);
}

.SearchInputArea {
    width: 65vw;
    background-color: #D9D9D9;
    -webkit-appearance: none;
}

.SearchBarInput {
    width: 100%;
    height: 100%;
    background: none;
    outline: none;
    border: none;
    font-size: 3.5vw;
    -webkit-appearance: none;
    -webkit-border-radius: 0;
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease-in-out;
}

.SearchBarInput.disabled {
    background-color: gray;
}

input::-webkit-search-decoration {
    -webkit-appearance: none;
}

.SearchMagnifying {
    width: 14vw;
    background-color: #D9D9D9;
    border-radius: 0 20px 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-radius 0.25s ease-in-out 0.3s, background-color 0.5s ease-in-out;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

.SearchMagnifying.disabled {
    background-color: gray;
}

.SearchMagnifying.active {
    border-radius: 0 20px 0 0;
    transition: border-radius 0.25s ease-in-out 0s, background-color 0.5s ease-in-out;
}

.MagnifyingIcon {
    width: 30px;
    max-width: 6.5vw;
    height: auto;
}

/* Settings panel (slides down under the search bar). Height = clipping window for the animation;
   it grew from 200px because the checkbox/radio rows are now 48px tall. */

.SearchSettings {
    position: absolute;
    top: calc(50% + max(min(5vw, 30px), 24px));
    width: 93vw;
    overflow: hidden;
    height: 280px;
    pointer-events: none;
    visibility: hidden;   /* hidden until opened: the closed panel must never count as a layout shift */
    z-index: 1;
    transition: height 0s ease-in-out 0.75s, visibility 0s linear 0.75s;
}

.SearchSettings.active {
    pointer-events: all;
    visibility: visible;
    transition: height 0s ease-in-out 0s, visibility 0s linear 0s;
}

.SearchSettings.expanded {
    height: 530px;
    transition: height 0s ease-in-out 0s;
}

.InnerSearchSettings {
    background-color: #7F6751;
    width: 100%;
    position: absolute;
    transition: transform 0.5s ease-in-out 0s;
    transform: translate(0, -100%);
    border-radius: 0 0 30px 30px;
}

.InnerSearchSettings.active {
    transform: translate(0, 0);
    transition: transform 0.5s ease-in-out 0.1s;
}

.SettingsBody {
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    justify-content: center;
    height: 100%;
    align-items: center;
}

.AdvancedForm {
    width: 100%;
    transition: height 0.5s;
    height: 0;
    overflow: hidden;
}

.AdvancedForm.open {
    height: 235px;
}

.AdvancedSearchBody {
    width: calc(100% - 80px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 40px;
    margin-bottom: 40px;
}

.AdvancedSearchInput {
    background: #D9D9D9;
    outline: none;
    border: none;
    -webkit-appearance: none;
    -webkit-border-radius: 0;
    margin: 0;
    padding: 0 20px;
    font-size: 3.5vw;
    height: 40px;
    width: calc(100% - 40px);
    border-radius: 50px;
}

.AdvancedButtonSubmit {
    background: #9E8E80;
    font-size: 20px;
    color: #341910;
    font-weight: bold;
    font-family: inherit;
    outline: none;
    border: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 5px 16px;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.AdvancedButtonSubmit .MagnifyingIcon {
    width: 20px;
}

.InnerSettingsBody {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    display: flex;
}

.SettingsScholarBody {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.SettingsTitle {
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    margin-bottom: 15px;
    margin-right: 5px;
}

.SettingsTitle.Scholar {
    padding-left: 25px;
}

.SettingsScholarInputs {
    display: grid;
    grid-template-columns: 95px 95px;
    justify-content: center;
    gap: 0;
}

.SearchModeBody {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.SettingsSearchModeInputs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

/* Scholar checkbox / search-mode radio: one <button role="checkbox|radio"> holds the 16px box and the
   visible label, so the whole 48px-tall row is the tap target and the label names the control. */

.ScholarCheckbox,
.SearchRadio {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    min-width: 48px;
    margin: 0;
    padding: 0 4px;
    background: none;
    border: none;
    outline: none;
    color: white;
    font: inherit;
    font-size: 14px;
    text-align: right;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.CheckBox {
    width: 16px;
    height: 16px;
    background-color: #AB9C8E;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.Check {
    width: 12px;
    height: 12px;
    transform: scale(0);
    transition: transform 0.2s;
}

.ScholarCheckbox.active .Check {
    transform: scale(1);
}

.RadioBox {
    width: 16px;
    height: 16px;
    background-color: #AB9C8E;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.RadioInnerCircle {
    width: 10px;
    height: 10px;
    background-color: #5A4633;
    transform: scale(0);
    transition: transform 0.2s;
    border-radius: 50%;
}

.SearchRadio.active .RadioInnerCircle {
    transform: scale(1);
}

.SettingsLabel {
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.SearchDividerHorizontal {
    background-color: #AB9C8E;
    width: 100%;
    border-radius: 10px;
    height: 2px;
}

.SearchDivider {
    background-color: #AB9C8E;
    width: 2px;
    margin: 3px 0;
    border-radius: 10px;
    align-self: stretch;
}

form {
    margin: 0;
}

/* Keyboard focus (the buttons above use outline:none for the mouse) */

.SearchGear:focus-visible,
.SearchMagnifying:focus-visible,
.AdvancedButtonSubmit:focus-visible,
.FatwaFooterButton:focus-visible,
.DownButton:focus-visible,
.LoadMoreButton:focus-visible {
    outline: 2px solid #341910;
    outline-offset: 2px;
}

.ScholarCheckbox:focus-visible,
.SearchRadio:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: -2px;
}

/* Breadcrumb / page-heading strip above the card */

.PageHeading {
    width: 100%;
    box-sizing: border-box;
    background-color: #D9D9D9;
    margin: 16px 0 0;
    padding: 0 20px;
    color: #5A4633;
    font-size: 14px;
    line-height: 1.6;
}

/* Breadcrumb: a small line inside the card, above the question */
.Breadcrumbs {
    margin: 0 0 12px;
    padding: 0;
    color: #6B5540;
    font-size: 14px;
    line-height: 1.6;
}

.FrontPageHeading {
    margin: 0;
    font-size: 0;
    line-height: 0;
}

.PageHeading {
    font-size: 18px;
    font-weight: 700;
    padding: 13px 20px;
}

.Breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    min-width: 0;
}

.Breadcrumbs li {
    white-space: nowrap;
}

.Breadcrumbs li:last-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.Breadcrumbs li + li::before {
    content: "\2039";
    margin: 0 8px;
    color: #6B5540;
}

.Breadcrumbs a {
    color: #5A4633;
    display: inline-block;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Fatwa card */

.FatwaCard {
    margin-top: 8px;
    width: 100%;
    background-color: #D9D9D9;
    margin-bottom: 160px;
    overflow: auto;
}

.FatwaCardInner {
    margin: 30px 20px;
}

.FatwaCard.SearchResult {
    margin-bottom: 40px;
}

.FatwaTitle {
    font-weight: 900;
    font-size: 20px;
    color: #5A4633;
    line-height: 1.4;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
}

.FatwaTitle a,
.FatwaTitle a:link,
.FatwaTitle a:visited {
    text-decoration: underline;
    text-underline-offset: 5px;
    color: #5A4633;
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

.FatwaScholar {
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    margin: 14px 0 0;
    color: #6B5540;
}

.FatwaScholar a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.FatwaText {
    font-weight: 400;
    font-size: 18px;
    line-height: 200%;
    margin-top: 40px;
    transition: max-height 0.5s;
    overflow: hidden;
}

.FatwaText.closed {
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    max-height: 216px;
}

.scholar {
    color: #20695f;
    font-weight: 700;
}

.hadith,
.hadith a {
    color: #2A6082;
    font-weight: 700;
}

.aaya {
    color: #972b10;
    font-weight: 700;
}

.DownButton {
    width: 100%;
    min-height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 4px 0;
    padding: 0;
    background: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.DownArrow {
    width: 20px;
    height: 20px;
}

.FatwaFooterDivider {
    height: 2px;
    background: #AB9C8E;
    margin: 16px 0 25px;
    border: none;
    outline: none;
    border-radius: 10px;
}

/* Labelled source block */

.FatwaSource {
    font-size: 16px;
    line-height: 1.8;
    color: #5A4633;
}

.FatwaSource p {
    margin: 0;
}

.FatwaSource a {
    color: #5A4633;
    text-decoration: underline;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

.FatwaSourceNote {
    font-size: 14px;
    margin-top: 4px;
}

.FatwaFooter {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: right;
    gap: 4px;
    margin-top: 8px;
}

.FatwaFooterButton {
    background: none;
    outline: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #341910;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.FatwaFooterButton img {
    width: 25px;
    height: 25px;
}

.FatwaSourceLink {
    padding: 0 6px;
}

.FatwaSourceLink span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Similar fatwas */

.SimilarFatwaCard {
    margin-top: 16px;
    width: 100%;
    background-color: #D9D9D9;
    margin-bottom: 64px;
}

.SimilarFatwaCardInner {
    margin: 40px 20px;
}

.SimilarFatwaTitle {
    font-weight: 900;
    font-size: 30px;
    text-align: center;
    margin: 0;
}

.SimilarFatwaList {
    list-style-type: none;
    display: inline-block;
    width: 100%;
    padding: 0;
    text-align: center;
    margin: 12px 0 0;
}

.SimilarFatwaListItem {
    font-size: 18px;
    padding: 0;
    margin: 0;
    color: #5A4633;
}

.SimilarFatwaListItem a,
.SimilarFatwaListItem a:link,
.SimilarFatwaListItem a:visited {
    display: inline-block;
    padding: 12px 8px;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 5px;
    color: #5A4633;
    background-color: transparent;
}

.SimilarScholar {
    white-space: nowrap;
}

/* Search results page */

.SearchStatus {
    color: #341910;
    font-size: 16px;
    text-align: center;
    margin: 0 20px 32px;
}

.NothingFound {
    font-size: 20px;
    font-weight: 600;
    color: #9d0101;
    text-align: center;
    margin: 32px 0 0;
    width: 100%;
    box-sizing: border-box;
    padding: 24px 20px;
    background-color: #D9D9D9;
}

.LoadMoreButton {
    margin: 0 0 64px;
    padding: 0 32px;
    min-height: 48px;
    background-color: #7D6249;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.LoadMoreButton:hover {
    background-color: #5A4633;
}

.spinner-wave {
    margin: 64px auto 16px;
    width: 250px;
    height: 80px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.spinner-wave > div {
    background-color: #7d6249;
    height: 100%;
    width: 10px;
    display: inline-block;
    animation: 1.6s ease-in-out infinite wave;
}

.spinner-wave div:nth-child(2) {
    animation-delay: -1.4s;
}

.spinner-wave div:nth-child(3) {
    animation-delay: -1.2s;
}

.spinner-wave div:nth-child(4) {
    animation-delay: -1s;
}

.spinner-wave div:nth-child(5) {
    animation-delay: -0.8s;
}

@keyframes wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

mark {
    background-color: rgba(236, 241, 4, 0.4);
    padding: 0;
    color: inherit;
}

/* Footer */

.footer {
    width: 100%;
    background-color: #7D6249;
    font-size: 16px;
    color: white;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
    box-sizing: border-box;
}

.FooterLine {
    flex: 0 1 20vw;
    height: 2px;
    background-color: #AB9C8E;
}

.FooterNav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0 4px;
    text-align: center;
}

.FooterNav a {
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 12px 6px;
    line-height: 24px;
}

.FooterNav a:hover,
.FooterNav a:focus-visible {
    text-decoration: underline;
}

.FooterSep {
    opacity: 0.7;
}

.Tooltiptext {
    visibility: hidden;
    opacity: 0;
    transition: opacity 1s;
    margin-right: -50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, .5);
    color: #d9d9d9;
    z-index: 1;
    position: fixed;
    padding: 10px;
    font-size: 1.75rem;
    width: auto;
    font-weight: bolder;
    border-radius: 15px;
    top: 50%;
    left: 50%;
}

/* Front page */

.TopStatic {
    position: absolute;
    top: 0;
    height: 40%;
    width: 100%;
    background: #AB9C8E;
    z-index: -1;
}

.TopFade {
    position: absolute;
    top: 40%;
    height: 50%;
    width: 100%;
    background: linear-gradient(to bottom, rgba(171, 156, 142, 1), rgba(171, 156, 142, 0));
    z-index: -1;
}

main.MainPage {
    gap: 10px;
    min-height: 100vh;
    justify-content: flex-start;
    box-sizing: border-box;
}

.FrontPageHeader {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.FrontPageTopImage {
    width: 300px;
    margin-top: min(200px, 25%);
    height: auto;
}

.FrontPageBottomImage {
    width: 300px;
    height: auto;
}

.FrontPageTitle {
    margin: 12px 20px 0;
    font-size: 22px;
    font-weight: 900;
    color: #341910;
    text-align: center;
    line-height: 1.4;
}

.FrontPageTagline {
    margin: 4px 20px 8px;
    max-width: 600px;
    text-align: center;
    color: #341910;
    font-size: 16px;
    line-height: 1.7;
}

.SearchBarParent.MainPage {
    background: none;
    width: 70%;
    max-width: 512px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.SearchBarParent.MainPage .SearchGear {
    background-color: #8E7B69;
}

.SearchBarParent.MainPage .SearchGear.active {
    background-color: #7F6751;
}

.HomeIntro {
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    margin-top: 32px;
    padding: 0 20px;
    color: #341910;
    font-size: 16px;
    line-height: 1.8;
    text-align: center;
}

.HomeSection {
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    background-color: #D9D9D9;
    margin-top: 32px;
    padding: 24px 20px;
}

.HomeSection h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
    color: #5A4633;
    text-align: center;
}

.ScholarGrid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 4px;
}

.ScholarGrid a {
    display: block;
    padding: 10px 8px;
    text-align: center;
    color: #5A4633;
    text-decoration: none;
    font-size: 18px;
    line-height: 1.4;
}

.ScholarName {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.ScholarCount {
    display: block;
    font-size: 14px;
    color: #6B5540;
}

.TopicList {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 8px;
}

.TopicList a {
    display: inline-block;
    padding: 12px 8px;
    color: #5A4633;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-size: 18px;
    line-height: 1.4;
}

.MainPage .footer {
    margin-top: 64px;
}

.MainPage .HomeSection:last-of-type {
    margin-bottom: 0;
}

/* Trust pages (about / methodology / privacy / contact) */

.PageCard {
    margin-bottom: 64px;
}

.PageBody {
    font-size: 18px;
    line-height: 1.9;
}

.PageBody .PageTitle {
    margin-bottom: 12px;
}

.PageBody h2 {
    font-size: 22px;
    font-weight: 900;
    color: #5A4633;
    margin: 32px 0 8px;
}

.PageBody p,
.PageBody ul,
.PageBody ol {
    margin: 0 0 12px;
}

.PageBody ul,
.PageBody ol {
    padding-right: 24px;
    padding-left: 0;
}

.PageBody li {
    margin-bottom: 6px;
}

.PageBody a {
    color: #5A4633;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.PageBody .Lead {
    font-weight: 700;
}

/* Search border radius for anything wider than 450px */

@media only screen and (min-width: 450px) {
    .SearchGear {
        border-radius: 30px 0 0 30px;
    }

    .SearchMagnifying {
        border-radius: 0 30px 30px 0;
    }

    .SearchGear.active {
        border-radius: 30px 0 0 0;
    }

    .SearchMagnifying.active {
        border-radius: 0 30px 0 0;
    }
}

/* Tablet devices (portrait and landscape) */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .TopContainer {
        display: flex;
        flex-direction: row-reverse;
        background-color: #7D6249;
        justify-content: space-around;
        gap: 70px;
    }

    .TopImageBackground {
        width: auto;
    }

    .TopImage {
        width: 220px;
    }

    .SubImage {
        width: 220px;
    }

    .SearchBarParent {
        background-color: #7D6249;
        width: auto;
    }

    .SearchBarBody {
        margin: 0;
    }

    .SearchGear {
        width: 8vw;
    }

    .GearIcon {
        max-width: 4vw;
    }

    .SearchInputArea {
        width: 40vw;
    }

    .SearchMagnifying {
        width: 8vw;
    }

    .MagnifyingIcon {
        width: 4vw;
    }

    .SearchSettings {
        width: 56vw;
    }

    .FatwaTitle {
        font-size: 25px;
    }

    .FatwaScholar {
        font-size: 20px;
    }

    .FatwaText {
        font-size: 20px;
    }

    .SearchBarInput,
    .AdvancedSearchInput {
        font-size: 20px;
    }

    .SimilarFatwaListItem {
        font-size: 20px;
    }

    .SimilarFatwaTitle {
        font-size: 36px;
    }
}

/* Desktop devices */

@media only screen and (min-width: 992px) {
    body {
        background-position: 0 0, 5vw 5.14vw;
        background-size: 10vw 10.28vw;
    }

    .BackgroundImage {
        background-position: 0 0, 5vw 5.14vw;
        background-size: 10vw 10.28vw;
    }

    .TopContainer {
        display: flex;
        flex-direction: row-reverse;
        background-color: #7D6249;
        justify-content: space-between;
    }

    .TopImageBackground {
        width: auto;
    }

    .TopImage {
        width: 200px;
        margin: 32px 16px 5px;
    }

    .SubImage {
        width: 200px;
        margin-bottom: 32px;
    }

    .SearchBarParent {
        background-color: #7D6249;
        width: auto;
        margin: 0 16px;
    }

    .SearchBarBody {
        margin: 0;
        height: 50px;
    }

    .SearchGear {
        width: 60px;
    }

    .GearIcon {
        width: 30px;
        max-width: 30px;
    }

    .SearchInputArea {
        width: 300px;
    }

    .SearchMagnifying {
        width: 60px;
    }

    .MagnifyingIcon {
        width: 30px;
    }

    .SearchSettings {
        width: 420px;
        top: calc(50% + 25px);
    }

    .PageHeading,
    .FatwaCard,
    .SimilarFatwaCard,
    .NothingFound {
        max-width: 800px;
    }

    .FatwaTitle {
        font-size: 25px;
    }

    .FatwaScholar {
        font-size: 20px;
    }

    .FatwaText {
        font-size: 20px;
    }

    .SearchBarInput,
    .AdvancedSearchInput {
        font-size: 20px;
    }

    .SimilarFatwaListItem {
        font-size: 20px;
    }

    .SimilarFatwaTitle {
        font-size: 36px;
    }
}

/* Main Page Tablet to Desktop */

@media only screen and (min-width: 768px) {
    .SearchBarParent.MainPage form {
        width: 100%;
    }

    .SearchBarParent.MainPage .SearchGear {
        width: 12.5%;
    }

    .SearchBarParent.MainPage .SearchInputArea {
        width: 75%;
    }

    .SearchBarParent.MainPage .SearchMagnifying {
        width: 12.5%;
    }

    .SearchBarParent.MainPage .SearchSettings {
        width: 100%;
        top: calc(50% + 25px);
    }

    .SearchBarParent.MainPage .GearIcon {
        width: 30px;
    }

    .SearchBarParent.MainPage .SearchBarBody {
        margin: 0;
        height: 50px;
    }

    .FatwaText.closed {
        max-height: 240px;
    }
}

/* Scholar hub pages */
.ScholarBio { margin-top: 16px; }
.ScholarBioSource, .ScholarMeta { font-size: 16px; line-height: 1.8; margin: 12px 0 0; }
.ScholarListTitle { font-size: 24px; margin-top: 32px; text-align: right; }
.ScholarList { text-align: right; }
/* .Pagination is used by scholar.html and nowhere else. It now carries numbered page
   links as well as prev/next, so the row wraps instead of overflowing on a phone. */
.Pagination { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px 16px; margin-top: 24px; }
.Pagination a, .Pagination strong { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 16px; color: #5A4633; text-decoration: underline; text-underline-offset: 5px; }
.Pagination strong { text-decoration: none; background: #D9D9D9; border-radius: 8px; }
