@font-face {
    font-family: "Cairo";
    src: url("../fonts/cairo/Cairo-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("../fonts/cairo/Cairo-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("../fonts/cairo/Cairo-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("../fonts/cairo/Cairo-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --background: #fffcf8;
    --surface: #ffffff;
    --surface-soft: #faf7f2;
    --primary: #e07b39;
    --primary-strong: #d06a28;
    --primary-soft: #fff3e8;
    --accent: #f5a623;
    --text: #1c1b1f;
    --text-muted: #6b6573;
    --text-soft: #9e9aa3;
    --border: #e8e1d8;
    --divider: #f0e8df;
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.07);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.05);
    --video: #ef4444;
    --audio: #0284c7;
    --hadith: #eff7ea;
    --poem: #f7eee7;
    --radius-card: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--background);
    color: var(--text);
    font-family: "Cairo", "IBM Plex Sans Arabic", "Tajawal", "Noto Naskh Arabic", Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top right, rgba(245, 166, 35, 0.08), transparent 28rem),
        var(--background);
    color: var(--text);
    font-size: 16px;
    line-height: 1.75;
}

img,
iframe,
audio {
    max-width: 100%;
}

img {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.narrow-container {
    width: min(100% - 32px, 860px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 252, 248, 0.92);
    border-bottom: 1px solid var(--divider);
    backdrop-filter: blur(14px);
}

.header-inner {
    position: relative;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 0 0 auto;
}

.brand-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.brand-mark img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong {
    font-size: 19px;
    font-weight: 800;
}

.brand-copy small {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.primary-nav a {
    padding: 9px 13px;
    color: var(--text-muted);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: var(--primary);
    background: rgba(224, 123, 57, 0.09);
    outline: none;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.nav-toggle span:not(.sr-only) {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--text);
}

.site-main {
    min-height: 64vh;
}

.home-hero,
.page-hero {
    padding: 34px 0 28px;
}

.weekly-hero {
    --weekly-height: 340px;
    --weekly-gap: 12px;
    padding: 16px 0 14px;
}

.weekly-hero > .container {
    width: min(100% - 32px, 1040px);
}

.weekly-hero .section-heading {
    margin-bottom: 12px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 28px;
    align-items: stretch;
}

.hero-copy {
    padding: 34px 0;
    align-self: center;
}

.eyebrow {
    display: inline-flex;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.32;
    font-weight: 800;
}

.hero-copy p,
.page-hero p {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 17px;
    max-width: 680px;
    line-height: 1.9;
}

.compact-hero {
    padding: 30px 0 18px;
}

.compact-hero h1 {
    font-size: clamp(28px, 3vw, 42px);
}

.hero-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.hero-search,
.search-form {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.home-search-section {
    padding: 0 0 24px;
}

.home-search-section .hero-search {
    width: min(100%, 820px);
    margin-inline: auto;
    margin-top: 0;
    padding: 10px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.home-search-section .hero-search input {
    padding: 15px 18px;
    font-size: 16px;
}

.home-search-section .hero-search button {
    min-width: 118px;
    padding-inline: 26px;
}

.hero-search input,
.search-form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: none;
    padding: 12px 14px;
    color: var(--text);
    background: transparent;
}

.hero-search button,
.search-form button,
.button {
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    padding: 12px 22px;
    font-weight: 800;
    box-shadow: none;
}

.button-outline,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(224, 123, 57, 0.28);
    background: rgba(224, 123, 57, 0.08);
    color: var(--primary);
}

.button-ghost {
    background: var(--surface);
    color: var(--text-muted);
    border-color: var(--border);
}

.page-section {
    padding: 40px 0;
}

.surface-band {
    background: rgba(250, 247, 242, 0.72);
    border-block: 1px solid var(--divider);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2 {
    position: relative;
    margin: 0;
    padding-inline-start: 14px;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.4;
    font-weight: 800;
}

.section-heading h2::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.45em;
    width: 3px;
    height: 20px;
    border-radius: 4px;
    background: var(--primary);
}

.section-action {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.cards-grid {
    display: grid;
    gap: 16px;
}

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

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

.cards-grid-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weekly-hero-layout {
    display: flex;
    flex-direction: row;
    gap: var(--weekly-gap);
    align-items: stretch;
    height: var(--weekly-height);
    max-height: var(--weekly-height);
}

.weekly-main {
    flex: 1.18 1 0;
    min-width: 0;
}

.weekly-side {
    flex: 0.82 1 0;
    min-width: 290px;
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: var(--weekly-gap);
    min-height: 0;
}

.weekly-hero .featured-card,
.weekly-hero .featured-card a,
.weekly-hero .featured-card img,
.weekly-hero .featured-card .placeholder-media {
    height: 100%;
    min-height: 0;
    max-height: var(--weekly-height);
    overflow: hidden;
}

.weekly-hero .featured-card img {
    object-fit: cover;
}

.weekly-hero .featured-overlay {
    padding: 18px 20px;
}

.weekly-hero .featured-overlay h3 {
    display: -webkit-box;
    overflow: hidden;
    max-width: 620px;
    margin: 8px 0 5px;
    font-size: clamp(19px, 2.1vw, 25px);
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.weekly-hero .featured-overlay p {
    display: -webkit-box;
    overflow: hidden;
    max-width: 560px;
    line-height: 1.62;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.weekly-side .article-card,
.weekly-side .article-card .card-link {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.weekly-side .article-card .card-link {
    grid-template-columns: minmax(118px, 38%) minmax(0, 1fr);
}

.weekly-side .article-thumb {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
}

.weekly-side .article-card-body {
    align-content: center;
    gap: 5px;
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px;
}

.weekly-hero .card-meta-row {
    gap: 5px;
}

.weekly-hero .pill,
.weekly-hero .media-badge {
    padding: 3px 8px;
    font-size: 10px;
}

.weekly-side .article-card h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.weekly-side .article-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.weekly-side .article-card time {
    font-size: 11px;
    line-height: 1.35;
}

.videos-grid {
    align-items: stretch;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 28px;
    align-items: start;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 360px);
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 2px 16px;
    scroll-snap-type: inline proximity;
}

.horizontal-scroll > * {
    scroll-snap-align: start;
}

.stack-list {
    display: grid;
    gap: 12px;
}

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

.featured-card,
.article-card,
.category-card,
.question-card,
.fatwa-form-card,
.search-summary,
.search-group,
.profile-card,
.article-content-card,
.media-panel,
.empty-state {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.featured-card {
    min-height: 410px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-card a {
    position: relative;
    display: block;
    height: 100%;
    min-height: 410px;
}

.featured-card img,
.featured-card .placeholder-media {
    width: 100%;
    height: 100%;
    min-height: 410px;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 28px;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18), transparent);
}

.featured-overlay h3 {
    max-width: 720px;
    margin: 12px 0 8px;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.45;
    font-weight: 800;
}

.featured-overlay p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
}

.article-card {
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.article-card:hover,
.category-card:hover,
.question-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card-link {
    display: grid;
    height: 100%;
}

.article-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-soft);
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-body {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
}

.article-card h3,
.category-card h3,
.question-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    font-weight: 800;
}

.article-card p,
.category-card p,
.question-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.75;
}

.article-card time {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}

.article-card-list .card-link {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
}

.article-card-list .article-thumb {
    width: 112px;
    height: 104px;
    aspect-ratio: auto;
    border-radius: 16px;
}

.article-card-list .article-card-body {
    padding: 0;
}

.card-meta-row,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.pill,
.media-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 800;
}

.pill {
    color: var(--primary);
    background: rgba(224, 123, 57, 0.1);
    border: 1px solid rgba(224, 123, 57, 0.18);
}

.pill-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}

.media-badge.video {
    color: var(--video);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.media-badge.audio {
    color: var(--audio);
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.22);
}

.category-card {
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-card a {
    display: grid;
    height: 100%;
}

.category-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.category-image::after {
    content: "";
    position: absolute;
    inset: 36% 0 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
}

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

.category-count {
    position: absolute;
    z-index: 1;
    inset-inline-start: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.category-count small {
    font-size: 10px;
}

.category-body {
    padding: 15px;
}

.category-card-compact a {
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
}

.category-card-compact .category-image {
    width: 86px;
    height: 86px;
    aspect-ratio: auto;
}

.category-card-compact .category-image::after,
.category-card-compact .category-count {
    display: none;
}

.question-card {
    overflow: hidden;
}

.question-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

.question-card h3 {
    margin-top: 8px;
}

.question-arrow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--primary);
    background: rgba(224, 123, 57, 0.1);
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
}

.placeholder-media {
    position: relative;
    min-height: 120px;
    background:
        linear-gradient(135deg, rgba(224, 123, 57, 0.08), rgba(250, 247, 242, 0.78)),
        var(--surface-soft);
}

.placeholder-media::after {
    content: "";
    position: absolute;
    inset: 50%;
    width: 44px;
    height: 44px;
    translate: 50% -50%;
    border: 2px solid rgba(224, 123, 57, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--primary);
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.sort-form label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.sort-form select,
.form-stack input,
.form-stack textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 12px 13px;
    outline: none;
}

.sort-form select:focus,
.form-stack input:focus,
.form-stack textarea:focus,
.hero-search input:focus,
.search-form input:focus {
    border-color: rgba(224, 123, 57, 0.5);
}

.article-shell {
    width: min(100% - 32px, 960px);
    padding: 28px 0 48px;
}

.article-header {
    display: grid;
    gap: 12px;
    margin: 16px 0 18px;
}

.article-header h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.45;
    font-weight: 800;
}

.article-meta {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.article-cover {
    margin: 0 0 18px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.article-cover img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.media-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #111111;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.audio-card {
    display: grid;
    gap: 12px;
}

.audio-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.media-dot {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(2, 132, 199, 0.12);
}

.audio-dot {
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.audio-card audio {
    width: 100%;
}

.share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.article-content-card {
    padding: clamp(18px, 3vw, 30px);
}

.article-detail-block + .article-detail-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
}

.lead-label {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 10px;
    color: var(--primary);
    background: rgba(224, 123, 57, 0.1);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
}

.article-content-card h2,
.article-content-card h3 {
    margin: 0 0 10px;
    color: var(--primary);
    line-height: 1.55;
    font-weight: 800;
}

.article-content-card h2 {
    font-size: 22px;
}

.article-content-card h3 {
    font-size: 18px;
}

.article-content-card p {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 18px;
    line-height: 2.05;
    text-align: justify;
}

.strong-paragraph {
    font-weight: 800;
}

.body-segment.with-image {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.inline-article-image {
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
    box-shadow: var(--shadow-soft);
}

.inline-article-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.inline-article-image figcaption {
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.highlight-block {
    margin: 0 0 16px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.highlight-block p {
    margin: 0;
    text-align: center;
}

.highlight-block footer {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.poem-block {
    background: var(--poem);
    border-color: #ead7c8;
}

.quran-block {
    background: #fff2e4;
    border-color: #f2d7b8;
}

.hadith-block {
    background: var(--hadith);
    border-color: #d9ead2;
}

.related-section {
    margin-top: 32px;
}

.search-hero .container {
    width: min(100% - 32px, 900px);
}

.search-form {
    max-width: 760px;
}

.search-summary {
    padding: 18px;
    margin-bottom: 16px;
    background: rgba(224, 123, 57, 0.08);
    box-shadow: none;
}

.search-summary h2 {
    margin: 0;
    font-size: 20px;
}

.search-summary span {
    color: var(--primary);
}

.search-summary p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-weight: 700;
}

.search-groups {
    display: grid;
    gap: 14px;
}

.search-group {
    padding: 14px;
}

.search-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.search-group h2 {
    margin: 0;
    font-size: 18px;
}

.search-group header span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

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

.fatwa-form-card {
    position: sticky;
    top: 96px;
    padding: 16px;
}

.form-stack {
    display: grid;
    gap: 13px;
}

.form-stack label {
    display: grid;
    gap: 7px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.form-stack textarea {
    resize: vertical;
}

.notice {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.notice.success {
    color: #166534;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.notice.error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.profile-card {
    overflow: hidden;
}

.profile-hero {
    display: grid;
    justify-items: center;
    padding: 28px 20px;
    color: #ffffff;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong));
    text-align: center;
}

.profile-hero img {
    width: 116px;
    height: 116px;
    object-fit: cover;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.profile-hero h2 {
    margin: 16px 0 4px;
    font-size: 22px;
}

.profile-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.profile-card .empty-state {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.profile-body {
    padding: clamp(18px, 3vw, 28px);
}

.profile-intro {
    margin: 0 0 22px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    color: var(--text);
    font-size: 17px;
    line-height: 1.95;
}

.profile-section + .profile-section {
    margin-top: 22px;
}

.profile-section ul {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.profile-section li {
    position: relative;
    padding-inline-start: 18px;
    color: var(--text);
    line-height: 1.85;
}

.profile-section li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.86em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.special-block + .special-block {
    margin-top: 34px;
}

.empty-state {
    display: grid;
    justify-items: center;
    max-width: 560px;
    margin-inline: auto;
    padding: 30px 24px;
    text-align: center;
}

.empty-icon {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(224, 123, 57, 0.16), rgba(245, 166, 35, 0.08)),
        var(--primary-soft);
    border: 1px solid rgba(224, 123, 57, 0.18);
}

.empty-state h2 {
    margin: 18px 0 8px;
    font-size: 21px;
    font-weight: 800;
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

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

.page-link {
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.page-link.active {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
}

.page-link.disabled {
    opacity: 0.45;
}

.site-footer {
    margin-top: 30px;
    padding: 34px 0 20px;
    border-top: 1px solid var(--divider);
    background: var(--surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
    gap: 24px;
}

.footer-brand {
    display: flex;
    gap: 14px;
}

.footer-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.footer-brand strong {
    font-size: 18px;
    font-weight: 800;
}

.footer-brand p {
    margin: 5px 0 0;
    color: var(--text-muted);
    max-width: 440px;
}

.footer-links,
.footer-social {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-links a,
.footer-social a {
    color: var(--text-muted);
    font-weight: 700;
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--primary);
}

.footer-credit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.footer-credit span + span {
    margin-inline-start: 14px;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--divider);
}

.footer-credit img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

@media (max-width: 980px) {
    .hero-grid,
    .split-section,
    .questions-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .cards-grid-categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fatwa-form-card {
        position: static;
    }

    .weekly-hero-layout {
        height: 376px;
        max-height: 376px;
        gap: 12px;
    }

    .weekly-side {
        min-width: 270px;
        gap: 12px;
    }

    .weekly-hero .featured-card,
    .weekly-hero .featured-card a,
    .weekly-hero .featured-card img,
    .weekly-hero .featured-card .placeholder-media {
        height: 100%;
        min-height: 0;
        max-height: 376px;
    }
}

@media (max-width: 900px) {
    .header-inner {
        min-height: 72px;
    }

    .brand-copy small {
        display: none;
    }

    .nav-toggle {
        display: inline-block;
    }

    .primary-nav {
        position: absolute;
        inset-inline: 0;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .primary-nav.is-open {
        display: flex;
    }

    .primary-nav a {
        padding: 12px 14px;
    }
}

@media (max-width: 760px) {
    .container,
    .narrow-container,
    .article-shell {
        width: min(100% - 24px, var(--container));
    }

    .brand-mark {
        width: 56px;
        height: 56px;
    }

    .brand-mark img {
        width: 52px;
        height: 52px;
    }

    .home-hero,
    .page-hero {
        padding: 24px 0 18px;
    }

    .hero-copy {
        padding: 8px 0;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 29px;
    }

    .hero-copy p,
    .page-hero p {
        font-size: 15px;
    }

    .hero-row {
        display: grid;
        align-items: start;
    }

    .hero-search,
    .search-form {
        display: grid;
        padding: 8px;
    }

    .hero-search button,
    .search-form button,
    .button {
        width: 100%;
    }

    .featured-card,
    .featured-card a,
    .featured-card img,
    .featured-card .placeholder-media {
        min-height: 320px;
    }

    .featured-overlay {
        padding: 20px;
    }

    .weekly-hero-layout {
        flex-direction: column;
        height: auto;
        max-height: none;
        gap: 13px;
    }

    .weekly-main,
    .weekly-side {
        width: 100%;
        min-width: 0;
    }

    .weekly-side {
        grid-template-rows: auto;
        gap: 14px;
    }

    .weekly-hero .featured-card,
    .weekly-hero .featured-card a,
    .weekly-hero .featured-card img,
    .weekly-hero .featured-card .placeholder-media {
        height: auto;
        min-height: 315px;
        max-height: none;
    }

    .weekly-side .article-card,
    .weekly-side .article-card .card-link {
        height: auto;
        min-height: 0;
    }

    .weekly-side .article-card .card-link {
        grid-template-columns: 1fr;
    }

    .weekly-side .article-thumb {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .weekly-side .article-card-body {
        align-content: start;
        gap: 10px;
        padding: 14px;
    }

    .weekly-hero .card-meta-row {
        gap: 7px;
    }

    .weekly-hero .pill,
    .weekly-hero .media-badge {
        padding: 4px 10px;
        font-size: 11px;
    }

    .weekly-side .article-card h3 {
        font-size: 16px;
        line-height: 1.55;
    }

    .weekly-side .article-card p {
        font-size: 13px;
        line-height: 1.75;
    }

    .weekly-side .article-card time {
        font-size: 12px;
    }

    .cards-grid-3,
    .cards-grid-4,
    .mini-category-grid {
        grid-template-columns: 1fr;
    }

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

    .horizontal-scroll {
        grid-auto-columns: minmax(260px, 82vw);
    }

    .home-search-section {
        padding-bottom: 24px;
    }

    .home-search-section .hero-search {
        width: 100%;
        padding: 9px;
        border-radius: 20px;
    }

    .article-card-list .card-link {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .article-card-list .article-thumb {
        width: 94px;
        height: 94px;
    }

    .article-card h3,
    .category-card h3,
    .question-card h3 {
        font-size: 15px;
    }

    .article-content-card p {
        font-size: 17px;
        line-height: 2;
    }

    .body-segment.with-image {
        grid-template-columns: 1fr;
    }

    .search-group > header {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .brand-mark {
        width: 50px;
        height: 50px;
    }

    .brand-mark img {
        width: 46px;
        height: 46px;
    }

    .brand-copy strong {
        font-size: 16px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

    .article-card-list .card-link,
    .category-card-compact a {
        grid-template-columns: 1fr;
    }

    .cards-grid-categories {
        grid-template-columns: 1fr;
    }

    .article-card-list .article-thumb,
    .category-card-compact .category-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .question-card a {
        align-items: start;
    }

    .footer-credit span + span {
        width: 100%;
        margin-inline-start: 0;
        padding-inline-start: 0;
        border-inline-start: 0;
    }
}

/* Reading-first refinement: warm identity, clear hierarchy and accessible controls. */
:root {
    --primary: #a74716;
    --primary-strong: #88360e;
    --text-muted: #625a67;
    --text-soft: #716775;
    --video: #af2535;
    --audio: #09658a;
    --shadow: 0 12px 28px rgba(67, 44, 23, 0.06);
    --shadow-soft: 0 3px 14px rgba(67, 44, 23, 0.035);
}

:where(a, button, input, select, textarea):focus-visible,
.primary-nav a:focus-visible,
.hero-search input:focus-visible,
.search-form input:focus-visible {
    outline: 3px solid #09658a;
    outline-offset: 4px;
}

[id] { scroll-margin-top: 110px; }
#content:focus, #article-text:focus, #question-form:focus, #article-audio:focus, #article-media:focus { outline-offset: 5px; }
.skip-link {
    position: fixed;
    inset-block-start: 10px;
    inset-inline-start: 16px;
    z-index: 100;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--text);
    color: white;
    transform: translateY(-170%);
}
.skip-link:focus { transform: translateY(0); }
.primary-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.primary-nav a[aria-current="page"] { color: var(--primary); background: #f7e9dc; box-shadow: inset 0 -2px var(--primary); }
.nav-toggle { width: 46px; height: 46px; }
.home-intro { padding: 46px 0 36px; border-bottom: 1px solid var(--divider); margin-bottom: 20px; }
.intro-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.intro-copy h1 { font-size: clamp(32px, 4vw, 49px); line-height: 1.5; letter-spacing: -.035em; margin: 5px 0 7px; font-weight: 800; }
.intro-copy > p { margin: 0 0 14px; max-width: 45ch; color: var(--text-muted); font-size: 16px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.quick-links a, .text-action { color: var(--primary); font-size: 13px; font-weight: 800; min-height: 44px; display: inline-flex; gap: 10px; align-items: center; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #d9b49b; }
.quick-links a:first-child { color: var(--text); }
.intro-search-card { padding: 24px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-soft); }
.intro-search-card > label { font-size: 17px; font-weight: 800; display: block; margin-bottom: 12px; }
.intro-search-card .hero-search { width: 100%; box-shadow: none; border-radius: 14px; padding: 6px; background: var(--surface-soft); }
.intro-search-card .hero-search input { padding: 10px 8px; font-size: 13px; }
.intro-search-card .hero-search button { min-width: 82px; padding-inline: 17px; min-height: 46px; }
.intro-search-card > p { color: var(--text-muted); font-size: 12px; margin: 10px 0 0; }
.article-card, .category-card, .question-card { box-shadow: var(--shadow-soft); transition: border-color 160ms ease, transform 160ms ease; }
.article-card:hover, .category-card:hover, .question-card:hover { transform: translateY(-3px); border-color: #d6bda8; box-shadow: var(--shadow); }
.card-link:focus-visible, .category-card a:focus-visible, .question-card a:focus-visible, .featured-card a:focus-visible { outline-offset: -4px; border-radius: inherit; }
.article-card h3, .category-card h3, .question-card h3 { overflow-wrap: anywhere; }
.card-meta-row { flex-wrap: wrap; row-gap: 5px; }
.article-card-body .card-meta-row { order: 3; margin-top: 4px; }
.article-card-body h3 { order: 0; }
.article-card-body > p { order: 1; }
.article-card-body > time { order: 2; }
.placeholder-media { display: grid; place-items: center; height: 100%; width: 100%; color: var(--primary); }
.placeholder-media > span { font-size: 15px; font-weight: 800; background: var(--surface-soft); border-radius: 50%; padding: 14px; z-index: 1; }
.placeholder-media::after { display: none; }
.featured-overlay { background: linear-gradient(0deg, rgba(17, 15, 13, .94), rgba(17, 15, 13, .65) 68%, transparent); }
.featured-overlay .pill-light { background: #fff8ed; color: #803009; border: 0; }
.article-content-card { max-width: 860px; margin-inline: auto; }
.article-content-card p { font-size: var(--reading-size, 20px); line-height: 2.1; text-align: start; overflow-wrap: anywhere; }
.article-content-card h2 { font-size: calc(var(--reading-size, 20px) + 4px); }
.article-content-card h3 { font-size: calc(var(--reading-size, 20px) + 1px); }
.reading-toolbar { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; padding-block: 14px; margin-bottom: 12px; border-block: 1px solid var(--divider); }
.reading-links, .font-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.font-controls button { width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--primary); font-weight: 800; }
.font-controls button:disabled { cursor: default; color: var(--text-muted); background: var(--surface-soft); }
.font-controls span, .share-status { font-size: 13px; color: var(--text-muted); }
.share-row { align-items: center; }
.clipboard-buffer { position: fixed; inset: -1000px auto auto -1000px; }
.audio-error { color: #8a2632; font-size: 14px; }
.audio-download { padding-block: 6px; }
.field-error { color: #a22032; font-size: 13px; font-weight: 700; }
.field-hint { color: var(--text-muted); font-size: 12px; }
[aria-invalid="true"] { border-color: #a22032 !important; background: #fff8f8 !important; }
.notice.error { color: #8a2632; }
.notice.success { color: #25603d; }
.clear-search { margin-top: 12px; }
.sort-form { flex-wrap: wrap; }
.sort-apply { min-height: 44px; padding: 8px 14px; width: auto; }
.pagination-wrap { flex-wrap: wrap; gap: 7px; }
.page-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.page-ellipsis { min-width: 12px; color: var(--text-muted); }
.section-action { min-height: 44px; display: inline-flex; align-items: center; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; text-align: center; }
.button:hover, .hero-search button:hover, .search-form button:hover { background: var(--primary-strong); color: white; }

@media (max-width: 900px) {
    .primary-nav { max-height: calc(100dvh - 98px); overflow-y: auto; }
    .intro-layout { grid-template-columns: 1fr; gap: 20px; }
    .home-intro { padding: 28px 0; }
    .intro-copy h1 { font-size: 35px; }
    .intro-copy > p { font-size: 14px; }
    .intro-search-card { padding: 18px; }
    .intro-search-card .hero-search { display: flex; align-items: center; }
    .intro-search-card .hero-search button { width: auto; }
}
@media (max-width: 760px) {
    .home-intro { padding: 24px 0; margin-bottom: 6px; }
    .intro-layout { gap: 16px; }
    .intro-copy h1 { font-size: 32px; margin-top: 4px; }
    .intro-copy > p { margin-bottom: 8px; }
    .eyebrow { font-size: 11px; }
    .quick-links { gap: 2px 14px; }
    .quick-links a { font-size: 12px; }
    .intro-search-card { border-radius: 16px; padding: 14px; }
    .intro-search-card > label { margin-bottom: 8px; font-size: 15px; }
    .intro-search-card .hero-search { gap: 4px; }
    .intro-search-card .hero-search button { min-width: 65px; padding-inline: 12px; }
    .intro-search-card .hero-search input { width: 100%; font-size: 12px; }
    .weekly-side .article-card .card-link { grid-template-columns: 100px minmax(0, 1fr); }
    .weekly-side .article-thumb { height: 100%; aspect-ratio: auto; min-height: 135px; }
    .weekly-side .article-card-body { padding: 12px; gap: 7px; }
    .weekly-side .article-card h3 { font-size: 15px; }
    .weekly-side .article-card p { font-size: 12px; }
    .weekly-side .media-badge { display: none; }
    .reading-toolbar { gap: 12px; }
    .reading-links { width: 100%; }
    .reading-links .button { flex: 1; width: auto; padding-inline: 12px; font-size: 13px; }
    .share-row .button { width: auto; }
    .sort-form .sort-apply { width: auto; }
    .questions-layout { display: flex; flex-direction: column; }
    .questions-layout > div { order: 0; width: 100%; }
    .questions-layout > aside { order: 1; width: 100%; }
    .article-content-card p { font-size: var(--reading-size, 20px); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .article-card:hover, .category-card:hover, .question-card:hover { transform: none; }
}

/* CMS-provided media and content languages. */
.alternative-video { margin-block: 20px; }
.alternative-video video { display: block; width: 100%; max-height: 70vh; background: #161616; border-radius: 14px; }
.alternative-video h2 { font-size: 18px; margin-bottom: 12px; }
.site-languages { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.article-content-card[dir="ltr"] { text-align: start; }
