﻿:root {
    --primary-color: #4B3000;
    --bg-white: #fff;
    --border-color: #eee;
    --text-color: #555;
}

.header {
    background: var(--primary-color);
    height: 70px;
    display: flex;
    align-items: center;
    font-family: "Amiri", serif;
    font-weight: 700;
    font-size: 14px;
}

.body-content {
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 1;
}

.header .navbar-light .navbar-nav .nav-link {
    color: #fff;
    font-weight: 400;
    font-size: 16px;
    padding: .25rem 2rem;
    border: 1px solid transparent;
    border-radius: 20px;
}

    .header .navbar-light .navbar-nav .nav-link.active {
        background: #FFFBF3;
        color: var(--primary-color)
    }

    .header .navbar-light .navbar-nav .nav-link:hover {
        border: 1px solid #FFF;
    }

.header .userInfo span {
    font-weight: 400;
    font-size: 12px;
    color: #27B251;
}

.header .active-status-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #28a745;
    border-radius: 50%;
}

.header .notification-badge {
    position: absolute;
    top: -7px;
    right: 20px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 3px 5px;
    font-size: 10px;
    line-height: 1;
    font-weight: bold;
    text-align: center;
}

.body-content .container-fluid, .header .navbar {
    padding-left: 60px;
    padding-right: 60px;
    margin: 0 auto;
    width: 100%;
}

    .header .navbar > div {
        padding-left: 3rem;
    }

.header .dropdown-menu {
    min-width: 200px;
}

header select.custom-select {
    height: 28px;
    border: 1px solid #333;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 0;
    font-family: "Amiri", serif;
    font-weight: 700;
    font-size: 14px;
}

.header .userInfo p {
    font-weight: 500;
    font-size: 16px;
    color: #fff;
    margin: 0;
}

.header .userInfo span {
    font-weight: 400;
    font-size: 12px;
    color: #27B251;
}

#langnavbarDropdown {
    gap: 0.5rem;
}

    #langnavbarDropdown::after {
        display: none;
    }

.home-link {
    font-size: 16px;
    color: #FFF !important;
    padding: .25rem 1rem !important;
    border: 1px solid transparent;
    border-radius: 20px;
    margin-right: 1rem !important;
    font-weight: normal
}

    .home-link:hover {
        border: 1px solid #FFF;
    }

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Vazirmatn, 'Segoe UI', Tahoma, 'Arabic UI Text', sans-serif;
    background: #F0F0E6;
    min-height: 100vh;
}

.body-content {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

    .body-content .container-fluid {
        padding-left: 60px;
        padding-right: 60px;
        margin: 0 auto;
        width: 100%;
    }

@media(max-width:1599px) {
    .body-content .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 0 12px 0px;
    background: #fff;
    border-radius: 10px;
    justify-content: space-between;
}

    .toolbar label {
        font-size: .85rem;
        color: #555;
    }

    .toolbar select {
        padding: 6px 10px;
        border-radius: 6px;
        background: #FAFAFA;
        border: none;
        /* min-width: 120px; */
    }

.mushaf-column {
    flex: 0 0 650px; /* 650px */
    width: 650px;
    max-width: 100%;
}

@media screen and (max-width:1600px) {

    .mushaf-column {
        flex: 0 0 500px; /* 650px */
        width: 500px;
        max-width: 100%;
    }
}

.quran-border-container {
    border: 30px solid;
    border-image: url(assets/border.png) 30 round;
    padding: 10px;
}

.mushaf-frame {
    background: #fffef8;
    padding: 0 10px;
    min-height: 320px;
}

.quran-page-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 4px 0;
    direction: ltr;
}

.quran-page-pill {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    flex: 0 0 100%;
}

.quran-page-pill-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0 8px;
    white-space: nowrap;
    direction: ltr;
}

.quran-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    text-decoration: none;
}

    .quran-page-btn:focus {
        outline: none;
    }

    .quran-page-btn:focus-visible {
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary-color);
    }

.quran-page-btn--solid {
    background: #3d2b00;
    color: #fff !important;
}

    .quran-page-btn--solid:hover:not(.is-disabled) {
        background: #4B3000;
        transform: translateY(-1px);
    }

    .quran-page-btn--solid svg {
        stroke: #fff;
    }

.quran-page-btn--plain {
    background: transparent;
    color: var(--primary-color);
}

    .quran-page-btn--plain:hover:not(.is-disabled) {
        background: rgba(75, 48, 0, .06);
    }

    .quran-page-btn--plain svg {
        stroke: currentColor;
    }

.quran-page-btn.is-disabled {
    opacity: .38;
    pointer-events: none;
    cursor: default;
    transform: none;
}

.quran-page-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.surah-heading {
    display: block;
    width: 100%;
    clear: both;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #143728;
    margin: 20px 0 14px;
    padding: 5px 10px;
    background: url(assets/surahname-bg.png) no-repeat;
    background-size: 100% 100%;
    background-position: center;
    height: 54px;
    line-height: 44px;
    font-family: Cairo, 'Traditional Arabic', 'Arabic Typesetting', Tahoma, sans-serif;
}

    .surah-heading .surah-name-ar {
        font-size: 1.05em;
        font-weight: 700;
    }

    .surah-heading:first-child {
        margin-top: 0;
    }

.ayah-list {
    font-size: 1.35rem;
    line-height: 2.1;
    text-align: right;
}

/* Surah Al-Fatiha: first ayah alone on a centered line */
.ayah-list .fatiha-first-ayah {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.35rem;
}

/* Surah Al-Fatiha: ayahs 2–7 justified */
.ayah-list .fatiha-remaining-ayahs {
    display: block;
    width: 100%;
    text-align: justify;
    text-justify: inter-word;
}

.ayah-item {
    display: inline;
    padding: 5px;
    cursor: pointer;
}

a.ayah-item {
    text-decoration: none;
    color: inherit;
}

.ayah-item.is-selected {
    background: #F2EDE7;
    cursor: default;
}

.ayah-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    height: 25px;
    padding: 0 4px;
    margin-inline-start: 6px;
    font-size: .75em;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(165deg, #2f6f52, #1b4332);
    border: 1.5px solid #143728;
    border-radius: 50%;
    vertical-align: super;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    position: relative;
    bottom: -5px;
}

.ayah-item.is-selected .ayah-marker {
    background: linear-gradient(165deg, #1b4332, #2d6a4f);
}

.tafseer-head {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.search-section-container {
    display: flex;
    gap: 15px;
    direction: rtl;
    align-items: center;
    background-color: #f2f1eb;
    padding: 20px 0;
    flex-wrap: wrap;
}

.search-bar-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 8px 45px 8px 15px;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    outline: none;
    color: #5c4010;
    border: 1px solid #fff;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #5c4010;
    font-size: 18px;
    display: flex;
}

.toggle-group {
    display: flex;
    background: #FFF;
    border-radius: 10px;
    padding: 5px;
    gap: 5px;
}

.btn-toggle {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 18px;
    color: #5c4010;
    border-radius: 8px;
}

    .btn-toggle.horizontal .fi {
        transform: rotate(90deg);
    }

    .btn-toggle.active {
        background: var(--primary-color);
        color: #FFF;
    }

.tafseer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    min-height: 36px;
}

a.tafseer-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    padding: 8px 18px;
    border-radius: 999px;
    background: #f4f3ef;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, .07);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    transition: transform .12s ease, box-shadow .12s ease;
}

    a.tafseer-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, .1);
    }

.tafseer-chip-eyes {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
    align-items: center;
}

.tafseer-chip-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tafseer-chip-eye--off {
    display: none;
}

a.tafseer-chip.tafseer-chip--off .tafseer-chip-eye--on {
    display: none;
}

a.tafseer-chip.tafseer-chip--off .tafseer-chip-eye--off {
    display: inline-flex;
}

a.tafseer-chip--0 {
    color: #4B3000;
}

a.tafseer-chip--1 {
    color: #556B2F;
}

a.tafseer-chip--2 {
    color: #D4AF37;
}

a.tafseer-chip--3 {
    color: #C2B280;
}

a.tafseer-chip--4 {
    color: #00796B;
}

.tafseer-blocks {
    min-height: 120px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .tafseer-blocks.gridview {
        align-items: stretch;
    }

    /* Vertical list: one card per row; avoid stretch-to-tallest-in-row so one expand doesn’t “grow” siblings */
    .tafseer-blocks.listview {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

        .tafseer-blocks.listview .tafseer-card {
            flex: 0 0 auto;
            width: 100%;
            max-width: 100%;
            align-self: stretch;
        }

    .tafseer-blocks.gridview .tafseer-card {
        flex: 0 0 calc(33.33% - 7px);
        min-width: 200px;
    }

@media(max-width:768px) {
    .tafseer-blocks.gridview .tafseer-card {
        flex: 0 0 100%;
    }
}

.tafseer-card {
    border-radius: 10px;
    margin-bottom: 14px;
    background: #fff;
    border-width: 4px;
    border-style: solid;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.tafseer-card--0 {
    border-color: #DCCFB9;
    background: #FCFCFC
}

.tafseer-card--1 {
    border-color: #D8E9BC;
    background: #F9FFEF
}

.tafseer-card--2 {
    border-color: #FEEEBB;
    background: #FEF9E8
}

.tafseer-card--3 {
    border-color: #E0D3AA;
    background: #F6F4EA
}

.tafseer-card--4 {
    border-color: #BFEAE5;
    background: #F3FFFE
}

.tafseer-card-head {
    padding-bottom: 8px;
    gap: 8px;
    top: 0;
    z-index: 2;
    background: inherit;
}

    .tafseer-card-head .fi {
        color: var(--primary-color);
        font-size: 1.1rem;
        line-height: 1;
    }

.tafseer-card-label {
    padding: 6px 14px;
    font-weight: 700;
    font-size: .88rem;
    text-align: right;
    border-radius: 20px;
    color: #FFF;
    margin: 0;
}

.tafseer-card--0 .tafseer-card-label {
    background: #4B3000;
}

.tafseer-card--1 .tafseer-card-label {
    background: #556B2F;
}

.tafseer-card--2 .tafseer-card-label {
    background: #D4AF37;
}

.tafseer-card--3 .tafseer-card-label {
    background: #C2B280;
}

.tafseer-card--4 .tafseer-card-label {
    background: #00796B;
}

.tafseer-card-body {
    padding: 12px 0;
    line-height: 1.7;
    font-size: 0.98rem;
    direction: rtl;
    text-align: right;
}

.tafseer-card.is-collapsed .tafseer-card-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.tafseer-card.is-expanded .tafseer-card-body {
    display: block;
}

.tafseer-card-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0;
}

.tafseer-blocks.gridview .tafseer-card-toggle {
    pointer-events: none;
}

.tafseer-card-toggle:focus {
    outline: none;
}

.tafseer-card-toggle:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary-color);
}

.tafseer-card.is-expanded .tafseer-card-toggle i {
    transform: rotate(180deg);
    transition: transform .15s ease;
}

.tafseer-card.is-collapsed .tafseer-card-toggle i {
    transform: rotate(0deg);
    transition: transform .15s ease;
}

.tafseer-card.is-hidden {
    display: none;
}

.empty-tafseer {
    padding: 24px;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.tafseer-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    direction: rtl;
    padding: 5px 15px;
    border-radius: 50px;
    background: #F4F4F4;
    border: 2px solid #5C4010;
    color: #5C4010;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s ease;
}

    .tafseer-settings-btn:hover {
        background: #5C4010;
        color: #FFF;
    }

.tafseer-sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 320px;
    height: 100vh;
    z-index: 1000;
    transition: left .4s ease;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, .1);
    border-top-right-radius: 20px;
    padding-left: 10px;
}

    .tafseer-sidebar.open {
        left: 0;
    }

    .tafseer-sidebar .con {
        overflow: auto;
        height: 100vh;
    }

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}


/* Full-page skeleton loader — mirrors the exact two-column UI layout */

.qe-page-loader {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: #F0F0E6;
    overflow-y: auto;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    display: flex;
    flex-direction: column;
}

.qe-page-loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.qe-page-loading { overflow: hidden; }

/* Shimmer sweep animation */
.qe-sk-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 253, 245, 0.75) 40%,
        rgba(255, 253, 245, 0.95) 50%,
        rgba(255, 253, 245, 0.75) 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: qe-sk-sweep 1.6s ease-in-out infinite;
}

@keyframes qe-sk-sweep {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton Header */
.qe-sk-header {
    height: 70px;
    background: #4B3000;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 60px;
    flex-shrink: 0;
}

.qe-sk-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(255,255,255,0.18);
    flex-shrink: 0;
}

.qe-sk-header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

.qe-sk-nav-pill {
    height: 34px;
    border-radius: 20px;
    background: rgba(255,255,255,0.18);
    overflow: hidden;
}
.qe-sk-nav-pill.qe-sk-active { background: rgba(255,251,243,0.55); }

/* Skeleton Body */
.qe-sk-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 16px 60px;
    flex: 1;
    direction: rtl;
    gap: 0;
}

/* Mushaf Column (right side in RTL) */
.qe-sk-mushaf-col {
    flex: 0 0 650px;
    width: 650px;
    max-width: 100%;
    padding-left: 16px;
}

@media screen and (max-width: 1600px) {
    .qe-sk-header     { padding: 0 20px; }
    .qe-sk-body       { padding: 16px 20px; }
    .qe-sk-mushaf-col { flex: 0 0 500px; width: 500px; }
}

.qe-sk-white-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.qe-sk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
}

.qe-sk-select {
    height: 34px;
    flex: 1;
    border-radius: 6px;
    background: #f0ede6;
    overflow: hidden;
}

.qe-sk-mushaf-frame {
    background: #fffef8;
    padding: 0 8px 12px;
}

.qe-sk-quran-border {
    border: 22px solid transparent;
    border-image: url(assets/border.png) 30 round;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qe-sk-surah-bar {
    height: 44px;
    border-radius: 4px;
    background: #e8e1cf;
    overflow: hidden;
    margin: 8px 16px 0;
}

.qe-sk-bismillah-bar {
    height: 26px;
    border-radius: 20px;
    background: #e8e1cf;
    overflow: hidden;
    margin: 0 30px;
}

.qe-sk-ayah-lines {
    display: flex;
    flex-direction: column;
    gap: 20px;
    direction: rtl;
}

.qe-sk-al {
    height: 22px;
    border-radius: 20px;
    background: #e8e1cf;
    overflow: hidden;
    align-self: flex-end;
}

.qe-sk-al-100 { width: 100%; }
.qe-sk-al-90  { width: 90%;  }
.qe-sk-al-85  { width: 85%;  }
.qe-sk-al-80  { width: 80%;  }
.qe-sk-al-75  { width: 75%;  }
.qe-sk-al-70  { width: 70%;  }
.qe-sk-al-65  { width: 65%;  }
.qe-sk-al-60  { width: 60%;  }
.qe-sk-al-55  { width: 55%;  }

.qe-sk-page-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    direction: ltr;
}

.qe-sk-pg-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #3d2b00;
    overflow: hidden;
    flex-shrink: 0;
}

.qe-sk-pg-label {
    width: 80px;
    height: 22px;
    border-radius: 20px;
    background: #dedad0;
    overflow: hidden;
}

/* Right Panel (Tafseer / Translation) */
.qe-sk-panel-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qe-sk-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    margin-bottom: 4px;
}

.qe-sk-panel-title {
    width: 140px;
    height: 28px;
    border-radius: 6px;
    background: #dedad0;
    overflow: hidden;
}

.qe-sk-settings-btn {
    width: 120px;
    height: 34px;
    border-radius: 50px;
    background: #dedad0;
    overflow: hidden;
}

.qe-sk-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f2f1eb;
    padding: 14px 0;
    direction: rtl;
}

.qe-sk-search-bar {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    min-width: 0;
}

.qe-sk-toggle-grp {
    width: 76px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.qe-sk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    direction: rtl;
}

.qe-sk-chip {
    height: 36px;
    border-radius: 999px;
    background: #e8e4db;
    overflow: hidden;
}

.qe-sk-w60  { width:  60px; }
.qe-sk-w70  { width:  70px; }
.qe-sk-w80  { width:  80px; }
.qe-sk-w90  { width:  90px; }
.qe-sk-w95  { width:  95px; }
.qe-sk-w100 { width: 100px; }
.qe-sk-w110 { width: 110px; }
.qe-sk-w120 { width: 120px; }
.qe-sk-w130 { width: 130px; }
.qe-sk-w140 { width: 140px; }

.qe-sk-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qe-sk-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4ddd0;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: rtl;
}

.qe-sk-card-hdr {
    height: 26px;
    width: 45%;
    border-radius: 20px;
    background: rgba(75,48,0,0.45);
    overflow: hidden;
}

.qe-sk-card-ln {
    height: 16px;
    border-radius: 20px;
    background: #e8e4db;
    overflow: hidden;
    align-self: flex-end;
}

/* Ripple stagger */
.qe-sk-al:nth-child(2)  .qe-sk-shimmer,
.qe-sk-card-ln:nth-child(2) .qe-sk-shimmer { animation-delay: 0.08s; }
.qe-sk-al:nth-child(3)  .qe-sk-shimmer,
.qe-sk-card-ln:nth-child(3) .qe-sk-shimmer { animation-delay: 0.16s; }
.qe-sk-al:nth-child(4)  .qe-sk-shimmer,
.qe-sk-card-ln:nth-child(4) .qe-sk-shimmer { animation-delay: 0.24s; }
.qe-sk-al:nth-child(5)  .qe-sk-shimmer { animation-delay: 0.32s; }
.qe-sk-al:nth-child(6)  .qe-sk-shimmer { animation-delay: 0.40s; }
.qe-sk-al:nth-child(7)  .qe-sk-shimmer { animation-delay: 0.48s; }
.qe-sk-al:nth-child(8)  .qe-sk-shimmer { animation-delay: 0.56s; }
.qe-sk-al:nth-child(9)  .qe-sk-shimmer { animation-delay: 0.64s; }
.qe-sk-al:nth-child(10) .qe-sk-shimmer { animation-delay: 0.72s; }
.qe-sk-al:nth-child(11) .qe-sk-shimmer { animation-delay: 0.80s; }
.qe-sk-al:nth-child(12) .qe-sk-shimmer { animation-delay: 0.88s; }
