/*
 * Masail World 2.0 premium refresh
 * White, botanical green and warm cream design system.
 */

:root {
    --mw-primary: #075f46;
    --mw-primary-dark: #043e2f;
    --mw-primary-soft: #e2f0e7;
    --mw-accent: #8abf93;
    --mw-accent-dark: #4c8f67;
    --mw-cream: #f7f3e8;
    --mw-cream-deep: #eee6d5;
    --mw-white: #fff;
    --mw-ink: #18332a;
    --mw-body: #52645e;
    --mw-muted: #81918b;
    --mw-line: #dfe7e1;
    --mw-line-strong: #cad8cf;
    --mw-danger: #b84242;
    --mw-success: #237a52;
    --mw-radius-sm: 12px;
    --mw-radius-md: 18px;
    --mw-radius-lg: 28px;
    --mw-radius-xl: 38px;
    --mw-shadow-sm: 0 8px 24px rgba(17, 71, 52, .06);
    --mw-shadow-md: 0 18px 48px rgba(17, 71, 52, .10);
    --mw-shadow-lg: 0 30px 80px rgba(17, 71, 52, .15);
    --emerald-primary: var(--mw-primary);
    --emerald-hover: var(--mw-primary-dark);
    --emerald-light: var(--mw-primary-soft);
    --gold-primary: var(--mw-accent-dark);
    --gold-hover: var(--mw-primary);
    --gold-light: var(--mw-primary-soft);
    --gold-gradient: linear-gradient(135deg, var(--mw-accent), var(--mw-primary));
    --bg-main: #fbfcf9;
    --bg-secondary: var(--mw-cream);
    --bg-surface: var(--mw-white);
    --bg-card-hover: #f7fbf7;
    --border-color: var(--mw-line);
    --border-gold: var(--mw-line-strong);
    --text-primary: var(--mw-ink);
    --text-secondary: var(--mw-body);
    --text-muted: var(--mw-muted);
    --radius-pill: 999px;
    --radius-md: var(--mw-radius-sm);
    --radius-lg: var(--mw-radius-md);
    --radius-xl: var(--mw-radius-lg);
    --shadow-sm: var(--mw-shadow-sm);
    --shadow-md: var(--mw-shadow-md);
    --shadow-lg: var(--mw-shadow-lg);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 3% 18%, rgba(138, 191, 147, .08), transparent 22rem),
        #fbfcf9;
    color: var(--mw-ink);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.drawer-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

::selection {
    color: var(--mw-white);
    background: var(--mw-primary);
}

a {
    color: var(--mw-primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(7, 95, 70, .22);
    outline-offset: 3px;
}

img {
    max-width: 100%;
    height: auto;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    z-index: 100000;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 10px 16px;
    clip: auto;
    border-radius: 8px;
    background: var(--mw-white);
    box-shadow: var(--mw-shadow-md);
}

.container {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--mw-ink);
    letter-spacing: -.035em;
}

.btn {
    min-height: 46px;
    padding: .72rem 1.25rem;
    border-radius: var(--radius-pill) !important;
    gap: .55rem;
    font-size: .88rem;
    letter-spacing: -.01em;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--mw-white);
    background: linear-gradient(135deg, var(--mw-primary), var(--mw-primary-dark));
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(7, 95, 70, .2);
}

.btn-primary:hover {
    color: var(--mw-white);
    box-shadow: 0 14px 30px rgba(7, 95, 70, .28);
}

.btn-secondary {
    color: var(--mw-primary);
    background: rgba(255, 255, 255, .8);
    border-color: var(--mw-line-strong);
    box-shadow: none;
}

.btn-secondary:hover {
    color: var(--mw-primary-dark);
    background: var(--mw-white);
    border-color: var(--mw-accent);
}

.btn-cream {
    color: var(--mw-primary-dark);
    background: var(--mw-cream);
    border-color: rgba(255, 255, 255, .35);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .12);
}

.btn-cream:hover {
    color: var(--mw-primary);
    background: var(--mw-white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .75rem;
    color: var(--mw-accent-dark);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 18px;
    height: 2px;
    content: "";
    background: currentColor;
}

.eyebrow-light {
    color: #cfe7d5;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--mw-primary);
    font-size: .88rem;
    font-weight: 750;
}

.text-link:hover {
    gap: .75rem;
    color: var(--mw-primary-dark);
}

/* Header */
.top-notice-bar {
    min-height: 38px;
    padding: .35rem 1rem;
    color: #e6f2e9;
    background: var(--mw-primary-dark);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .75rem;
}

.notice-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .55rem;
    color: var(--mw-primary-dark);
    background: #cfe7d5;
    font-size: .64rem;
    letter-spacing: .06em;
}

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(202, 216, 207, .7);
    box-shadow: none;
    backdrop-filter: blur(18px);
    transition: box-shadow .25s ease, background .25s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 34px rgba(17, 71, 52, .08);
}

.nav-container {
    width: min(1240px, calc(100% - 36px));
    max-width: 1240px;
    min-height: 78px;
    padding: .65rem 0;
}

.brand-logo {
    min-width: 190px;
    gap: .72rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    color: var(--mw-white);
    background: linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
    border: 0;
    box-shadow: 0 9px 24px rgba(7, 95, 70, .18);
}

.custom-logo-wrap,
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    width: auto;
    max-width: 180px;
    max-height: 52px;
}

.brand-text strong {
    display: block;
    color: var(--mw-ink);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.brand-text span {
    margin-top: .2rem;
    color: var(--mw-muted);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.desktop-navigation {
    margin: 0 auto;
}

.nav-menu {
    gap: .25rem;
}

.nav-menu a {
    padding: .6rem .8rem;
    color: #50635c;
    font-size: .83rem;
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
}

.nav-menu .sub-menu {
    position: absolute;
    z-index: 20;
    min-width: 210px;
    padding: .65rem;
    visibility: hidden;
    opacity: 0;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 16px;
    box-shadow: var(--mw-shadow-md);
    transform: translateY(8px);
    transition: .2s ease;
}

.nav-menu li {
    position: relative;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border: 1px solid #cfe1d5;
    border-radius: 50%;
}

/* Mobile drawer */
.mobile-drawer-overlay {
    background: rgba(4, 36, 27, .46);
    backdrop-filter: blur(8px);
}

.mobile-drawer-content {
    width: min(380px, 88vw);
    color: var(--mw-ink);
    background: var(--mw-white);
    box-shadow: -24px 0 70px rgba(4, 62, 47, .2);
}

.mobile-drawer-header {
    min-height: 82px;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--mw-line);
}

.mobile-drawer-title {
    color: var(--mw-ink);
}

.mobile-drawer-title .logo-icon {
    width: 38px;
    height: 38px;
    color: var(--mw-white);
}

.mobile-drawer-close {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-radius: 50%;
}

.mobile-drawer-body {
    padding: 1.2rem;
}

.mobile-drawer-links,
.mobile-drawer-content .nav-menu {
    display: grid;
    gap: .35rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.mobile-drawer-links a,
.mobile-drawer-content .nav-menu a {
    display: flex;
    padding: .8rem 1rem;
    color: var(--mw-ink);
    font-weight: 700;
    background: #f8faf7;
    border: 1px solid transparent;
    border-radius: 14px;
}

.mobile-drawer-links a:hover,
.mobile-drawer-content .nav-menu a:hover {
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-color: #cfe1d5;
}

.mobile-drawer-content .sub-menu {
    margin: .35rem 0 0 1rem;
    padding: 0;
    list-style: none;
}

.drawer-note {
    display: flex;
    gap: .8rem;
    padding: 1rem;
    color: #dcece0;
    background: linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
    border-radius: 18px;
}

.drawer-note > i {
    color: #b9d9c2;
    font-size: 1.4rem;
}

.drawer-note strong {
    display: block;
    margin-bottom: .25rem;
    color: var(--mw-white);
    font-size: .84rem;
}

.drawer-note p {
    margin: 0;
    color: #c7ded0;
    font-size: .75rem;
    line-height: 1.5;
}

/* Home hero */
.hero-section {
    min-height: 650px;
    padding: 5.6rem 0 5rem;
    color: var(--mw-ink);
    background:
        radial-gradient(circle at 86% 10%, rgba(138, 191, 147, .35), transparent 19rem),
        linear-gradient(125deg, #fff 0%, #fbfaf5 45%, var(--mw-cream) 100%);
    border-bottom: 1px solid var(--mw-line);
    box-shadow: none;
}

.hero-section::before {
    position: absolute;
    inset: auto 7% 9% auto;
    width: 170px;
    height: 170px;
    content: "";
    opacity: .28;
    background-image: radial-gradient(var(--mw-accent-dark) 1px, transparent 1px);
    background-size: 13px 13px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.hero-orb-one {
    top: -150px;
    right: -100px;
    width: 390px;
    height: 390px;
    background: rgba(138, 191, 147, .18);
}

.hero-orb-two {
    bottom: -160px;
    left: -120px;
    width: 360px;
    height: 360px;
    background: rgba(247, 243, 232, .8);
    border: 1px solid var(--mw-cream-deep);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
    gap: clamp(3rem, 7vw, 6.5rem);
    align-items: center;
}

.hero-copy {
    max-width: 690px;
}

.hero-badge {
    margin-bottom: 1.15rem;
    padding: .42rem .8rem;
    color: var(--mw-primary);
    background: rgba(226, 240, 231, .72);
    border: 1px solid #cce1d2;
    box-shadow: none;
    font-size: .7rem;
}

.hero-title {
    max-width: 680px;
    margin: 0 0 1.3rem;
    color: var(--mw-ink);
    font-size: clamp(2.8rem, 5.3vw, 5rem);
    line-height: 1.04;
    text-shadow: none;
}

.hero-title span {
    display: inline;
    color: var(--mw-primary);
    background: linear-gradient(100deg, var(--mw-primary), var(--mw-accent-dark));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 630px;
    margin: 0 0 2rem;
    color: var(--mw-body);
    font-size: 1.02rem;
    line-height: 1.75;
    text-shadow: none;
}

.search-card-container {
    position: relative;
    max-width: 680px;
}

.main-search-card {
    max-width: none;
    min-height: 68px;
    margin: 0;
    padding: .45rem .45rem .45rem 1.15rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line-strong);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(17, 71, 52, .1);
}

.main-search-card:focus-within {
    border-color: var(--mw-accent-dark);
    box-shadow: 0 20px 50px rgba(17, 71, 52, .15), 0 0 0 4px rgba(138, 191, 147, .16);
    transform: none;
}

.search-input-wrapper {
    gap: .7rem;
    padding: 0;
}

.search-leading-icon {
    flex: 0 0 auto;
    color: var(--mw-accent-dark);
    font-size: 1.1rem;
}

.search-input-wrapper input {
    min-width: 0;
    height: 46px;
    color: var(--mw-ink);
    font-size: .9rem;
}

.search-clear-btn {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    padding: 0;
    place-items: center;
    color: var(--mw-muted);
    background: transparent;
    border: 0;
}

.search-icon-btn {
    width: auto;
    min-width: 118px;
    height: 52px;
    gap: .45rem;
    padding: 0 1.25rem;
    color: var(--mw-white);
    background: linear-gradient(135deg, var(--mw-primary), var(--mw-primary-dark));
    box-shadow: 0 9px 22px rgba(7, 95, 70, .2);
    font-size: .84rem;
    font-weight: 750;
}

.search-icon-btn:hover {
    box-shadow: 0 12px 26px rgba(7, 95, 70, .3);
    transform: translateY(-1px);
}

.live-search-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    overflow: hidden;
    max-height: 520px;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 22px;
    box-shadow: var(--mw-shadow-lg);
}

.live-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem 1rem;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-bottom: 1px solid var(--mw-line);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.live-results-header small {
    color: var(--mw-muted);
}

.live-results-list {
    overflow-y: auto;
    max-height: 370px;
}

.live-result-item {
    display: block;
    padding: .9rem 1rem;
    border-bottom: 1px solid #edf1ed;
}

.live-result-item:hover,
.live-result-item:focus {
    background: #f8fbf8;
}

.live-item-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .3rem;
}

.live-badge-topic,
.live-badge-id {
    color: var(--mw-accent-dark);
    font-size: .66rem;
    font-weight: 750;
}

.live-item-title {
    color: var(--mw-ink);
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.35;
}

.live-item-urdu {
    margin-top: .25rem;
    color: var(--mw-body);
    font-family: var(--font-custom);
    font-size: .92rem;
}

.live-item-writer {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .45rem;
    color: var(--mw-muted);
    font-size: .68rem;
}

.live-results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem;
    color: var(--mw-white);
    background: var(--mw-primary);
    font-size: .78rem;
    font-weight: 750;
}

.live-search-loading,
.live-search-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    min-height: 88px;
    padding: 1rem;
    color: var(--mw-body);
    font-size: .78rem;
    text-align: left;
}

.live-search-empty i {
    color: var(--mw-accent-dark);
    font-size: 1.3rem;
}

.live-search-empty strong,
.live-search-empty span {
    display: block;
}

.live-search-empty span {
    margin-top: .2rem;
    color: var(--mw-muted);
    font-size: .7rem;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: mw-spin .7s linear infinite;
}

.live-search-loading .loading-spinner {
    border-color: #d5e4d9;
    border-top-color: var(--mw-primary);
}

@keyframes mw-spin {
    to { transform: rotate(360deg); }
}

.quick-tags-container {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: 1.15rem;
}

.quick-tags-label {
    flex: 0 0 auto;
    color: var(--mw-muted);
    font-size: .72rem;
    font-weight: 700;
}

.quick-tags-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.tag-pill-card {
    padding: .28rem .65rem;
    color: var(--mw-primary);
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--mw-line);
    border-radius: var(--radius-pill);
    font-size: .7rem;
    font-weight: 700;
}

.tag-pill-card:hover {
    color: var(--mw-white);
    background: var(--mw-primary);
    border-color: var(--mw-primary);
    transform: translateY(-1px);
}

.hero-insight-card {
    position: relative;
    overflow: hidden;
    padding: 1.3rem;
    color: #dcece0;
    background:
        radial-gradient(circle at 100% 0, rgba(138, 191, 147, .26), transparent 13rem),
        linear-gradient(150deg, var(--mw-primary), var(--mw-primary-dark));
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(4, 62, 47, .24);
}

.hero-insight-card::after {
    position: absolute;
    right: -45px;
    bottom: -55px;
    width: 170px;
    height: 170px;
    content: "";
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.insight-card-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.insight-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--mw-primary-dark);
    background: #cfe7d5;
    border-radius: 14px;
}

.insight-card-head > div span,
.insight-card-head > div strong {
    display: block;
}

.insight-card-head > div span {
    color: #9dc4aa;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.insight-card-head > div strong {
    color: var(--mw-white);
    font-size: .9rem;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-left: auto;
    padding: .28rem .55rem;
    color: #cfe7d5;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-pill);
    font-size: .62rem;
    font-weight: 700;
}

.live-pill > span {
    width: 6px;
    height: 6px;
    background: #9ddbaf;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(157, 219, 175, .12);
}

.hero-stat-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    padding: 1rem 0;
}

.hero-stat-grid > div {
    padding: .85rem .65rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 15px;
}

.hero-stat-grid strong,
.hero-stat-grid span {
    display: block;
}

.hero-stat-grid strong {
    color: var(--mw-white);
    font-size: 1.3rem;
    line-height: 1.1;
}

.hero-stat-grid span {
    margin-top: .35rem;
    color: #9fc1aa;
    font-size: .6rem;
    line-height: 1.35;
}

.insight-list {
    position: relative;
    z-index: 2;
}

.insight-list-label {
    display: block;
    margin: .2rem 0 .5rem;
    color: #9fc1aa;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.insight-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .72rem 0;
    color: #e9f3ec;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .76rem;
    font-weight: 650;
    line-height: 1.45;
}

.insight-list a:hover {
    color: var(--mw-white);
}

.insight-library-link {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding: .75rem .9rem;
    color: var(--mw-primary-dark);
    background: #cfe7d5;
    border-radius: 14px;
    font-size: .75rem;
    font-weight: 800;
}

.trust-strip {
    background: var(--mw-white);
    border-bottom: 1px solid var(--mw-line);
}

.trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.trust-strip-grid > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    min-height: 86px;
    padding: 1rem;
    border-right: 1px solid var(--mw-line);
}

.trust-strip-grid > div:last-child {
    border-right: 0;
}

.trust-strip-grid i {
    color: var(--mw-accent-dark);
    font-size: 1.15rem;
}

.trust-strip-grid strong,
.trust-strip-grid span span {
    display: block;
}

.trust-strip-grid strong {
    color: var(--mw-ink);
    font-size: .77rem;
}

.trust-strip-grid span {
    color: var(--mw-muted);
    font-size: .66rem;
    line-height: 1.35;
}

/* Sections */
.section {
    padding: 5.8rem 0;
}

.section-alt {
    background:
        linear-gradient(135deg, rgba(247, 243, 232, .92), rgba(255, 255, 255, .8)),
        var(--mw-cream);
    border-color: var(--mw-cream-deep);
}

.section-header {
    align-items: end;
    margin-bottom: 2.2rem;
}

.section-title-group {
    max-width: 680px;
}

.section-title-group h2 {
    margin: 0 0 .55rem;
    font-size: clamp(2rem, 3.5vw, 3.15rem);
    line-height: 1.12;
}

.section-title-group p {
    max-width: 610px;
    color: var(--mw-body);
    font-size: .92rem;
    line-height: 1.7;
}

/* Topic cards */
.premium-topics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.premium-topic-card {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 240px;
    padding: 1.25rem;
    flex-direction: column;
    color: var(--mw-ink);
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 22px;
    box-shadow: var(--mw-shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.premium-topic-card::after {
    position: absolute;
    top: -65px;
    right: -65px;
    width: 130px;
    height: 130px;
    content: "";
    background: var(--mw-primary-soft);
    border-radius: 50%;
    transition: transform .3s ease;
}

.premium-topic-card:hover {
    color: var(--mw-ink);
    border-color: var(--mw-accent);
    box-shadow: var(--mw-shadow-md);
    transform: translateY(-6px);
}

.premium-topic-card:hover::after {
    transform: scale(1.25);
}

.topic-card-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.topic-icon-wrapper {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border: 1px solid #cde1d3;
    border-radius: 15px;
    font-size: 1.1rem;
}

.topic-count-pill {
    min-width: 31px;
    padding: .25rem .45rem;
    color: var(--mw-accent-dark);
    background: #f2f7f3;
    border: 1px solid var(--mw-line);
    border-radius: var(--radius-pill);
    font-size: .64rem;
    font-weight: 800;
    text-align: center;
}

.topic-card-body {
    position: relative;
    z-index: 2;
}

.topic-title {
    margin-bottom: .45rem;
    color: var(--mw-ink);
    font-size: 1.02rem;
    line-height: 1.4;
}

.topic-desc {
    color: var(--mw-muted);
    font-size: .73rem;
    line-height: 1.55;
}

.topic-card-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: .9rem;
    color: var(--mw-primary);
    border-top: 1px solid #edf1ed;
    font-size: .71rem;
    font-weight: 750;
}

/* Fatwa cards */
.fatwas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.fatwa-card {
    min-height: 310px;
    padding: 1.35rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 22px;
    box-shadow: var(--mw-shadow-sm);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.fatwa-card:hover {
    background: var(--mw-white);
    border-color: var(--mw-accent);
    box-shadow: var(--mw-shadow-md);
    transform: translateY(-5px);
}

.fatwa-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1rem;
}

.badge-topic {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: 72%;
    padding: .25rem .55rem;
    overflow: hidden;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border: 1px solid #d2e4d7;
    border-radius: var(--radius-pill);
    font-size: .63rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    background: var(--mw-accent-dark);
    border-radius: 50%;
}

.badge-id {
    color: var(--mw-muted);
    font-size: .64rem;
    white-space: nowrap;
}

.fatwa-card-content {
    margin-bottom: 1.2rem;
}

.fatwa-title {
    margin: 0 0 .7rem;
    font-size: 1.05rem;
    line-height: 1.45;
}

.fatwa-title a {
    color: var(--mw-ink);
}

.fatwa-title a:hover {
    color: var(--mw-primary);
}

.fatwa-excerpt {
    margin: 0;
    color: var(--mw-body);
    font-size: .78rem;
    line-height: 1.7;
    -webkit-line-clamp: 3;
}

.fatwa-footer {
    padding-top: 1rem;
    border-top: 1px solid #e9efea;
}

.writer-info {
    min-width: 0;
    gap: .55rem;
}

.writer-mini-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-cream);
    border: 1px solid var(--mw-cream-deep);
    border-radius: 50%;
}

.writer-info > span:last-child {
    min-width: 0;
}

.writer-info small,
.writer-info strong,
.writer-info a {
    display: block;
    overflow: hidden;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.writer-info small {
    margin-bottom: .15rem;
    color: var(--mw-muted);
    font-size: .58rem;
    font-weight: 600;
}

.writer-info strong,
.writer-info a {
    max-width: 180px;
    color: var(--mw-ink);
    font-size: .68rem;
    font-weight: 750;
}

.card-arrow {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border: 1px solid #d2e4d7;
    border-radius: 50%;
}

.card-arrow:hover {
    color: var(--mw-white);
    background: var(--mw-primary);
    transform: rotate(5deg);
}

/* Scholar cards */
.writers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.writer-card {
    padding: 1.35rem;
    text-align: left;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 22px;
    box-shadow: var(--mw-shadow-sm);
}

.writer-card:hover {
    border-color: var(--mw-accent);
    box-shadow: var(--mw-shadow-md);
    transform: translateY(-5px);
}

.writer-card-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.writer-avatar {
    display: grid;
    overflow: hidden;
    width: 64px;
    height: 64px;
    margin: 0;
    place-items: center;
    color: var(--mw-primary);
    background: linear-gradient(145deg, var(--mw-primary-soft), var(--mw-cream));
    border: 2px solid var(--mw-white);
    border-radius: 20px;
    outline: 1px solid var(--mw-line);
    box-shadow: none;
    font-size: 1.35rem;
    font-weight: 800;
}

.writer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.verified-icon {
    color: var(--mw-accent-dark);
    font-size: 1.05rem;
}

.writer-name {
    margin: 0 0 .35rem;
    color: var(--mw-ink);
    font-size: .96rem;
    line-height: 1.4;
}

.writer-name a {
    color: inherit;
}

.writer-role {
    margin-bottom: .3rem;
    color: var(--mw-primary);
    font-size: .7rem;
    line-height: 1.45;
}

.writer-inst {
    min-height: 2.7em;
    margin-bottom: .9rem;
    color: var(--mw-muted);
    font-size: .67rem;
    line-height: 1.45;
}

.writer-profile-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: auto;
    color: var(--mw-primary);
    font-size: .72rem;
    font-weight: 750;
}

.writer-bio {
    margin: .75rem 0 1rem;
    color: var(--mw-body);
    font-size: .72rem;
    line-height: 1.65;
}

.writer-directory-card {
    min-height: 365px;
}

.writer-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: auto;
    padding-top: .85rem;
    color: var(--mw-muted);
    border-top: 1px solid var(--mw-line);
    font-size: .65rem;
}

.writer-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-weight: 750;
}

/* Ask form */
.ask-layout {
    display: grid;
    grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

.ask-intro {
    position: sticky;
    top: 120px;
    padding: 2.2rem;
    color: #dcece0;
    background:
        radial-gradient(circle at 100% 0, rgba(138, 191, 147, .3), transparent 15rem),
        linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
    border-radius: 26px;
    box-shadow: var(--mw-shadow-md);
}

.ask-intro h2 {
    margin-bottom: 1rem;
    color: var(--mw-white);
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.12;
}

.ask-intro > p {
    color: #c2dac9;
    font-size: .88rem;
}

.feature-list {
    display: grid;
    gap: .7rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #e7f1ea;
    font-size: .76rem;
}

.feature-list i {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--mw-primary-dark);
    background: #cfe7d5;
    border-radius: 50%;
}

.front-ask-fatwa-card {
    padding: clamp(1.5rem, 4vw, 2.3rem);
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 26px;
    box-shadow: var(--mw-shadow-md);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    margin-bottom: .4rem;
    color: var(--mw-ink);
    font-size: .72rem;
    font-weight: 750;
}

.form-group label span {
    color: var(--mw-danger);
}

.form-control,
.directory-filter input,
.directory-filter select,
.not-found-search input {
    width: 100%;
    min-height: 50px;
    padding: .75rem .9rem;
    color: var(--mw-ink);
    background: #fbfcfa;
    border: 1px solid var(--mw-line-strong);
    border-radius: 13px;
    font-family: inherit;
    font-size: .8rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

textarea.form-control {
    min-height: 145px;
    resize: vertical;
}

.form-control:focus,
.directory-filter input:focus,
.directory-filter select:focus,
.not-found-search input:focus {
    background: var(--mw-white);
    border-color: var(--mw-accent-dark);
    box-shadow: 0 0 0 4px rgba(138, 191, 147, .14);
}

.field-help {
    margin-top: .38rem;
    color: var(--mw-muted);
    font-size: .65rem;
    line-height: 1.5;
}

.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .35rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--mw-line);
}

.form-privacy {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--mw-muted);
    font-size: .66rem;
}

.form-privacy i {
    color: var(--mw-accent-dark);
}

.form-response-alert {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border: 1px solid;
    border-radius: 13px;
    font-size: .75rem;
}

.form-response-alert.alert-success {
    color: #1d6745;
    background: #eaf6ee;
    border-color: #bcdcc7;
}

.form-response-alert.alert-error {
    color: #983737;
    background: #fff0f0;
    border-color: #e9bebe;
}

.ask-page-layout {
    display: grid;
    grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr);
    gap: 2rem;
    align-items: start;
}

.ask-guidance-card {
    position: sticky;
    top: 120px;
    padding: 1.7rem;
    background: var(--mw-cream);
    border: 1px solid var(--mw-cream-deep);
    border-radius: 22px;
}

.guidance-icon,
.side-card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 15px;
}

.ask-guidance-card h2 {
    margin-bottom: .6rem;
    font-size: 1.35rem;
}

.ask-guidance-card > p {
    color: var(--mw-body);
    font-size: .78rem;
}

.numbered-list {
    display: grid;
    gap: .9rem;
    margin: 1.3rem 0;
    padding: 0;
    list-style: none;
}

.numbered-list li {
    display: flex;
    gap: .7rem;
}

.numbered-list li > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--mw-white);
    background: var(--mw-primary);
    border-radius: 9px;
    font-size: .65rem;
    font-weight: 800;
}

.numbered-list strong {
    display: block;
    color: var(--mw-ink);
    font-size: .72rem;
}

.numbered-list p {
    margin: .15rem 0 0;
    color: var(--mw-muted);
    font-size: .65rem;
    line-height: 1.45;
}

.privacy-callout {
    display: flex;
    gap: .55rem;
    padding: .75rem;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-radius: 12px;
    font-size: .67rem;
    line-height: 1.5;
}

.form-card-heading {
    margin-bottom: 1.4rem;
}

.form-card-heading > span {
    color: var(--mw-accent-dark);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.form-card-heading h2 {
    margin-top: .3rem;
    font-size: 1.55rem;
}

/* Page headers */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 4rem;
    background:
        radial-gradient(circle at 82% 0, rgba(138, 191, 147, .28), transparent 20rem),
        linear-gradient(135deg, #fff, var(--mw-cream));
    border-bottom: 1px solid var(--mw-cream-deep);
}

.page-hero::after {
    position: absolute;
    right: 5%;
    bottom: -80px;
    width: 230px;
    height: 230px;
    content: "";
    border: 1px solid rgba(76, 143, 103, .12);
    border-radius: 50%;
}

.page-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.page-hero-inner > div:first-child {
    max-width: 740px;
}

.page-hero h1 {
    margin: 0 0 .7rem;
    font-size: clamp(2.6rem, 5vw, 4.7rem);
    line-height: 1.05;
}

.page-hero p,
.archive-description {
    max-width: 650px;
    color: var(--mw-body);
    font-size: .95rem;
}

.page-hero-centered .page-hero-inner {
    justify-content: center;
    text-align: center;
}

.page-hero-centered .page-hero-inner > div {
    max-width: 750px;
}

.page-hero-centered p {
    margin-right: auto;
    margin-left: auto;
}

.compact-page-hero {
    padding: 3.8rem 0 3.2rem;
}

.archive-count-card {
    min-width: 150px;
    padding: 1.1rem 1.2rem;
    background: rgba(255, 255, 255, .76);
    border: 1px solid var(--mw-line);
    border-radius: 18px;
    box-shadow: var(--mw-shadow-sm);
    text-align: center;
}

.archive-count-card strong,
.archive-count-card span {
    display: block;
}

.archive-count-card strong {
    color: var(--mw-primary);
    font-size: 1.8rem;
    line-height: 1;
}

.archive-count-card span {
    margin-top: .35rem;
    color: var(--mw-muted);
    font-size: .65rem;
}

/* Directory */
.directory-filter {
    margin-bottom: 1.5rem;
    padding: 1.1rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 20px;
    box-shadow: var(--mw-shadow-sm);
}

.directory-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--mw-line);
}

.directory-search > i {
    margin-left: .35rem;
    color: var(--mw-accent-dark);
}

.directory-search input {
    min-height: 48px;
    background: #f8faf8;
}

.directory-filter-row {
    display: flex;
    align-items: end;
    gap: .75rem;
    padding-top: 1rem;
}

.filter-field {
    flex: 1 1 220px;
}

.filter-field label {
    display: block;
    margin: 0 0 .3rem .2rem;
    color: var(--mw-muted);
    font-size: .64rem;
    font-weight: 750;
    text-transform: uppercase;
}

.directory-filter select {
    min-height: 44px;
    padding: .55rem .75rem;
}

.filter-apply {
    min-height: 44px;
}

.filter-reset {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    padding: .55rem .45rem;
    color: var(--mw-muted);
    font-size: .72rem;
    font-weight: 700;
}

.active-filter-note {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.2rem;
    color: var(--mw-body);
    font-size: .72rem;
}

.active-filter-note i {
    color: var(--mw-accent-dark);
}

.archive-fatwas-grid {
    margin-top: 1rem;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 3rem 1.5rem;
    color: var(--mw-body);
    background: rgba(255, 255, 255, .72);
    border: 1px dashed var(--mw-line-strong);
    border-radius: 22px;
    text-align: center;
}

.empty-state > i,
.empty-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-radius: 18px;
    font-size: 1.25rem;
}

.empty-state h2,
.empty-state h3 {
    margin-bottom: .4rem;
}

.empty-state p {
    margin: 0 auto;
    max-width: 500px;
    color: var(--mw-muted);
    font-size: .8rem;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: .7rem;
    margin-top: 1.2rem;
}

.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 2.5rem;
}

.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: .5rem .75rem;
    color: var(--mw-primary);
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 750;
}

.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
    color: var(--mw-white);
    background: var(--mw-primary);
    border-color: var(--mw-primary);
}

.pagination-wrap .prev,
.pagination-wrap .next {
    gap: .35rem;
}

/* Fatwa reader */
.reader-hero {
    padding: 2.4rem 0 3.2rem;
    color: #dbeadf;
    background:
        radial-gradient(circle at 86% 0, rgba(138, 191, 147, .25), transparent 22rem),
        linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
}

.reader-container {
    max-width: 930px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 2.2rem;
    color: #a8cbb2;
    font-size: .66rem;
}

.breadcrumbs a {
    color: #cfe1d4;
}

.breadcrumbs a:hover {
    color: var(--mw-white);
}

.reader-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.verified-seal {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .65rem;
    color: var(--mw-primary-dark);
    background: #cfe7d5;
    border-radius: var(--radius-pill);
    font-size: .66rem;
    font-weight: 800;
}

.reader-heading .badge-topic {
    color: #dcece0;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .15);
}

.reader-heading h1 {
    max-width: 850px;
    margin: 0 0 .9rem;
    color: var(--mw-white);
    font-size: clamp(2.35rem, 5vw, 4.2rem);
    line-height: 1.12;
}

.reader-title-urdu {
    margin-bottom: 1rem;
    color: #dcece0;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    line-height: 1.8;
}

.reader-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #a8cbb2;
    font-size: .68rem;
}

.reader-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.reader-section {
    padding-top: 0;
    background: linear-gradient(to bottom, var(--mw-primary-dark) 68px, transparent 68px);
}

.fatwa-reader-card {
    overflow: hidden;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 26px;
    box-shadow: var(--mw-shadow-lg);
}

.reader-question,
.reader-answer {
    padding: clamp(1.5rem, 5vw, 3.2rem);
}

.reader-question {
    background: linear-gradient(135deg, rgba(247, 243, 232, .86), rgba(255, 255, 255, .9));
    border-bottom: 1px solid var(--mw-line);
}

.reader-section-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.3rem;
}

.reader-section-label > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--mw-white);
    background: var(--mw-primary);
    border-radius: 12px;
    font-size: .68rem;
    font-weight: 800;
}

.reader-section-label small,
.reader-section-label strong {
    display: block;
}

.reader-section-label small {
    color: var(--mw-muted);
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.reader-section-label strong {
    color: var(--mw-ink);
    font-size: .9rem;
}

.question-roman {
    margin: 0;
    color: var(--mw-ink);
    font-size: 1rem;
    line-height: 1.85;
}

.question-urdu {
    margin-top: 1.2rem;
    padding: 1.2rem;
    color: var(--mw-ink);
    background: var(--mw-white);
    border-right: 4px solid var(--mw-accent-dark);
    border-radius: 14px;
    font-size: 1.05rem;
    line-height: 2;
}

.question-urdu span {
    display: block;
    margin-bottom: .35rem;
    color: var(--mw-accent-dark);
    font-size: .72rem;
    font-weight: 800;
}

.fatwa-answer-box {
    padding: 0;
    color: var(--mw-ink);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 1rem;
    line-height: 2;
}

.prose-content > * + * {
    margin-top: 1em;
}

.prose-content h2,
.prose-content h3,
.prose-content h4 {
    margin-top: 1.7em;
    margin-bottom: .55em;
    line-height: 1.3;
}

.prose-content ul,
.prose-content ol {
    padding-left: 1.35rem;
}

.prose-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-left: 4px solid var(--mw-primary);
    border-radius: 0 14px 14px 0;
}

.prose-content a {
    text-decoration: underline;
    text-decoration-color: var(--mw-accent);
    text-underline-offset: 3px;
}

.scholar-signature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 clamp(1.5rem, 5vw, 3.2rem);
    padding: 1.2rem 0;
    border-top: 1px solid var(--mw-line);
    border-bottom: 1px solid var(--mw-line);
}

.scholar-signature-mark {
    display: grid;
    overflow: hidden;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-radius: 17px;
    font-size: 1.1rem;
    font-weight: 800;
}

.scholar-signature-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scholar-signature-copy {
    min-width: 0;
    flex: 1;
}

.scholar-signature-copy small,
.scholar-signature-copy strong,
.scholar-signature-copy span {
    display: block;
}

.scholar-signature-copy small {
    color: var(--mw-muted);
    font-size: .62rem;
}

.scholar-signature-copy strong {
    color: var(--mw-ink);
    font-size: .82rem;
}

.scholar-signature-copy strong i {
    margin-left: .35rem;
    color: var(--mw-accent-dark);
}

.scholar-signature-copy span {
    color: var(--mw-muted);
    font-size: .66rem;
}

.reader-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem clamp(1.5rem, 5vw, 3.2rem);
}

.reader-actions > span {
    color: var(--mw-muted);
    font-size: .7rem;
}

.reader-actions > div {
    display: flex;
    gap: .45rem;
}

.reader-actions .btn {
    min-height: 40px;
    padding: .55rem .85rem;
    font-size: .68rem;
}

.reader-disclaimer {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    color: var(--mw-body);
    background: var(--mw-cream);
    border: 1px solid var(--mw-cream-deep);
    border-radius: 15px;
    font-size: .7rem;
}

.reader-disclaimer i {
    color: var(--mw-accent-dark);
}

.reader-disclaimer p {
    margin: 0;
}

.related-section {
    margin-top: 4rem;
}

/* Scholar profile */
.scholar-profile-hero {
    padding: 5rem 0;
    color: #dcece0;
    background:
        radial-gradient(circle at 82% 0, rgba(138, 191, 147, .26), transparent 22rem),
        linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
}

.scholar-hero-grid {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.scholar-photo {
    position: relative;
    display: grid;
    overflow: visible;
    width: 220px;
    height: 250px;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-cream);
    border: 7px solid rgba(255, 255, 255, .12);
    border-radius: 30px;
    box-shadow: var(--mw-shadow-lg);
    font-size: 4rem;
    font-weight: 800;
}

.scholar-photo > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 23px;
}

.scholar-photo-check {
    position: absolute;
    right: -12px;
    bottom: 22px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--mw-primary);
    background: #cfe7d5;
    border: 5px solid var(--mw-primary);
    border-radius: 50%;
}

.scholar-hero-copy h1 {
    margin: 0 0 .4rem;
    color: var(--mw-white);
    font-size: clamp(2.7rem, 5vw, 4.5rem);
    line-height: 1.08;
}

.scholar-name-urdu {
    margin-bottom: .55rem;
    color: #d5e8da;
    font-size: 1.4rem;
}

.scholar-role-large {
    color: #dcece0;
    font-size: .9rem;
    font-weight: 750;
}

.scholar-institution {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: .35rem;
    color: #9fc1aa;
    font-size: .72rem;
}

.scholar-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.4rem;
    padding: .55rem .8rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
}

.scholar-hero-stat strong {
    color: var(--mw-white);
    font-size: 1.1rem;
}

.scholar-hero-stat span {
    color: #b4cfbc;
    font-size: .66rem;
}

.scholar-bio-card {
    max-width: 880px;
    padding: 2.2rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 24px;
    box-shadow: var(--mw-shadow-sm);
}

.scholar-bio-card h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.scholar-answers-header {
    margin-top: 4rem;
}

/* About and generic content */
.about-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 3rem;
    align-items: center;
}

.about-hero-grid > div:first-child {
    max-width: 730px;
}

.about-hero-mark {
    display: grid;
    min-height: 210px;
    padding: 1.5rem;
    place-items: center;
    color: #dcece0;
    background: linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
    border-radius: 26px;
    box-shadow: var(--mw-shadow-md);
    text-align: center;
}

.about-hero-mark i {
    font-size: 3rem;
}

.about-hero-mark span {
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .05em;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    align-items: start;
}

.about-content > h2 {
    max-width: 780px;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.15;
}

.lead {
    max-width: 800px;
    color: var(--mw-body);
    font-size: 1rem;
    line-height: 1.85;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.value-card {
    padding: 1.4rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 20px;
    box-shadow: var(--mw-shadow-sm);
}

.value-card > i {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: .85rem;
    place-items: center;
    color: var(--mw-primary);
    background: var(--mw-primary-soft);
    border-radius: 13px;
}

.value-card h3 {
    margin-bottom: .4rem;
    font-size: .95rem;
}

.value-card p {
    margin: 0;
    color: var(--mw-muted);
    font-size: .72rem;
    line-height: 1.6;
}

.method-card {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--mw-cream);
    border: 1px solid var(--mw-cream-deep);
    border-radius: 24px;
}

.method-card > h2 {
    max-width: 620px;
    margin-bottom: 1.5rem;
    font-size: 1.7rem;
}

.method-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.method-steps > div {
    padding: 1rem;
    background: rgba(255, 255, 255, .65);
    border: 1px solid rgba(202, 216, 207, .7);
    border-radius: 15px;
}

.method-steps > div > span {
    color: var(--mw-accent-dark);
    font-size: .65rem;
    font-weight: 800;
}

.method-steps h3 {
    margin: .25rem 0;
    font-size: .86rem;
}

.method-steps p {
    margin: 0;
    color: var(--mw-muted);
    font-size: .66rem;
    line-height: 1.55;
}

.about-sidebar {
    position: sticky;
    top: 110px;
}

.about-side-card,
.sidebar-widget {
    margin-bottom: 1rem;
    padding: 1.4rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 20px;
    box-shadow: var(--mw-shadow-sm);
}

.about-side-card h3 {
    margin-bottom: .45rem;
    font-size: 1rem;
}

.about-side-card p {
    color: var(--mw-muted);
    font-size: .72rem;
    line-height: 1.6;
}

.about-side-card .btn {
    width: 100%;
    margin-top: .6rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.content-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.content-sidebar {
    position: sticky;
    top: 110px;
}

.detail-card {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 22px;
    box-shadow: var(--mw-shadow-sm);
}

.page-featured-image {
    overflow: hidden;
    margin: -1rem -1rem 2rem;
    border-radius: 16px;
}

.post-list-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.4rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.post-list-image {
    overflow: hidden;
    min-height: 180px;
    border-radius: 16px;
}

.post-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-list-content {
    padding: .5rem .5rem .5rem 0;
}

.post-list-meta {
    margin-bottom: .3rem;
    color: var(--mw-muted);
    font-size: .65rem;
}

.post-list-content h2 {
    margin-bottom: .45rem;
    font-size: 1.35rem;
}

.post-list-content h2 a {
    color: var(--mw-ink);
}

.post-list-content p {
    color: var(--mw-body);
    font-size: .78rem;
}

.widget-search-form {
    display: flex;
    gap: .45rem;
}

.widget-search-form label {
    min-width: 0;
    flex: 1;
}

.widget-search-form .search-field {
    width: 100%;
    min-height: 44px;
    padding: .65rem .8rem;
    color: var(--mw-ink);
    background: #f8faf8;
    border: 1px solid var(--mw-line);
    border-radius: 12px;
}

.widget-search-form .btn {
    min-width: 44px;
    min-height: 44px;
    padding: .5rem;
}

/* 404 */
.not-found-section {
    display: grid;
    min-height: 70vh;
    padding: 4rem 0;
    place-items: center;
    background:
        radial-gradient(circle at 50% 20%, rgba(138, 191, 147, .23), transparent 20rem),
        linear-gradient(135deg, #fff, var(--mw-cream));
}

.not-found-card {
    max-width: 680px;
    text-align: center;
}

.not-found-number {
    display: block;
    color: var(--mw-primary);
    font-size: clamp(5rem, 13vw, 9rem);
    font-weight: 800;
    letter-spacing: -.08em;
    line-height: .85;
    opacity: .13;
}

.not-found-card h1 {
    margin-bottom: .6rem;
    font-size: clamp(2rem, 4vw, 3.3rem);
}

.not-found-card > p {
    color: var(--mw-body);
}

.not-found-search {
    display: flex;
    gap: .6rem;
    max-width: 550px;
    margin: 1.5rem auto 1rem;
    padding: .5rem;
    background: var(--mw-white);
    border: 1px solid var(--mw-line);
    border-radius: 18px;
    box-shadow: var(--mw-shadow-md);
}

.not-found-search input {
    border: 0;
}

/* Footer */
.pre-footer-cta {
    padding: 3.3rem 0;
    background:
        radial-gradient(circle at 80% 0, rgba(138, 191, 147, .26), transparent 18rem),
        linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
}

.pre-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.pre-footer-inner h2 {
    max-width: 700px;
    margin: 0;
    color: var(--mw-white);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.15;
}

.site-footer {
    margin: 0;
    padding: 4rem 0 1.5rem;
    color: #bdd0c3;
    background: #082d23;
    border-top: 0;
}

.footer-grid {
    grid-template-columns: 1.35fr .75fr .8fr .9fr;
    gap: 2.3rem;
    margin-bottom: 2.5rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
    color: var(--mw-white);
    font-size: 1rem;
    font-weight: 800;
}

.logo-icon-light {
    width: 40px;
    height: 40px;
    color: var(--mw-primary-dark);
    background: #cfe7d5;
    box-shadow: none;
}

.footer-brand p {
    max-width: 330px;
    color: #9bb8a4;
    font-size: .73rem;
}

.footer-socials {
    display: flex;
    gap: .4rem;
    margin-top: 1rem;
}

.footer-socials a {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #cfe1d4;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.footer-socials a:hover {
    color: var(--mw-primary-dark);
    background: #cfe7d5;
}

.footer-column h3,
.footer-widget-title {
    margin-bottom: .9rem;
    color: var(--mw-white);
    font-size: .78rem;
    letter-spacing: .01em;
}

.footer-links li {
    margin-bottom: .45rem;
}

.footer-links a,
.footer-widget a {
    color: #a8c1b0;
    font-size: .71rem;
}

.footer-links a:hover,
.footer-widget a:hover {
    padding-left: 0;
    color: var(--mw-white);
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .7rem;
    color: #a8c1b0;
    font-size: .7rem;
    word-break: break-word;
}

.footer-contact a i {
    color: #cfe7d5;
}

.footer-bottom {
    padding-top: 1.2rem;
    color: #769687;
    border-color: rgba(255, 255, 255, .08);
    font-size: .65rem;
}

.mobile-app-nav {
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--mw-line);
    box-shadow: 0 -12px 35px rgba(17, 71, 52, .1);
    backdrop-filter: blur(15px);
}

.mobile-nav-item,
.mobile-fab-container {
    color: var(--mw-muted);
}

.mobile-nav-item.active,
.mobile-fab-container.active {
    color: var(--mw-primary);
}

.mobile-fab-button {
    color: var(--mw-white);
    background: linear-gradient(145deg, var(--mw-primary), var(--mw-primary-dark));
    border-color: var(--mw-white);
    box-shadow: 0 8px 24px rgba(7, 95, 70, .27);
}

/* Toast */
.theme-toast {
    position: fixed;
    z-index: 10000;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .8rem 1rem;
    color: var(--mw-white);
    background: var(--mw-primary-dark);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    box-shadow: var(--mw-shadow-lg);
    font-size: .72rem;
    opacity: 0;
    transform: translateY(12px);
    transition: .25s ease;
}

.theme-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.theme-toast.is-error {
    background: #7e3030;
}

/* Responsive */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
        gap: 2.5rem;
    }

    .premium-topics-grid,
    .writers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.2fr repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 991px) {
    body {
        padding-bottom: 70px;
    }

    .desktop-navigation,
    .header-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: grid;
        place-items: center;
    }

    .mobile-app-nav {
        display: block;
    }

    .hero-section {
        min-height: auto;
        padding: 4.5rem 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        max-width: none;
    }

    .hero-insight-card {
        max-width: 620px;
    }

    .trust-strip-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-strip-grid > div:nth-child(2) {
        border-right: 0;
    }

    .trust-strip-grid > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--mw-line);
    }

    .fatwas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ask-layout,
    .ask-page-layout,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .ask-intro,
    .ask-guidance-card,
    .about-sidebar,
    .content-sidebar {
        position: static;
    }

    .content-layout.has-sidebar {
        grid-template-columns: 1fr;
    }

    .about-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .scholar-hero-grid {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 2rem;
    }

    .scholar-photo {
        width: 180px;
        height: 210px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .container,
    .nav-container {
        width: min(100% - 28px, 1180px);
    }

    .top-notice-bar {
        min-height: 34px;
    }

    .notice-inner {
        gap: .45rem;
    }

    .notice-inner > span:last-child {
        overflow: hidden;
        max-width: 70vw;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-container {
        min-height: 70px;
    }

    .brand-text span {
        display: none;
    }

    .hero-section {
        padding: 3.6rem 0;
    }

    .hero-title {
        font-size: clamp(2.55rem, 13vw, 3.8rem);
    }

    .hero-subtitle {
        font-size: .9rem;
    }

    .main-search-card {
        min-height: 62px;
        padding-left: .85rem;
        border-radius: 17px;
    }

    .search-icon-btn {
        min-width: 54px;
        width: 54px;
        height: 48px;
        padding: 0;
    }

    .search-icon-btn span {
        display: none;
    }

    .quick-tags-container {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-stat-grid {
        gap: .35rem;
    }

    .hero-stat-grid > div {
        padding: .65rem .45rem;
    }

    .section {
        padding: 4.2rem 0;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 1.6rem;
    }

    .premium-topics-grid,
    .fatwas-grid,
    .writers-grid,
    .value-grid,
    .method-steps {
        grid-template-columns: 1fr;
    }

    .premium-topic-card {
        min-height: 215px;
    }

    .fatwa-card {
        min-height: 285px;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-submit-row,
    .pre-footer-inner,
    .reader-actions,
    .page-hero-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .form-submit-row .btn,
    .pre-footer-inner .btn {
        width: 100%;
    }

    .page-hero {
        padding: 4rem 0 3rem;
    }

    .archive-count-card {
        align-self: flex-start;
    }

    .directory-search {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .directory-search .btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .directory-filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-field {
        width: 100%;
        flex: 0 0 auto;
    }

    .filter-apply {
        width: 100%;
    }

    .scholar-signature {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .scholar-signature .btn {
        width: 100%;
    }

    .reader-actions > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .about-hero-grid {
        grid-template-columns: 1fr;
    }

    .about-hero-mark {
        min-height: 170px;
    }

    .about-sidebar {
        grid-template-columns: 1fr;
    }

    .scholar-profile-hero {
        padding: 3.5rem 0;
    }

    .scholar-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .scholar-photo {
        width: 160px;
        height: 185px;
        margin: 0 auto;
    }

    .scholar-institution {
        justify-content: center;
    }

    .post-list-card {
        grid-template-columns: 1fr;
    }

    .post-list-image {
        max-height: 230px;
    }

    .not-found-search {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-toast {
        right: 14px;
        bottom: 88px;
        left: 14px;
    }
}

@media (max-width: 420px) {
    .brand-logo {
        min-width: 0;
    }

    .brand-text strong {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-insight-card {
        padding: 1rem;
        border-radius: 22px;
    }

    .hero-stat-grid span {
        font-size: .55rem;
    }

    .trust-strip-grid > div {
        min-height: 78px;
        padding: .75rem .45rem;
    }

    .reader-badges,
    .reader-meta {
        gap: .45rem;
    }

    .reader-heading h1 {
        font-size: 2.2rem;
    }
}

@media print {
    .top-notice-bar,
    .site-header,
    .pre-footer-cta,
    .site-footer,
    .mobile-app-nav,
    .reader-actions,
    .reader-disclaimer,
    .related-section,
    .breadcrumbs {
        display: none !important;
    }

    body {
        padding: 0;
        color: #000;
        background: #fff;
    }

    .reader-hero {
        padding: 1rem 0;
        color: #000;
        background: #fff;
    }

    .reader-heading h1,
    .reader-title-urdu,
    .reader-meta {
        color: #000;
    }

    .reader-section {
        padding: 0;
        background: #fff;
    }

    .fatwa-reader-card {
        border: 0;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
