/* ==========================================================================
   Mir Arab oliy madrasasi — ommaviy sayt uslublari
   Rang va tipografiya tizimi kpi-bstu.uz dizayni asosida
   ========================================================================== */

:root {
    /* Ranglar */
    --navy-900: #0A2247;
    --navy-800: #0E2C58;
    --navy-700: #12386F;
    --navy-600: #1A4A8A;
    --navy-500: #2A5CA0;

    --gold-700: #8A5F16;
    --gold-600: #A9761F;
    --gold-500: #C08A2E;
    --gold-400: #D2A248;
    --gold-300: #E0B562;
    --gold-100: #F5E6C6;

    --sand-50: #F7F5F0;
    --sand-100: #EFEBE2;
    --sand-200: #E4DED1;

    --ink: #1C2434;
    --muted: #5A6478;
    --line: rgba(10, 34, 71, .10);
    --line-strong: rgba(10, 34, 71, .18);
    --white: #fff;

    --success: #157347;
    --danger: #B02A37;

    /* Tipografiya */
    --font-display: 'Lora', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

    /* Maket */
    --wrap: 1200px;
    --pad: 24px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-xl: 24px;
    --header-h: 84px;
    --topbar-h: 40px;

    /* Fon rasmlari (kpi-bstu.uz dizayni) */
    --hero-photo: url('../img/hero-mirarab.jpg');
    --page-photo: url('../img/page-bukhara.jpg');

    /* Effektlar */
    --shadow-sm: 0 2px 8px -4px rgba(10, 34, 71, .25);
    --shadow-card: 0 18px 40px -24px rgba(10, 34, 71, .35);
    --shadow-float: 0 30px 60px -30px rgba(10, 34, 71, .45);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------------------
   Asos
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

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

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--navy-900);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 600;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.25em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

::selection { background: var(--gold-300); color: var(--navy-900); }

:focus-visible {
    outline: 3px solid var(--gold-400);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   Yordamchi sinflar
   -------------------------------------------------------------------------- */

.wrap {
    width: min(100% - (var(--pad) * 2), var(--wrap));
    margin-inline: auto;
}

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--navy-900); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

.text-muted { color: var(--muted); }
.text-center { text-align: center; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* --------------------------------------------------------------------------
   Tugmalar
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font: 600 .95rem/1 var(--font-body);
    cursor: pointer;
    transition: all .25s var(--ease);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -14px rgba(10, 34, 71, .6);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
}
.btn-gold:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(169, 118, 31, .65); }

.btn-outline {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--navy-800);
}
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-600); background: rgba(224, 181, 98, .08); }

.btn-ghost-light {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
    backdrop-filter: blur(6px);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* --------------------------------------------------------------------------
   Yuqori panel — namoz vaqtlari, ijtimoiy tarmoq, til
   -------------------------------------------------------------------------- */

.topbar {
    background: var(--navy-900);
    color: rgba(255, 255, 255, .82);
    font-size: .8rem;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--topbar-h);
    flex-wrap: wrap;
}

.prayer-times {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.prayer-times__item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    white-space: nowrap;
    line-height: 1.4;
}

.prayer-times__item.is-next {
    background: rgba(224, 181, 98, .18);
    border-color: rgba(224, 181, 98, .5);
    color: var(--gold-300);
}

.prayer-times__label { opacity: .75; }
.prayer-times__value { font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; }
.prayer-times__item.is-next .prayer-times__value { color: var(--gold-300); }

.topbar__right { display: flex; align-items: center; gap: 14px; }

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

.social-links a {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .85);
    transition: all .2s var(--ease);
}
.social-links a:hover { background: var(--gold-500); color: #fff; transform: translateY(-2px); }
.social-links svg { width: 15px; height: 15px; fill: currentColor; }

.lang-switch { display: flex; gap: 3px; }

.lang-switch a {
    padding: 4px 9px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .7);
    border: 1px solid transparent;
}
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.lang-switch a.is-active { background: var(--gold-500); color: #fff; }

/* --------------------------------------------------------------------------
   Sarlavha va navigatsiya
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: box-shadow .3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8); }

.site-header .brand,
.site-footer .brand { color: #fff; }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--navy-900);
}

.brand__mark { width: 42px; height: 42px; flex: 0 0 42px; }

/* Yuklangan logotip. Emblema doira shaklida va matni to'q rangda bo'lgani uchun
   to'q ko'k panelda o'qilishi uchun oq disk ustiga qo'yiladi. */
.brand__logo {
    width: 54px; height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
}

.brand__name {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: inherit;
    max-width: 22ch;
}

/* --- Asosiy menyu (mega-dropdown) --- */

.main-nav { display: flex; align-items: center; }

.main-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0; padding: 0;
    list-style: none;
}

.main-nav__item { position: relative; }

.main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 13px;
    border-radius: var(--r-sm);
    font-size: .875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .88);
    white-space: nowrap;
    transition: all .2s var(--ease);
}

.main-nav__link:hover,
.main-nav__item.is-open > .main-nav__link { background: rgba(255, 255, 255, .09); color: #fff; }

.main-nav__link.is-current { color: var(--gold-300); }
.main-nav__link.is-current::after {
    content: '';
    position: absolute;
    left: 13px; right: 13px; bottom: 2px;
    height: 2px;
    background: var(--gold-300);
    border-radius: 2px;
}

.main-nav__caret { width: 10px; height: 10px; opacity: .55; transition: transform .25s var(--ease); }
.main-nav__item.is-open .main-nav__caret { transform: rotate(180deg); }

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    min-width: 268px;
    max-width: 340px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-float);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .22s var(--ease);
    z-index: 40;
}

.main-nav__item.is-open > .dropdown,
.main-nav__item:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav__item:last-child .dropdown,
.main-nav__item:nth-last-child(2) .dropdown { inset-inline-start: auto; inset-inline-end: 0; }

.dropdown__link {
    display: block;
    padding: 9px 13px;
    border-radius: var(--r-sm);
    font-size: .855rem;
    color: var(--ink);
    line-height: 1.4;
}
.dropdown__link:hover { background: var(--sand-100); color: var(--navy-900); padding-inline-start: 18px; }

.header__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--r-md);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all .2s var(--ease);
}
.icon-btn:hover { border-color: var(--gold-300); color: var(--gold-300); }
.icon-btn svg { width: 19px; height: 19px; }

/* Mobil menyu ichidagi tugma oq fonda turadi */
.mobile-nav .icon-btn { border-color: var(--line-strong); color: var(--navy-800); }
.mobile-nav .icon-btn:hover { border-color: var(--gold-500); color: var(--gold-600); }

.nav-toggle { display: none; }

/* --- Qidiruv oynasi --- */

.search-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: var(--navy-800);
    padding: 18px 0;
}
.search-panel.is-open { display: block; animation: slideDown .25s var(--ease); }

.search-panel form { display: flex; gap: 10px; }
.search-panel input {
    flex: 1;
    padding: 13px 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font: 400 .95rem var(--font-body);
    background: #fff;
}
.search-panel input:focus { outline: none; border-color: var(--gold-400); }
.search-panel .btn { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: #fff; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobil menyu --- */

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    background: rgba(10, 34, 71, .5);
    backdrop-filter: blur(3px);
}
.mobile-nav.is-open { display: block; }

.mobile-nav__panel {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(92vw, 400px);
    background: #fff;
    overflow-y: auto;
    padding: 20px;
    animation: slideIn .3s var(--ease);
    box-shadow: var(--shadow-float);
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-nav__head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 16px; margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.mobile-nav details { border-bottom: 1px solid var(--line); }
.mobile-nav details > summary {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 4px;
    font-weight: 600; font-size: .95rem;
    color: var(--navy-900);
    cursor: pointer;
    list-style: none;
}
.mobile-nav details > summary::-webkit-details-marker { display: none; }
.mobile-nav details > summary::after {
    content: '+';
    font-size: 1.25rem; color: var(--gold-600); line-height: 1;
}
.mobile-nav details[open] > summary::after { content: '−'; }
.mobile-nav details a { display: block; padding: 9px 16px; font-size: .875rem; color: var(--muted); }
.mobile-nav details a:hover { color: var(--gold-600); }
.mobile-nav > .mobile-nav__panel > a.mobile-nav__single {
    display: block; padding: 13px 4px;
    font-weight: 600; font-size: .95rem; color: var(--navy-900);
    border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Hero / slayder
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: clamp(420px, 62vh, 620px);
    display: grid;
    align-items: center;
    background: radial-gradient(120% 90% at 70% 15%, #2E6BA8 0%, #16407A 42%, #0A2247 78%);
    color: #fff;
    overflow: hidden;
}

.hero__slides { position: absolute; inset: 0; }

.hero__slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1s var(--ease);
    background-image: var(--hero-photo);
    background-size: cover;
    background-position: center;
}
.hero__slide.is-active { opacity: 1; }

.hero__slide::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(100deg, rgba(10, 34, 71, .93) 0%, rgba(10, 34, 71, .72) 46%, rgba(10, 34, 71, .35) 100%),
        radial-gradient(ellipse at 80% 20%, rgba(192, 138, 46, .22), transparent 60%);
}

.hero__inner { position: relative; z-index: 2; padding: 72px 0; }
/* Slayd matnlari bir katakda ustma-ust turadi — balandlikni eng uzuni belgilaydi */
.hero__contents { display: grid; max-width: 720px; }
.hero__content {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .8s var(--ease), transform .8s var(--ease), visibility 0s linear .8s;
}
.hero__content.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .8s var(--ease) .15s, transform .8s var(--ease) .15s, visibility 0s;
}

.hero__badge {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(224, 181, 98, .16);
    border: 1px solid rgba(224, 181, 98, .38);
    color: var(--gold-300);
    font-size: .78rem; font-weight: 500;
    letter-spacing: .02em;
    margin-bottom: 22px;
}
.hero__badge::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: var(--gold-400);
    box-shadow: 0 0 0 4px rgba(224, 181, 98, .22);
}

.hero__title {
    color: #fff;
    font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
    margin-bottom: .45em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.hero__subtitle {
    font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
    color: rgba(255, 255, 255, .85);
    max-width: 60ch;
    margin-bottom: 32px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__dots {
    position: absolute;
    inset-inline-start: 0; bottom: 28px;
    z-index: 3;
    display: flex; gap: 9px;
}

.hero__dot {
    width: 30px; height: 4px;
    border: 0; padding: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    transition: all .3s var(--ease);
}
.hero__dot.is-active { background: var(--gold-400); width: 44px; }

/* --------------------------------------------------------------------------
   Sahifa sarlavhasi (ichki sahifalar)
   -------------------------------------------------------------------------- */

.page-hero {
    position: relative;
    padding: 62px 0 54px;
    background-image:
        linear-gradient(90deg, rgba(8, 26, 55, .94) 0%, rgba(8, 26, 55, .74) 60%, rgba(8, 26, 55, .55) 100%),
        var(--page-photo, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
}

[dir="rtl"] .page-hero {
    background-image:
        linear-gradient(270deg, rgba(8, 26, 55, .94) 0%, rgba(8, 26, 55, .74) 60%, rgba(8, 26, 55, .55) 100%),
        var(--page-photo, none);
}

.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255, 255, 255, .8); max-width: 68ch; margin: 0; }

.breadcrumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 0 0 18px; padding: 0;
    list-style: none;
    font-size: .8rem;
    color: rgba(255, 255, 255, .62);
}
.breadcrumbs a { color: rgba(255, 255, 255, .82); }
.breadcrumbs a:hover { color: var(--gold-300); }
.breadcrumbs li + li::before { content: '/'; margin-inline-end: 8px; opacity: .5; }

/* --------------------------------------------------------------------------
   Bo'lim sarlavhalari
   -------------------------------------------------------------------------- */

.section { padding: clamp(48px, 6vw, 82px) 0; }
.section--sand { background: var(--sand-50); }
.section--navy { background: var(--navy-900); color: rgba(255, 255, 255, .85); }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
    flex-wrap: wrap;
}

.section-label {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .78rem; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: 10px;
}
.section-label::before {
    content: ''; width: 26px; height: 2px;
    background: var(--gold-500); border-radius: 2px;
}
.section--navy .section-label { color: var(--gold-300); }

.section-head h2 { margin: 0; }
.section-head__text { max-width: 62ch; }
.section-head__text p { margin: 8px 0 0; color: var(--muted); }
.section--navy .section-head__text p { color: rgba(255, 255, 255, .7); }

.link-more {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .875rem; font-weight: 600;
    color: var(--navy-700);
    white-space: nowrap;
}
.link-more svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.link-more:hover svg { transform: translateX(4px); }
[dir="rtl"] .link-more:hover svg { transform: translateX(-4px); }

/* --------------------------------------------------------------------------
   Kartochkalar
   -------------------------------------------------------------------------- */

.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all .3s var(--ease);
    height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: transparent; }

.card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--sand-100);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }

.card__badge {
    position: absolute;
    top: 12px; inset-inline-start: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(10, 34, 71, .88);
    color: #fff;
    font-size: .7rem; font-weight: 600;
    letter-spacing: .03em;
    backdrop-filter: blur(4px);
}
.card__badge--gold { background: rgba(169, 118, 31, .92); }

.card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 10px; }

.card__meta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    font-size: .76rem; color: var(--muted);
}
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.card__meta svg { width: 13px; height: 13px; opacity: .7; }

.card__title {
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--navy-900);
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--gold-600); }

.card__excerpt {
    font-size: .885rem;
    color: var(--muted);
    margin: 0;
    flex: 1;
}

.card__foot {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between;
    font-size: .8rem;
}

/* Katta (featured) kartochka */
.card--feature .card__media { aspect-ratio: 16 / 9; }
.card--feature .card__title { font-size: 1.4rem; }

/* Gorizontal kartochka */
.card--row { flex-direction: row; align-items: stretch; }
.card--row .card__media { width: 40%; flex: 0 0 40%; aspect-ratio: auto; }
.card--row .card__body { padding: 16px 18px; }

/* Ro'yxat ko'rinishidagi kichik element */
.list-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-item__thumb {
    width: 84px; height: 62px; flex: 0 0 84px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--sand-100);
}
.list-item__title {
    font-family: var(--font-display);
    font-size: .94rem; font-weight: 600; line-height: 1.4;
    margin: 0 0 4px; color: var(--navy-900);
}
.list-item__title a { color: inherit; }
.list-item__title a:hover { color: var(--gold-600); }
.list-item__date { font-size: .74rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Statistika lentasi
   -------------------------------------------------------------------------- */

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.stat {
    background: #fff;
    padding: 28px 22px;
    text-align: center;
}
.stat__value {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem);
    font-weight: 600;
    color: var(--gold-600);
    line-height: 1.1;
    margin-bottom: 6px;
}
.stat__label { font-size: .82rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Xizmat kartochkalari (interaktiv xizmatlar)
   -------------------------------------------------------------------------- */

.service-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 26px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: all .3s var(--ease);
    height: 100%;
}
.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-300);
    box-shadow: var(--shadow-card);
}

.service-card__icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--sand-100), var(--sand-200));
    color: var(--navy-700);
}
.service-card:hover .service-card__icon {
    background: linear-gradient(140deg, var(--gold-500), var(--gold-600));
    color: #fff;
}
.service-card__icon svg { width: 22px; height: 22px; }

.service-card h3 { font-size: 1.02rem; margin: 0; }
.service-card p { font-size: .865rem; color: var(--muted); margin: 0; flex: 1; }

/* --------------------------------------------------------------------------
   Shaxslar (rahbariyat, ustozlar)
   -------------------------------------------------------------------------- */

.person-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all .3s var(--ease);
    height: 100%;
    display: flex; flex-direction: column;
}
.person-card:hover { box-shadow: var(--shadow-card); transform: translateY(-4px); }

.person-card__photo {
    aspect-ratio: 3 / 4;
    background: var(--sand-100);
    overflow: hidden;
}
.person-card__photo img { width: 100%; height: 100%; object-fit: cover; }

.person-card__body { padding: 18px; text-align: center; flex: 1; }
.person-card__name {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 600;
    color: var(--navy-900);
    margin: 0 0 4px;
}
.person-card__position { font-size: .82rem; color: var(--gold-600); margin: 0 0 8px; }
.person-card__meta { font-size: .78rem; color: var(--muted); margin: 0; }

/* Batafsil (rahbariyat) ko'rinishi */
.person-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 26px;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 20px;
}
.person-row__photo {
    aspect-ratio: 3 / 4;
    border-radius: var(--r-md);
    object-fit: cover;
    background: var(--sand-100);
    width: 100%;
}
.person-row__facts { display: grid; gap: 8px; margin-top: 14px; }
.person-row__fact { display: flex; gap: 10px; font-size: .865rem; }
.person-row__fact dt { color: var(--muted); min-width: 130px; margin: 0; }
.person-row__fact dd { margin: 0; font-weight: 500; color: var(--ink); }

/* --------------------------------------------------------------------------
   Maqola sahifasi
   -------------------------------------------------------------------------- */

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

.article__cover {
    width: 100%;
    border-radius: var(--r-lg);
    margin-bottom: 26px;
    box-shadow: var(--shadow-card);
}

.article__meta {
    display: flex; flex-wrap: wrap; gap: 18px;
    padding-bottom: 18px; margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
    font-size: .84rem; color: var(--muted);
}
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.article__meta svg { width: 15px; height: 15px; opacity: .7; }

.prose { font-size: 1.02rem; line-height: 1.8; color: #2A3242; }
.prose > *:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.8em; }
.prose img { border-radius: var(--r-md); margin: 1.6em 0; box-shadow: var(--shadow-sm); }
.prose blockquote {
    margin: 1.8em 0;
    padding: 18px 26px;
    border-inline-start: 4px solid var(--gold-500);
    background: var(--sand-50);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-family: var(--font-display);
    font-size: 1.06rem;
    color: var(--navy-800);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92rem; }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line); text-align: start; }
.prose th { background: var(--sand-50); font-weight: 600; color: var(--navy-900); }
.prose ul li::marker, .prose ol li::marker { color: var(--gold-600); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tag {
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--sand-100);
    color: var(--navy-700);
    font-size: .78rem;
}

.share-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 30px; padding-top: 22px;
    border-top: 1px solid var(--line);
}
.share-bar__label { font-size: .85rem; font-weight: 600; color: var(--navy-800); }

/* Yon panel */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 26px; }

.widget {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
}
.widget--sand { background: var(--sand-50); }
.widget__title {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 600;
    color: var(--navy-900);
    margin: 0 0 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.widget__links { list-style: none; margin: 0; padding: 0; }
.widget__links li + li { margin-top: 2px; }
.widget__links a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    font-size: .875rem;
    color: var(--ink);
}
.widget__links a:hover { background: var(--sand-100); color: var(--navy-900); }
.widget__links a.is-active { background: var(--navy-800); color: #fff; }
.widget__count {
    font-size: .72rem; padding: 2px 8px; border-radius: 999px;
    background: var(--sand-100); color: var(--muted);
}
.widget__links a.is-active .widget__count { background: rgba(255, 255, 255, .18); color: #fff; }

/* --------------------------------------------------------------------------
   Formalar
   -------------------------------------------------------------------------- */

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(22px, 3vw, 36px);
    box-shadow: var(--shadow-sm);
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.form-grid--full { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--navy-800);
}
.field .req { color: var(--danger); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field input[type="url"],
.field input[type="password"],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font: 400 .92rem var(--font-body);
    color: var(--ink);
    background: #fff;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(224, 181, 98, .22);
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid { border-color: var(--danger); }

.field__error { font-size: .78rem; color: var(--danger); }
.field__hint { font-size: .76rem; color: var(--muted); }

.check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .87rem; color: var(--ink);
    cursor: pointer;
}
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--navy-700); flex: 0 0 18px; }

.file-input {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    background: var(--sand-50);
    font-size: .85rem;
    cursor: pointer;
}
.file-input:hover { border-color: var(--gold-400); }
.file-input input[type="file"] { flex: 1; font-size: .82rem; }

/* Xabarlar */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-md);
    font-size: .885rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }
.alert-success { background: #E8F5EE; border-color: #B9E0CB; color: #12603C; }
.alert-danger { background: #FBEAEC; border-color: #F0C2C7; color: #8C1F2A; }
.alert-info { background: #E9F0FA; border-color: #C3D5EE; color: var(--navy-700); }

/* --------------------------------------------------------------------------
   Tuzilma sxemasi (org chart)
   -------------------------------------------------------------------------- */

.org-chart { display: grid; gap: 34px; }

.org-level { display: grid; gap: 16px; justify-items: center; }

.org-level__title {
    font-size: .78rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold-600);
    text-align: center;
}

.org-nodes {
    display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}

.org-node {
    min-width: 200px; max-width: 260px;
    padding: 15px 18px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    text-align: center;
    font-size: .865rem;
    line-height: 1.45;
    transition: all .25s var(--ease);
}
.org-node:hover { border-color: var(--gold-400); box-shadow: var(--shadow-card); transform: translateY(-3px); }

.org-node--primary {
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    color: #fff; border-color: transparent;
}
.org-node--primary .org-node__sub { color: rgba(255, 255, 255, .7); }

.org-node__title { font-weight: 600; color: inherit; display: block; }
.org-node__sub { font-size: .78rem; color: var(--muted); margin-top: 3px; display: block; }

.org-connector {
    width: 2px; height: 28px;
    background: linear-gradient(var(--gold-400), var(--line-strong));
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Akkordeon (savol-javob)
   -------------------------------------------------------------------------- */

.accordion { display: grid; gap: 12px; }

.accordion__item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: box-shadow .25s var(--ease);
}
.accordion__item[open] { box-shadow: var(--shadow-card); border-color: var(--gold-300); }

.accordion__head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 17px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
    color: var(--navy-900);
    list-style: none;
}
.accordion__head::-webkit-details-marker { display: none; }
.accordion__head::after {
    content: '+';
    flex: 0 0 auto;
    font-size: 1.35rem; line-height: 1; color: var(--gold-600);
    transition: transform .25s var(--ease);
}
.accordion__item[open] .accordion__head::after { content: '−'; }

.accordion__body {
    padding: 0 20px 20px;
    font-size: .92rem;
    color: var(--muted);
    line-height: 1.75;
}
.accordion__meta {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: .78rem; color: var(--muted);
    display: flex; gap: 16px; flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Galereya
   -------------------------------------------------------------------------- */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.photo-grid a {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--sand-100);
    position: relative;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.photo-grid a:hover img { transform: scale(1.08); }

.lightbox {
    position: fixed; inset: 0; z-index: 300;
    display: none;
    place-items: center;
    background: rgba(6, 18, 38, .94);
    padding: 24px;
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: min(94vw, 1200px); max-height: 88vh; border-radius: var(--r-md); }
.lightbox__close {
    position: absolute; top: 20px; inset-inline-end: 24px;
    width: 44px; height: 44px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff; font-size: 1.5rem; cursor: pointer;
}
.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff; font-size: 1.5rem; cursor: pointer;
}
.lightbox__nav--prev { inset-inline-start: 20px; }
.lightbox__nav--next { inset-inline-end: 20px; }

/* --------------------------------------------------------------------------
   Video / audio
   -------------------------------------------------------------------------- */

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-card);
}
.video-frame iframe,
.video-frame video { width: 100%; height: 100%; border: 0; display: block; }

.play-badge {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: rgba(10, 34, 71, .28);
    transition: background .3s var(--ease);
}
.card:hover .play-badge { background: rgba(10, 34, 71, .5); }
.play-badge span {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .92);
    color: var(--navy-800);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
    transition: transform .3s var(--ease);
}
.card:hover .play-badge span { transform: scale(1.1); }
.play-badge svg { width: 20px; height: 20px; margin-inline-start: 3px; }

.audio-player { width: 100%; margin-top: 14px; }

/* --------------------------------------------------------------------------
   Nashrlar (kitob muqovalari)
   -------------------------------------------------------------------------- */

.book-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    height: 100%;
    transition: all .3s var(--ease);
}
.book-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }

.book-card__cover {
    aspect-ratio: 3 / 4;
    background: linear-gradient(140deg, var(--sand-100), var(--sand-200));
    overflow: hidden;
}
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }

.book-card__body { padding: 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.book-card__title {
    font-family: var(--font-display);
    font-size: .95rem; font-weight: 600; line-height: 1.4;
    margin: 0; color: var(--navy-900);
}
.book-card__author { font-size: .78rem; color: var(--muted); margin: 0; flex: 1; }
.book-card__foot { display: flex; align-items: center; justify-content: space-between; font-size: .76rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Sahifalash
   -------------------------------------------------------------------------- */

.pagination {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center;
    margin-top: 40px; padding: 0; list-style: none;
}

.pagination a,
.pagination span {
    display: grid; place-items: center;
    min-width: 40px; height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: .875rem;
    color: var(--navy-800);
    background: #fff;
}
.pagination a:hover { border-color: var(--gold-400); color: var(--gold-600); }
.pagination .is-active span,
.pagination span[aria-current] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pagination .is-disabled span { opacity: .4; }

/* --------------------------------------------------------------------------
   Bo'sh holat
   -------------------------------------------------------------------------- */

.empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--sand-50);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
    color: var(--muted);
}
.empty-state svg { width: 44px; height: 44px; opacity: .35; margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--navy-900);
    color: rgba(255, 255, 255, .72);
    font-size: .885rem;
    padding-top: 56px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute; top: 0; inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-300), var(--gold-600));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__brand { margin-bottom: 18px; color: #fff; }

.footer__title {
    font-family: var(--font-display);
    font-size: .98rem; font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}

.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer__links a { color: rgba(255, 255, 255, .72); font-size: .865rem; }
.footer__links a:hover { color: var(--gold-300); padding-inline-start: 5px; }

.footer__contact { display: grid; gap: 12px; }
.footer__contact-item { display: flex; gap: 11px; align-items: flex-start; }
.footer__contact-item svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 3px; color: var(--gold-400); }
.footer__contact-item a { color: rgba(255, 255, 255, .8); }

.subscribe-form { display: flex; gap: 8px; margin-top: 16px; }
.subscribe-form input {
    flex: 1; min-width: 0;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font: 400 .85rem var(--font-body);
}
.subscribe-form input::placeholder { color: rgba(255, 255, 255, .45); }
.subscribe-form input:focus { outline: none; border-color: var(--gold-400); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 20px 0;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
}

.to-top {
    position: fixed;
    inset-inline-end: 24px; bottom: 24px;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: var(--navy-800);
    color: #fff;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: all .3s var(--ease);
    box-shadow: var(--shadow-card);
    z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--gold-600); }

/* --------------------------------------------------------------------------
   Xatolik sahifalari
   -------------------------------------------------------------------------- */

.error-page {
    min-height: 70vh;
    display: grid; place-items: center;
    text-align: center;
    padding: 60px 24px;
}
.error-page__code {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 3rem + 8vw, 9rem);
    font-weight: 600;
    line-height: 1;
    color: var(--gold-300);
    margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   RTL (arab tili)
   -------------------------------------------------------------------------- */

[dir="rtl"] body { font-family: 'Noto Naskh Arabic', 'Amiri', var(--font-body); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: 'Amiri', 'Noto Naskh Arabic', var(--font-display); }
[dir="rtl"] .main-nav__link.is-current::after { left: 13px; right: 13px; }
[dir="rtl"] .mobile-nav__panel { animation-name: slideInRtl; }

@keyframes slideInRtl {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Moslashuvchanlik
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
    .main-nav__link { padding: 10px 9px; font-size: .82rem; }
    .brand__name { max-width: 13ch; font-size: 12px; }
    .brand__logo { width: 44px; height: 44px; flex: 0 0 44px; }
}

@media (max-width: 1024px) {
    :root { --header-h: 72px; }

    .main-nav { display: none; }
    .nav-toggle { display: grid; }

    .article-layout { grid-template-columns: 1fr; gap: 34px; }
    .sidebar { position: static; }

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

@media (max-width: 860px) {
    .person-row { grid-template-columns: 1fr; }
    .person-row__photo { max-width: 220px; }
    .card--row { flex-direction: column; }
    .card--row .card__media { width: 100%; flex: none; aspect-ratio: 16 / 10; }
    .span-2 { grid-column: auto; }
}

@media (max-width: 720px) {
    :root { --pad: 16px; }

    .topbar__inner { justify-content: center; }
    .topbar__right { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
    .prayer-times { justify-content: center; font-size: .72rem; }
    .prayer-times__item { padding: 3px 8px; }

    .hero__inner { padding: 52px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
    .prayer-times__label { display: none; }
    .hero__actions .btn { width: 100%; justify-content: center; }
    .subscribe-form { flex-direction: column; }
}

@media print {
    .topbar, .site-header, .site-footer, .to-top, .share-bar, .sidebar { display: none !important; }
    body { color: #000; }
    .prose { font-size: 12pt; }
}

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

/* ==========================================================================
   Bosh sahifa: asosiy panellar (slayderdan keyin) va
   "Yangiliklar va e'lonlar" — bitta qatorda uch kolonka
   ========================================================================== */

/* Butun kartani bosiladigan qiluvchi havola */
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }

.news-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    font-size: .76rem; color: var(--muted);
}
.news-meta span { display: inline-flex; align-items: center; gap: 5px; }
.news-meta svg { width: 13px; height: 13px; opacity: .75; }
.news-meta--light { color: rgba(255, 255, 255, .85); }

.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sand-100);
    color: var(--navy-700);
    font-size: .7rem; font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.4;
}
.pill--gold { background: var(--gold-500); color: #fff; }
.pill--new { background: rgba(21, 115, 71, .12); color: var(--success); }
.pill--new::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot { 50% { opacity: .3; } }

/* --- Asosiy panellar ------------------------------------------------------ */

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

.spotlight {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
}
/* Faqat bitta panel to'ldirilgan bo'lsa — butun kenglik */
.spotlight > .spot:only-child { grid-column: 1 / -1; }

.spot {
    position: relative;
    height: 420px;
    border-radius: var(--r-xl);
    overflow: hidden;
    isolation: isolate;
    display: flex; align-items: flex-end;
    background: var(--navy-900);
    box-shadow: var(--shadow-card);
}
/* Rasm o'z o'lchamida emas — panelni to'ldiradi */
.spot__img {
    position: absolute; inset: 0; z-index: -2;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%;
    transition: transform .9s var(--ease);
}
.spot::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(10, 34, 71, .05) 15%, rgba(10, 34, 71, .7) 55%, rgba(10, 34, 71, .96) 100%);
}
.spot:hover .spot__img { transform: scale(1.04); }

/* Asosiy panel: tepada oltin chiziq */
.spot--primary { box-shadow: var(--shadow-float); }
.spot--primary .spot__body::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 4px;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
}

.spot__body { padding: 30px; display: grid; gap: 10px; color: #fff; }
.spot__title {
    margin: 0;
    font-size: clamp(1.15rem, .95rem + .8vw, 1.45rem);
    line-height: 1.3;
    color: #fff;
}
.spot--primary .spot__title { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem); }
.spot__title a { color: inherit; }
.spot__excerpt {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: .92rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spot__more {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .85rem; font-weight: 600;
    color: var(--gold-300);
}
.spot__more svg { transition: transform .2s var(--ease); }
.spot:hover .spot__more svg { transform: translateX(4px); }

/* --- Yangiliklar va e'lonlar: uch kolonka -------------------------------- */

.news-board {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.board-col { display: grid; gap: 14px; min-width: 0; }
.board-col__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--line);
    position: relative;
}
.board-col__head::after {
    content: ''; position: absolute; inset-inline-start: 0; bottom: -2px;
    width: 56px; height: 2px; background: var(--gold-500);
}
.board-col__head h3 {
    margin: 0;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1.12rem;
    color: var(--navy-900);
}
.board-col__head h3 svg { color: var(--gold-600); }
.board-col__head .link-more { font-size: .8rem; }
.board-col__empty { margin: 0; padding: 18px 0; color: var(--muted); font-size: .9rem; }

/* Joriy yangilik kartasi */
.current-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.current-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: transparent; }
.current-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand-100); }
.current-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.current-card:hover .current-card__media img { transform: scale(1.05); }
.current-card__pill { position: absolute; top: 14px; inset-inline-start: 14px; }
.current-card__body { padding: 18px 20px 20px; display: grid; gap: 10px; }
.current-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem; line-height: 1.35;
    color: var(--navy-900);
}
.current-card__title a { color: inherit; }
.current-card:hover .current-card__title { color: var(--gold-700); }
.current-card__excerpt {
    margin: 0; font-size: .88rem; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.current-card__more {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .84rem; font-weight: 600; color: var(--navy-700);
}

/* Ro'yxat elementi: rasm + sana + sarlavha */
.board-item {
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: var(--r-md);
    transition: background .25s var(--ease);
}
.board-item:hover { background: var(--sand-50); }
.board-item__thumb {
    aspect-ratio: 4 / 3;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--sand-100);
}
.board-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.board-item:hover .board-item__thumb img { transform: scale(1.07); }
.board-item__body { display: grid; gap: 6px; min-width: 0; }
.board-item__date {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-size: .74rem; color: var(--muted);
}
.board-item__date svg { opacity: .7; }
.board-item__title {
    margin: 0;
    font-family: var(--font-body);
    font-size: .9rem; font-weight: 600; line-height: 1.4;
    color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.board-item__title a { color: inherit; }
.board-item:hover .board-item__title { color: var(--gold-700); }

/* E'lonlar kolonkasi — yengil fon bilan ajratiladi */
.board-col--notice {
    padding: 18px 16px 10px;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, #F2F5FA, #F8FAFD);
    border: 1px solid var(--line);
}
.board-col--notice .board-item:hover { background: #fff; }

/* --- RTL ------------------------------------------------------------------ */

[dir="rtl"] .spot__more svg,
[dir="rtl"] .current-card__more svg { transform: scaleX(-1); }
[dir="rtl"] .spot:hover .spot__more svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .board-item__title,
[dir="rtl"] .current-card__title { font-family: 'Noto Naskh Arabic', 'Amiri', var(--font-body); }

/* --- Moslashuvchanlik ----------------------------------------------------- */

@media (max-width: 1100px) {
    /* Joriy yangilik tepada, ikki ro'yxat yonma-yon */
    .news-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .board-col--current { grid-column: 1 / -1; }
    .current-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
    .current-card__media { aspect-ratio: auto; min-height: 260px; }
}

@media (max-width: 860px) {
    .spotlight { grid-template-columns: 1fr; }
    .spot { height: 360px; }
}

@media (max-width: 720px) {
    .spotlight-section { padding-top: 24px; }
    .spot { height: 320px; border-radius: var(--r-lg); }
    .spot__body { padding: 22px; }

    .news-board { grid-template-columns: 1fr; gap: 32px; }
    .current-card { display: block; }
    .current-card__media { aspect-ratio: 16 / 10; min-height: 0; }
    .board-item { grid-template-columns: 88px minmax(0, 1fr); padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .pill--new::before { animation: none; }
}

/* --------------------------------------------------------------------------
   Rasm cheklovlari: rasmlar o'z o'lchamida emas, ajratilgan joyiga moslashadi
   -------------------------------------------------------------------------- */

/* Maqola / sahifa / kafedra muqovasi — bir xil kenglik-balandlik nisbati */
.article__cover {
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center 30%;
    background: var(--sand-100);
}

/* Muharrirdan kelgan rasmlar: kenglik va balandlik cheklangan, nisbat saqlanadi */
.prose img {
    max-width: 100%;
    max-height: 640px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-inline: auto;
}

/* Media va nashr sahifalaridagi asosiy rasmlar */
.media-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--navy-900); }
.publication-cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-card); background: var(--sand-100); }

/* ==========================================================================
   Matbuot: Elektron kutubxona va Konferensiyalar
   ========================================================================== */

/* --- Umumiy: qidiruv, filtr chiplari ------------------------------------- */

.press-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 14px 24px;
    margin-bottom: 22px;
}

.press-search {
    position: relative;
    display: flex; align-items: center; gap: 8px;
    flex: 1 1 420px; max-width: 620px;
    padding: 6px;
    padding-inline-start: 44px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.press-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(192, 138, 46, .16); }
.press-search__icon {
    position: absolute; inset-inline-start: 16px; top: 50%;
    display: grid; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}
.press-search input {
    flex: 1; min-width: 0;
    padding: 9px 4px;
    border: 0; outline: 0; background: transparent;
    font: 400 .95rem var(--font-body); color: var(--ink);
}
.press-search .btn { flex: 0 0 auto; }
.press-search--compact { flex-basis: 360px; max-width: 460px; }

.press-count {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0; font-size: .86rem; color: var(--muted);
}
.press-count svg { color: var(--gold-600); }

.press-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 30px;
}
.press-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding-block: 7px;
    padding-inline: 15px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--navy-800);
    font-size: .84rem; font-weight: 500; line-height: 1.3;
    transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.press-chip:hover { border-color: var(--gold-400); color: var(--gold-700); background: rgba(224, 181, 98, .08); }
.press-chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.press-chip__count {
    min-width: 24px; padding: 1px 7px;
    border-radius: 999px;
    background: var(--sand-100); color: var(--muted);
    font-size: .72rem; font-weight: 600; text-align: center;
}
.press-chip.is-active .press-chip__count { background: rgba(255, 255, 255, .18); color: #fff; }

.press-result { margin: -8px 0 22px; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.press-result a { margin-inline-start: 10px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.press :is(a, button, summary):focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; }
.press-search input:focus-visible { outline: 0; }

.btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* --- Kitob kartochkasi --------------------------------------------------- */

.lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 30px 24px;
}
.lib-grid--compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.lib-card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.lib-card__cover {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--r-md);
    overflow: hidden;
    background: linear-gradient(140deg, var(--sand-100), var(--sand-200));
    box-shadow: 0 14px 28px -18px rgba(10, 34, 71, .55), 0 2px 6px -2px rgba(10, 34, 71, .18);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
/* Kitob umurtqasi effekti */
.lib-card__cover::after {
    content: ''; position: absolute; inset-block: 0; inset-inline-start: 0;
    width: 10px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .16), rgba(255, 255, 255, .12) 60%, transparent);
    pointer-events: none;
}
[dir="rtl"] .lib-card__cover::after { background: linear-gradient(-90deg, rgba(0, 0, 0, .16), rgba(255, 255, 255, .12) 60%, transparent); }
.lib-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-card:hover .lib-card__cover,
.lib-card:focus-within .lib-card__cover { transform: translateY(-6px); box-shadow: var(--shadow-float); }

.lib-card__badge {
    position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
    padding: 3px 8px;
    border-radius: var(--r-sm);
    background: var(--danger); color: #fff;
    font-size: .64rem; font-weight: 700; letter-spacing: .06em;
    box-shadow: 0 4px 10px -4px rgba(176, 42, 55, .6);
}

.lib-card__body { display: grid; gap: 4px; }
.lib-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: .98rem; font-weight: 600; line-height: 1.4;
    color: var(--navy-900);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.lib-card__title a { color: inherit; }
.lib-card:hover .lib-card__title { color: var(--gold-700); }
.press .lib-card__title a:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 3px; }
.lib-card__author,
.lib-card__meta { margin: 0; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.lib-card__author { color: var(--navy-600); font-weight: 500; }

/* --- Kitob sahifasi ------------------------------------------------------ */

.book-detail {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}
.book-detail__aside { position: sticky; top: calc(var(--header-h) + 24px); }
.book-detail__cover {
    margin: 0;
    aspect-ratio: 3 / 4;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: linear-gradient(140deg, var(--sand-100), var(--sand-200));
    box-shadow: var(--shadow-float);
}
.book-detail__cover img { width: 100%; height: 100%; object-fit: cover; }

.book-detail__main { min-width: 0; }
.book-detail__cat { display: inline-block; margin-bottom: 14px; transition: background .2s var(--ease), color .2s var(--ease); }
.book-detail__cat:hover { background: var(--navy-800); color: #fff; }
.book-detail__title {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem);
    overflow-wrap: anywhere;
}
.book-detail__author {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 24px;
    font-size: 1rem; font-weight: 500; color: var(--navy-600);
}
.book-detail__author svg { flex: 0 0 auto; color: var(--gold-600); }

.book-detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.book-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    margin: 0 0 32px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--sand-50);
    overflow: hidden;
}
.book-facts__row {
    display: grid; gap: 2px; align-content: start;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
    margin-block-end: -1px;
    margin-inline-end: -1px;
    min-width: 0;
}
.book-facts dt { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.book-facts dd { margin: 0; font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }

.book-detail__desc h3 { font-size: 1.15rem; margin-bottom: 12px; }
.book-detail__desc .prose { overflow-wrap: anywhere; }

.press-related { margin-top: clamp(48px, 6vw, 72px); padding-top: 40px; border-top: 1px solid var(--line); }
.press-related .section-head h2 { font-size: 1.5rem; }

/* --- Konferensiyalar ro'yxati -------------------------------------------- */

.conf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 26px;
}

.conf-card {
    position: relative;
    display: flex; flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.conf-card:hover,
.conf-card:focus-within { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: transparent; }
.conf-card:focus-within { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.conf-card:has(:focus:not(:focus-visible)) { outline: none; }
.press .conf-card__title a:focus-visible { outline: none; }

.conf-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-900); }
.conf-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.conf-card:hover .conf-card__media img { transform: scale(1.05); }

.conf-card__fallback {
    position: absolute; inset: 0;
    display: grid; place-content: center; justify-items: center; gap: 8px;
    color: var(--gold-300);
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(210, 162, 72, .35), transparent 60%),
        radial-gradient(60% 70% at 0% 100%, rgba(42, 92, 160, .55), transparent 70%),
        linear-gradient(150deg, var(--navy-700), var(--navy-900));
}
.conf-card__fallback::before {
    content: ''; position: absolute; inset: 14px;
    border: 1px solid rgba(224, 181, 98, .28);
    border-radius: var(--r-md);
}
.conf-card__fallback svg { opacity: .9; }
.conf-card__fallback span {
    font-family: var(--font-display);
    font-size: 1.6rem; font-weight: 700; letter-spacing: .08em;
    color: rgba(255, 255, 255, .92);
}

.conf-card__count {
    position: absolute; bottom: 12px; inset-inline-start: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(169, 118, 31, .94); color: #fff;
    font-size: .72rem; font-weight: 600;
    backdrop-filter: blur(4px);
}

.conf-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.conf-card__title {
    margin: 0;
    font-size: 1.12rem; line-height: 1.4;
    overflow-wrap: anywhere;
}
.conf-card__title a { color: var(--navy-900); }
.conf-card:hover .conf-card__title a { color: var(--gold-700); }
.conf-card__excerpt {
    margin: 0; font-size: .875rem; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.conf-card__more {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: auto; padding-top: 6px;
    font-size: .84rem; font-weight: 600; color: var(--navy-700);
}
.conf-card__more svg { transition: transform .2s var(--ease); }
.conf-card:hover .conf-card__more { color: var(--gold-700); }
.conf-card:hover .conf-card__more svg { transform: translateX(4px); }

/* --- Konferensiya sahifasi ----------------------------------------------- */

.conf-head {
    display: grid;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background:
        radial-gradient(60% 90% at 100% 0%, rgba(192, 138, 46, .08), transparent 70%),
        var(--sand-50);
    overflow: hidden;
}
.conf-head.has-cover { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.conf-head__media {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy-900);
}
/* Xiralashtirilgan fon — bo'sh joylarni to'ldiradi */
.conf-head__media::before {
    content: ''; position: absolute; inset: -20px; z-index: -1;
    background: var(--cover) center / cover no-repeat;
    filter: blur(18px) brightness(.55);
}
/* Rasm o'z o'lchamida emas: blokka sig'adi, to'liq ko'rinadi */
.conf-head__media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
}
.conf-head__body { padding: clamp(22px, 4vw, 38px); display: grid; gap: 22px; align-content: start; min-width: 0; }

.conf-head__facts {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 14px 30px;
}
.conf-head__facts li { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }
.conf-head__facts small {
    display: block;
    font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted);
}
.conf-head__ico {
    display: grid; place-items: center; flex: 0 0 42px;
    width: 42px; height: 42px;
    border-radius: var(--r-md);
    background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
    color: var(--gold-300);
}
.conf-head__desc { color: #2A3242; line-height: 1.8; overflow-wrap: anywhere; }
.conf-head__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Tezislar ro'yxati --------------------------------------------------- */

.papers { margin-top: clamp(40px, 5vw, 60px); scroll-margin-top: calc(var(--header-h) + 20px); }
.papers__head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 24px;
}
.papers__head h2 { margin: 0; font-size: clamp(1.35rem, 1.1rem + .8vw, 1.7rem); }

.paper-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.paper {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.paper::before {
    content: '';
    position: absolute; inset-block: 14px; inset-inline-start: -1px;
    width: 3px; border-radius: 3px;
    background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.paper:hover { box-shadow: var(--shadow-card); border-color: transparent; }
.paper:hover::before { opacity: 1; }

.paper__num {
    display: grid; place-items: center;
    min-width: 48px; height: 48px; padding: 0 8px;
    border-radius: var(--r-md);
    background: var(--sand-100);
    color: var(--navy-700);
    font: 700 .95rem/1 var(--font-display);
    transition: background .3s var(--ease), color .3s var(--ease);
}
.paper:hover .paper__num { background: var(--navy-800); color: var(--gold-300); }

.paper__body { display: grid; gap: 8px; min-width: 0; }
.paper__title {
    margin: 0;
    font-size: 1.04rem; line-height: 1.45;
    color: var(--navy-900);
    overflow-wrap: anywhere;
}
.paper__authors {
    display: flex; align-items: flex-start; gap: 7px;
    margin: 0; font-size: .9rem; font-weight: 500; color: var(--navy-600);
    overflow-wrap: anywhere;
}
.paper__authors svg { flex: 0 0 auto; margin-top: 3px; color: var(--gold-600); }
.paper__meta {
    display: flex; flex-wrap: wrap; gap: 6px 18px;
    margin: 0; font-size: .82rem; color: var(--muted);
}
.paper__meta span { display: inline-flex; align-items: flex-start; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.paper__meta svg { flex: 0 0 auto; margin-top: 2px; opacity: .7; }

.paper__extra summary {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 600; color: var(--navy-700);
    cursor: pointer; list-style: none;
    border-radius: var(--r-sm);
}
.paper__extra summary::-webkit-details-marker { display: none; }
.paper__extra summary:hover { color: var(--gold-700); }
.paper__extra summary svg { transition: transform .2s var(--ease); }
.paper__extra[open] summary svg { transform: rotate(180deg); }
.paper__extra-body {
    margin-top: 10px; padding: 12px 16px;
    border-inline-start: 3px solid var(--gold-400);
    border-radius: var(--r-sm);
    background: var(--sand-50);
    font-size: .86rem; line-height: 1.7; color: #2A3242;
    overflow-wrap: anywhere;
}

.paper__action { align-self: center; }
.paper__download, .paper__action .is-disabled { white-space: nowrap; }
.paper__action .is-disabled { font-weight: 500; }
.paper__pdf {
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--danger); color: #fff;
    font-size: .6rem; font-weight: 700; letter-spacing: .06em; line-height: 1.2;
    transition: background .2s var(--ease);
}
.paper__download:hover .paper__pdf { background: var(--gold-600); }

/* --- RTL ----------------------------------------------------------------- */

[dir="rtl"] .press-related .link-more svg,
[dir="rtl"] .conf-card__more svg { transform: scaleX(-1); }
[dir="rtl"] .press-related .link-more:hover svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .conf-card:hover .conf-card__more svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .lib-card__title,
[dir="rtl"] .conf-card__title,
[dir="rtl"] .paper__title,
[dir="rtl"] .book-detail__title { font-family: 'Noto Naskh Arabic', 'Amiri', var(--font-display); }

/* --- Moslashuvchanlik ---------------------------------------------------- */

@media (max-width: 1024px) {
    .conf-head.has-cover { grid-template-columns: 1fr; }
    .conf-head__media { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 860px) {
    .book-detail { grid-template-columns: 1fr; }
    .book-detail__aside { position: static; max-width: 280px; width: 100%; margin-inline: auto; }
}

@media (max-width: 620px) {
    .press-toolbar { align-items: stretch; }
    .press-search, .press-search--compact { flex-basis: 100%; max-width: none; }
    .press-chips {
        flex-wrap: nowrap; overflow-x: auto;
        margin-inline: calc(var(--pad) * -1);
        padding: 2px var(--pad) 8px;
        scrollbar-width: thin;
    }
    .press-chip { flex: 0 0 auto; }

    .lib-grid, .lib-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
    .lib-card__title { font-size: .9rem; }

    .book-detail__actions .btn { flex: 1 1 100%; justify-content: center; }
    .book-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-facts__row { padding: 12px 14px; }

    .paper { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
    .paper__num { min-width: 40px; height: 40px; font-size: .85rem; }
    .paper__action { grid-column: 1 / -1; }
    .paper__action .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
    .press-search { padding-inline-start: 36px; }
    .press-search__icon { inset-inline-start: 12px; }
    .press-search .btn { padding-inline: 12px; }
    .lib-grid, .lib-grid--compact { gap: 20px 10px; }
    .book-facts { grid-template-columns: 1fr; }
    .conf-head__facts li { flex: 1 1 100%; }
    .paper { grid-template-columns: minmax(0, 1fr); }
    .paper__num { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
    .lib-card__cover, .conf-card, .conf-card__media img, .paper, .paper__num, .press-chip { transition: none; }
    .lib-card:hover .lib-card__cover,
    .lib-card:focus-within .lib-card__cover,
    .conf-card:hover, .conf-card:focus-within,
    .conf-card:hover .conf-card__media img { transform: none; }
}

/* --------------------------------------------------------------------------
   Konferensiya: tezis sahifasi
   -------------------------------------------------------------------------- */

.paper__title a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
.paper__title a:hover,
.paper__title a:focus-visible { color: var(--gold-700); text-decoration: underline; text-underline-offset: 3px; }

.paper-detail { display: grid; gap: 22px; align-content: start; min-width: 0; }
.paper-detail > .pill { justify-self: start; }
.paper-detail__authors { margin: 0; font-size: 1.05rem; }
.paper-detail .book-facts { margin: 0; }
.paper-detail .book-facts dd a { color: var(--navy-700); font-weight: 600; }
.paper-detail .book-facts dd a:hover { color: var(--gold-700); }
.paper-detail .book-detail__desc { margin: 0; }
.paper-detail__back { justify-self: start; }
[dir="rtl"] .paper-detail__back svg { transform: scaleX(-1); }

.paper-others { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.paper-others li { display: grid; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.paper-others li:last-child { border-bottom: 0; }
.paper-others a {
    color: var(--navy-900); font-weight: 600; font-size: .9rem; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.paper-others a:hover { color: var(--gold-700); }
.paper-others span { font-size: .78rem; color: var(--muted); }
