:root {
    --bg: #f6f7f3;
    --surface: #ffffff;
    --surface-soft: #f0f5ed;
    --ink: #142219;
    --muted: #687568;
    --brand: #116238;
    --brand-dark: #064324;
    --brand-soft: #e9f3ec;
    --accent: #b98524;
    --accent-soft: #fbf3df;
    --line: #dbe4d8;
    --danger: #b42318;
    --shadow: 0 18px 50px rgba(17, 45, 31, 0.12);
    --shadow-soft: 0 10px 28px rgba(17, 45, 31, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        linear-gradient(135deg, rgba(6, 67, 36, 0.035) 25%, transparent 25%) 0 0 / 38px 38px,
        radial-gradient(circle at top right, rgba(185, 133, 36, 0.13), transparent 34rem),
        linear-gradient(180deg, #fbfcf8 0%, var(--bg) 45%, #eef3ed 100%);
    color: var(--ink);
    font-family: 'Noto Nastaliq Urdu', 'Noto Sans Urdu', serif;
    line-height: 1.85;
    margin: 0;
    min-height: 100vh;
}

a {
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

.navbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(21, 34, 27, 0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 10px clamp(16px, 4vw, 54px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-brand {
    color: var(--brand-dark);
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.menu-toggle {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--brand-dark);
    cursor: pointer;
    display: none;
    font-size: 24px;
    height: 42px;
    line-height: 1;
    width: 42px;
}

.nav-links {
    align-items: center;
    display: flex;
    gap: 6px;
}

.nav-links a {
    border-radius: 6px;
    color: var(--ink);
    font-size: 16px;
    padding: 8px 14px;
    text-decoration: none;
    transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    background: var(--surface-soft);
    color: var(--brand-dark);
}

.nav-links a.active {
    background: var(--brand-soft);
    border: 1px solid rgba(17, 98, 56, 0.26);
    color: var(--brand-dark);
    font-weight: 700;
}

.page-shell {
    margin: 0 auto;
    max-width: 1240px;
    padding: 30px clamp(16px, 3vw, 32px) 10px;
}

.hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.08), transparent 40%),
        linear-gradient(135deg, rgba(6, 67, 36, 0.95), rgba(17, 98, 56, 0.92));
    background-position: center;
    background-size: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: #fff;
    margin-bottom: 24px;
    overflow: hidden;
    min-height: 310px;
    padding: clamp(38px, 7vw, 84px);
    position: relative;
}

.hero::after {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: calc(var(--radius) - 2px);
    content: "";
    inset: 14px;
    pointer-events: none;
    position: absolute;
}

.hero-kicker {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    font-family: 'Noto Sans Urdu', sans-serif;
    font-size: 13px;
    margin-bottom: 18px;
    padding: 5px 14px;
}

.hero h1 {
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.55;
    margin: 0 0 12px;
    max-width: 900px;
}

.hero p {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
    margin: 0;
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-actions .btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
    color: #fff;
}

.layout-grid {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.panel,
.fatwa-card,
.article-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.panel {
    padding: 24px;
}

.section-title {
    align-items: center;
    color: var(--brand-dark);
    display: flex;
    font-size: clamp(23px, 3vw, 34px);
    justify-content: space-between;
    margin: 0 0 18px;
}

.section-title small {
    font-family: 'Noto Sans Urdu', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.eyebrow {
    color: var(--accent);
    font-family: 'Noto Sans Urdu', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 6px;
}

.muted {
    color: var(--muted);
}

.search-form {
    display: flex;
    gap: 10px;
    margin: 0 0 20px;
}

.search-panel {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin: -58px auto 24px;
    max-width: 920px;
    padding: 18px;
    position: relative;
    z-index: 2;
}

.search-form input,
.form-control,
input,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;
    min-height: 48px;
    padding: 10px 14px;
    width: 100%;
}

input:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(17, 98, 56, 0.1);
    outline: none;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button,
.btn {
    align-items: center;
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 16px;
    justify-content: center;
    min-height: 46px;
    padding: 8px 18px;
    text-decoration: none;
    transition: 0.2s ease;
}

button:hover,
.btn:hover {
    background: var(--brand-dark);
}

.btn.secondary {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--brand-dark);
}

.btn.gold {
    background: var(--accent);
}

.btn.danger {
    background: var(--danger);
}

.fatwa-list {
    display: grid;
    gap: 14px;
}

.fatwa-card {
    display: block;
    padding: 22px 24px;
    position: relative;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fatwa-card::before {
    background: linear-gradient(180deg, var(--brand), var(--accent));
    border-radius: 99px;
    content: "";
    height: calc(100% - 32px);
    inset-block-start: 16px;
    inset-inline-start: 0;
    position: absolute;
    width: 4px;
}

.fatwa-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.fatwa-card h2,
.fatwa-card h3 {
    color: var(--brand-dark);
    font-size: clamp(22px, 2.4vw, 29px);
    margin: 0 0 8px;
}

.fatwa-card p {
    color: #27352c;
    margin: 0 0 12px;
}

.meta-row {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 10px 18px;
}

.meta-pill {
    background: var(--surface-soft);
    border-radius: 999px;
    color: var(--brand-dark);
    padding: 2px 10px;
}

.sidebar {
    display: grid;
    gap: 16px;
}

.sidebar .panel {
    overflow: hidden;
}

.sidebar h3 {
    color: var(--brand-dark);
    font-size: 22px;
    margin: 0 0 12px;
}

.sidebar .panel h3::after {
    background: var(--accent);
    content: "";
    display: block;
    height: 2px;
    margin-top: 8px;
    width: 52px;
}

.sidebar a:not(.btn) {
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: block;
    padding: 9px 0;
    text-decoration: none;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 22px;
}

.pagination a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    min-width: 42px;
    padding: 7px 12px;
    text-align: center;
    text-decoration: none;
}

.pagination a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.article-card {
    margin: 0 auto;
    max-width: 940px;
    padding: clamp(20px, 4vw, 38px);
}

.article-card h1 {
    color: var(--brand-dark);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.65;
    margin: 0 0 16px;
}

.article-block {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.article-block h2 {
    color: var(--accent);
    font-size: 22px;
    margin: 0 0 8px;
}

.article-text {
    font-size: clamp(18px, 2vw, 21px);
    white-space: pre-line;
}

.form-card {
    margin: 0 auto;
    max-width: 760px;
}

.stats-strip {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 22px;
}

.category-section {
    margin-bottom: 24px;
}

.category-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card {
    background: linear-gradient(180deg, #fff, #f7faf5);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    transition: 0.2s ease;
}

.category-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

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

.category-card strong {
    color: var(--brand-dark);
    font-size: 21px;
}

.category-card span {
    color: var(--muted);
    font-family: 'Noto Sans Urdu', sans-serif;
    font-size: 13px;
    margin-top: 4px;
}

.stat-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 16px;
}

.stat-box strong {
    color: var(--brand-dark);
    display: block;
    font-family: 'Noto Sans Urdu', sans-serif;
    font-size: 24px;
}

.stat-box span {
    color: var(--muted);
    font-size: 14px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

label {
    color: var(--brand-dark);
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.message {
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.message.success {
    background: #e7f6e9;
    color: #17613a;
}

.message.error {
    background: #fdecec;
    color: var(--danger);
}

.site-footer {
    background:
        radial-gradient(circle at 10% 30%, rgba(255, 255, 255, 0.08), transparent 35%),
        linear-gradient(135deg, rgba(6, 67, 36, 0.98), rgba(15, 83, 48, 0.98));
    background-position: center;
    background-size: cover;
    color: #fff;
    margin-top: 42px;
    padding: 42px clamp(18px, 4vw, 56px) 18px;
    position: relative;
}

.footer-inner {
    display: grid;
    gap: 26px;
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 1fr));
    margin: 0 auto;
    max-width: 1240px;
}

.footer-about h2,
.footer-column h3 {
    color: #fff;
    margin: 0 0 12px;
}

.footer-about h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.footer-about p,
.footer-column p {
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

.footer-column a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    display: block;
    padding: 7px 0;
    text-decoration: none;
}

.footer-column a:hover {
    color: #fff;
}

.footer-whatsapp {
    color: #d7f8df !important;
    font-family: 'Noto Sans Urdu', sans-serif;
    font-weight: 700;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 30px auto 18px;
    max-width: 1240px;
}

.footer-social a {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    text-decoration: none;
    transition: 0.2s ease;
    width: 36px;
}

.footer-social svg {
    display: block;
    height: 16px;
    width: 16px;
}

.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.76);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1240px;
    padding-top: 16px;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    body {
        background: linear-gradient(180deg, #fbfcf8 0%, #f3f6f1 100%);
    }

    .navbar {
        align-items: flex-start;
        position: static;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 8px;
        display: none;
        flex-direction: column;
        margin-top: 8px;
        padding: 6px;
        width: 100%;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        text-align: right;
        width: 100%;
    }

    .search-form {
        flex-direction: column;
    }

    .hero {
        border-radius: 6px;
        padding: 28px 20px;
        min-height: auto;
    }

    .hero::after {
        display: none;
    }

    .search-panel {
        box-shadow: none;
        margin-top: -20px;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

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

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

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}
