:root {
    --gold: #b8956a;
    --gold-dark: #9a7d56;
    --gold-light: #f5efe6;
    --gold-muted: rgba(184, 149, 106, 0.12);
    --bg: #faf9f7;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #eceae6;
    --border-light: #f3f1ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.08);
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --site-max-width: 1440px;
    --site-gutter: max(24px, calc((100% - var(--site-max-width)) / 2));
    --blue: #3b82f6;
    --green: #22c55e;
}

[data-theme="dark"] {
    --bg: #111110;
    --bg-card: #1a1a19;
    --bg-sidebar: #1a1a19;
    --text: #f5f5f4;
    --text-muted: #a8a29e;
    --text-light: #78716c;
    --border: #2a2a28;
    --border-light: #222220;
    --gold-light: #2a2520;
    --gold-muted: rgba(184, 149, 106, 0.15);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }

a.btn--primary,
a.btn--primary:hover,
a.btn--primary:focus,
a.btn--primary:visited {
    color: #fff;
}
a.btn--outline,
a.btn--outline:visited {
    color: var(--text);
}
a.btn--outline:hover {
    color: var(--gold);
}
a.btn--danger,
a.btn--danger:hover,
a.btn--danger:visited {
    color: #fff;
}

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

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
    position: sticky; top: 0; z-index: 100;
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 var(--site-gutter);
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand__icon {
    width: 40px; height: 40px;
    background: var(--gold-muted);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
}
.brand__icon svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__text strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand__text small { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.search-form {
    margin-left: auto;
    width: 100%;
    max-width: 520px;
    flex: 0 1 520px;
    position: relative;
}
.search-form svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--text-light); pointer-events: none;
}
.search-form input {
    width: 100%; height: 40px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font: inherit; font-size: 14px;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}
.search-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-muted);
}

.search-form--live { z-index: 120; }
.search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    max-height: min(420px, calc(100vh - var(--topbar-h) - 24px));
    overflow: auto;
    padding: 8px;
}
.search-suggest__status,
.search-suggest__empty {
    padding: 14px 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}
.search-suggest__group + .search-suggest__group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}
.search-suggest__label {
    padding: 4px 10px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-light);
}
.search-suggest__item {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    transition: background .15s;
}
.search-suggest__item:hover,
.search-suggest__item.is-active {
    background: var(--gold-muted);
    color: var(--text);
}
.search-suggest__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}
.search-suggest__subtitle {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.search-suggest__footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}
.search-suggest__all {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-dark);
    text-align: center;
}
.search-suggest__all:hover {
    background: var(--gold-muted);
    color: var(--gold-dark);
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: all .2s;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { display: none; }

.menu-toggle { display: none; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--topbar-h);
    background: rgba(0, 0, 0, .35);
    z-index: 199;
}
body.menu-open .sidebar-overlay { display: block; }
body.menu-open { overflow: hidden; }

.login-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px; font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all .2s;
}
.login-btn svg { width: 18px; height: 18px; }
.login-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Layout */
.layout {
    display: flex;
    flex: 1;
    align-items: flex-start;
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - var(--topbar-h));
    display: flex; flex-direction: column;
    position: sticky; top: var(--topbar-h);
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
}

.sidebar__nav { padding: 16px 12px; }

.sidebar__mission { padding: 8px 12px 16px; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px; font-weight: 500;
    color: var(--text-muted);
    transition: all .15s;
    border: none; background: none; width: 100%; cursor: pointer; text-align: left;
}
.nav-item svg:first-child { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--border-light); color: var(--text); }
.nav-item.is-active { background: var(--gold-muted); color: var(--gold-dark); font-weight: 600; }

.nav-group { margin-bottom: 2px; }
.nav-item--toggle { position: relative; }
.nav-chevron { width: 16px !important; height: 16px !important; margin-left: auto; transition: transform .2s; }
.nav-group.is-open > .nav-item--toggle .nav-chevron { transform: rotate(180deg); }
.nav-submenu { display: none; padding-left: 28px; margin-top: 2px; }
.nav-group.is-open .nav-submenu { display: block; }
.nav-subitem {
    display: block; padding: 7px 14px;
    font-size: 13px; color: var(--text-muted);
    border-radius: 8px; transition: all .15s;
}
.nav-subitem:hover, .nav-subitem.is-active { color: var(--gold-dark); background: var(--gold-muted); }

.nav-subgroup { margin-bottom: 2px; }
.nav-subgroup__head {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-subgroup__head .nav-subitem { flex: 1; min-width: 0; }
.nav-subtoggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-subtoggle:hover { background: var(--border-light); color: var(--text); }
.nav-subtoggle .nav-chevron { width: 14px !important; height: 14px !important; margin: 0; transition: transform .2s; }
.nav-subsubmenu { display: none; padding-left: 12px; margin-top: 2px; }
.nav-subgroup.is-open .nav-subsubmenu { display: block; }
.nav-subgroup.is-open .nav-subtoggle .nav-chevron { transform: rotate(180deg); }

.mission-card {
    background: var(--gold-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.mission-card svg { width: 20px; height: 20px; color: var(--gold); margin-bottom: 8px; }
.mission-card strong { display: block; font-size: 13px; margin-bottom: 6px; }
.mission-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.sidebar__hadith { padding: 0 12px 16px; }
.hadith-slider {
    background: linear-gradient(145deg, var(--gold-light) 0%, rgba(184, 149, 106, .08) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 14px 12px;
    overflow: hidden;
}
.hadith-slider__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--gold-dark);
}
.hadith-slider__header svg { width: 18px; height: 18px; flex-shrink: 0; }
.hadith-slider__header strong { font-size: 12px; letter-spacing: .02em; }
.hadith-slider__viewport {
    position: relative;
    min-height: 88px;
    overflow: hidden;
}
.hadith-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .55s ease, transform .55s ease, visibility .55s;
}
.hadith-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.hadith-slide__text {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
    margin: 0 0 8px;
}
.hadith-slide__source {
    display: block;
    font-size: 11px;
    font-style: normal;
    color: var(--text-muted);
}
.hadith-slider__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(184, 149, 106, .18);
}
.hadith-slider__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-sidebar);
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
}
.hadith-slider__arrow svg { width: 14px; height: 14px; }
.hadith-slider__arrow:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}
.hadith-slider__dots {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hadith-slider__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(184, 149, 106, .28);
    cursor: pointer;
    transition: all .25s ease;
}
.hadith-slider__dot.is-active {
    width: 18px;
    background: var(--gold);
}

.main {
    flex: 1;
    padding: 28px 32px 48px;
    min-width: 0;
    width: 100%;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    min-height: 280px;
}
.hero__content { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.hero__title { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; line-height: 1.2; }
.hero__subtitle { color: var(--text-muted); font-size: 15px; margin-bottom: 16px; max-width: 420px; }
.hero__quote { font-style: italic; color: var(--text-light); font-size: 13px; margin-bottom: 24px; border-left: 3px solid var(--gold); padding-left: 14px; }
.hero__image {
    min-height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px;
    font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; transition: all .2s;
    text-decoration: none;
}
.btn--primary { background: var(--gold); color: #fff; }
.btn--primary:hover { background: var(--gold-dark); color: #fff; }
.btn--lg { padding: 12px 24px; font-size: 15px; }
.btn--outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }
.btn--danger { background: #ef4444; color: #fff; }
.btn--sm { padding: 6px 12px; font-size: 13px; }

/* Quick cards */
.quick-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.quick-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all .25s;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.quick-card__icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.quick-card__icon svg { width: 22px; height: 22px; }
.quick-card--blue .quick-card__icon { background: rgba(59,130,246,.1); color: var(--blue); }
.quick-card--green .quick-card__icon { background: rgba(34,197,94,.1); color: var(--green); }
.quick-card--gold .quick-card__icon { background: var(--gold-muted); color: var(--gold); }
.quick-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.quick-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.quick-card__link { font-size: 13px; font-weight: 600; color: var(--gold); }

/* Panels */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.panel__head { padding: 20px 24px 0; }
.panel__head h2 { font-size: 16px; font-weight: 700; }
.panel__body { padding: 16px 24px; }
.panel__foot { padding: 12px 24px 20px; border-top: 1px solid var(--border-light); }
.panel__foot a { font-size: 13px; font-weight: 600; }

.article-row {
    display: flex; gap: 14px; padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text); transition: background .15s;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { color: var(--text); }
.article-row__icon {
    width: 36px; height: 36px; flex-shrink: 0;
    background: var(--gold-muted); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
}
.article-row__icon svg { width: 18px; height: 18px; }
.article-row__content h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.article-row__content p { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.4; }
.article-row__meta { display: flex; gap: 16px; font-size: 11px; color: var(--text-light); }
.article-row__meta span { display: flex; align-items: center; gap: 4px; }
.article-row__meta svg { width: 13px; height: 13px; }

.announcement-row {
    display: flex; gap: 12px; padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}
.announcement-row:last-child { border-bottom: none; }
.announcement-row__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold); flex-shrink: 0; margin-top: 6px;
}
.announcement-row h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.announcement-row p { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.announcement-row time { font-size: 11px; color: var(--text-light); }

/* Page header */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.page-header p { color: var(--text-muted); margin-top: 8px; }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.breadcrumbs a { color: var(--gold-dark); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs__sep { color: var(--text-light); }

.section-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.section-block { margin-bottom: 32px; }

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.folder-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
}
.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.folder-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gold-muted);
    color: var(--gold-dark);
}
.folder-card--video .folder-card__icon { background: rgba(59,130,246,.1); color: var(--blue); }
.folder-card--book .folder-card__icon { background: rgba(34,197,94,.1); color: var(--green); }
.folder-card__icon svg { width: 22px; height: 22px; }
.folder-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.folder-card__body strong { font-size: 15px; line-height: 1.35; }
.folder-card__body span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.folder-card__body em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-dark);
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .25s;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.content-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.content-card__link {
    display: block;
    color: var(--text);
    flex: 1;
    text-decoration: none;
}
.content-card__link:hover { color: var(--text); text-decoration: none; }
.content-card__read {
    display: block;
    padding: 10px 20px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    border-top: 1px solid var(--border-light);
    text-decoration: none;
}
.content-card__read:hover { color: var(--gold-dark); text-decoration: none; }
.content-card__img { height: 160px; background: var(--gold-light); overflow: hidden; position: relative; }
.content-card__img img { width: 100%; height: 100%; object-fit: cover; }
.content-card__img-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(145deg, var(--gold-light) 0%, var(--gold-muted) 100%);
    color: var(--gold);
}
.content-card--video .content-card__play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.25);
    transition: background .2s;
}
.content-card--video .content-card__play svg {
    width: 52px; height: 52px; color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}
.content-card--video:hover .content-card__play { background: rgba(0,0,0,.35); }
.content-card__duration {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,.75); color: #fff;
    font-size: 11px; font-weight: 600;
    padding: 3px 7px; border-radius: 4px;
}
.content-card__body { padding: 20px; }
.content-card__body h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.content-card__body p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.content-card__meta { display: flex; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-light); }

/* Article page */
.article-content { max-width: 760px; }
.article-content h1 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -.02em; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.prose { font-size: 16px; line-height: 1.8; color: var(--text); }
.prose h2 { font-size: 1.35rem; font-weight: 700; margin: 32px 0 12px; }
.prose h3 { font-size: 1.15rem; font-weight: 600; margin: 24px 0 10px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose li { margin-bottom: 6px; }

/* Book */
.book-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.book-page { max-width: none; }

/* Book reader — полноэкранный режим без лишних отступов */
.body--reader { overflow: hidden; }

.app--reader .layout {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
}
.app--reader .main--reader {
    padding: 0;
    max-width: none;
}

.pdf-reader {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-h));
    margin: 0;
}
.pdf-reader__toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    flex-shrink: 0;
}
.pdf-reader__back { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; display: inline-block; }
.pdf-reader__info h1 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin-bottom: 2px; }
.pdf-reader__info span { font-size: 13px; color: var(--text-muted); }
.pdf-reader__actions { display: flex; gap: 8px; flex-shrink: 0; }
.pdf-reader__frame {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #323639;
}
.pdf-reader__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Video embed */
.video-embed {
    position: relative; padding-bottom: 56.25%; height: 0;
    border-radius: var(--radius-lg); overflow: hidden;
    background: #000; margin-bottom: 24px;
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Q&A */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 20px;
    font-weight: 600; font-size: 15px;
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--gold); font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-answer { padding: 0 20px 16px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* Search */
.search-results { display: flex; flex-direction: column; gap: 24px; }
.search-section h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 12px; }
.search-item { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.search-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.search-item p { font-size: 13px; color: var(--text-muted); }
.search-empty { text-align: center; padding: 48px; color: var(--text-muted); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 360px;
    padding: 48px 24px;
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
.empty-state__icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--gold-muted);
    color: var(--gold);
    margin-bottom: 20px;
}
.empty-state__icon svg { width: 34px; height: 34px; }
.empty-state__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}
.empty-state__text {
    max-width: 420px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
    padding: 8px 14px; border-radius: 8px;
    font-size: 14px; border: 1px solid var(--border);
    color: var(--text-muted);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .is-active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* Scholar */
.scholar-header { display: flex; gap: 24px; margin-bottom: 32px; align-items: flex-start; }
.scholar-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--gold-light); flex-shrink: 0; }
.scholar-photo--placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 700; color: var(--gold);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px var(--site-gutter);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: var(--text-muted);
    background: var(--bg-card);
    flex-wrap: wrap; gap: 12px;
}
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: var(--text-muted); }
.footer__links a:hover { color: var(--gold); }

/* Error */
.error-page { text-align: center; padding: 80px 24px; }
.error-page h1 { font-size: 4rem; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.error-page p { color: var(--text-muted); margin-bottom: 24px; }

/* Responsive */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; }
    .hero__image { min-height: 200px; order: -1; }
    .quick-cards { grid-template-columns: 1fr; }
    .home-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .topbar { padding: 0 16px; gap: 12px; }
    .brand__text small { display: none; }
    .search-form { flex: 1; max-width: none; min-width: 0; }
    .menu-toggle { display: flex; }
    .layout { flex-direction: column; padding: 0 16px; }
    .sidebar {
        display: none;
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        width: 100%;
        min-height: auto;
        max-height: none;
        overflow-y: auto;
        border-right: none;
        border-bottom: none;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.is-open { display: flex; flex-direction: column; }
    .sidebar__nav { display: block; padding-top: 8px; }
    .sidebar__mission { display: none; }
    .sidebar__hadith { display: none; }
    .main { padding: 20px 0 32px; width: 100%; }
    .login-btn span { display: none; }
}
