
/* ===== Базовые стили ===== */
:root {
    --primary: #2c3e50;
    --accent: #c9a227;
    --accent-light: #e0c35a;
    --bg: #f7f5f0;
    --white: #ffffff;
    --text: #2c2c2c;
    --text-light: #666;
    --border: #e0ddd5;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 6px;
    --max-width: 1040px;
    --font: Arial, Helvetica, sans-serif;
    --font-sans: Arial, Helvetica, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===== Шапка ===== */
.site-header {
    background:
        linear-gradient(180deg, rgba(8,14,28,0.62) 0%, rgba(12,22,40,0.78) 100%),
        image-set(url('../img/header-bg.webp') type('image/webp'), url('../img/header-bg.jpg') type('image/jpeg')) center 40% / cover no-repeat;
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

html { overflow-x: hidden; }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6px 20px;
    flex-wrap: nowrap;
    gap: 12px;
}

.logo-text { min-width: 0; }

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

.logo-icon {
    width: 88px;
    height: 88px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 22px;
    font-weight: bold;
    color: var(--accent-light);
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
}

.logo-icon img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
}

.logo-block a.logo-icon { text-decoration: none; }

.logo-text h1, .logo-text .site-name {
    font-family: var(--font);
    font-size: 24px;
    line-height: 1.25;
    color: var(--white);
}

.logo-text .subtitle {
    font-size: 16px;
    color: var(--accent-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo-text .subtitle .in-dev {
    color: #fff;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.8px;
    margin-left: 0.55em;
    white-space: nowrap;
}

/* ===== Навигация ===== */
.main-nav {
    background: #243240;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.main-nav > ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 10px;
}

.main-nav li { position: relative; }

.main-nav a {
    display: block;
    padding: 12px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--white);
    border-bottom-color: var(--accent-light);
    background: rgba(255,255,255,0.05);
}

/* Бургер-меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
}

@media (max-width: 768px) {
    .logo-icon, .logo-icon img { width: 58px; height: 58px; }
    .logo-text h1, .logo-text .site-name { font-size: 18px; }
    .menu-toggle { display: block; }
    .main-nav > ul {
        display: none;
        flex-direction: column;
    }
    .main-nav.open > ul { display: flex; }
}

/* ===== Hero (главный экран) ===== */
.hero {
    background:
        linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.78) 100%),
        image-set(url('../img/nizhny-novgorod.webp') type('image/webp'), url('../img/nizhny-novgorod.jpg') type('image/jpeg')) center 45% / cover no-repeat;
    color: var(--white);
    padding: 60px 0 50px;
    position: relative;
    min-height: 220px;
}
.hero.hero-home { background-image: linear-gradient(135deg, rgba(12,24,40,0.42) 0%, rgba(18,32,50,0.58) 100%), image-set(url('../img/nizhny-novgorod.webp') type('image/webp'), url('../img/nizhny-novgorod.jpg') type('image/jpeg')); background-size: cover; background-position: center 55%; }
.hero.hero-about { background-image: linear-gradient(135deg, rgba(12,24,40,0.35) 0%, rgba(16,32,50,0.50) 100%), image-set(url('../img/kollazh-institut.webp') type('image/webp'), url('../img/kollazh-institut.jpg') type('image/jpeg')); background-size: cover; background-position: center 45%; }
.hero.hero-publications { background-image: linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.80) 100%), image-set(url('../img/publications.webp') type('image/webp'), url('../img/publications.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-article { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/article.webp') type('image/webp'), url('../img/article.jpg') type('image/jpeg')); background-size: cover; background-position: center 35%; }
.hero.hero-courses { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/courses.webp') type('image/webp'), url('../img/courses.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-journal { background-image: linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.80) 100%), image-set(url('../img/journal.webp') type('image/webp'), url('../img/journal.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-listeners { background-image: linear-gradient(135deg, rgba(20,32,48,0.68) 0%, rgba(28,44,62,0.76) 100%), image-set(url('../img/listeners.webp') type('image/webp'), url('../img/listeners.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-conferences { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/conferences.webp') type('image/webp'), url('../img/conferences.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-media { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/media.webp') type('image/webp'), url('../img/media.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-resources { background-image: linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.80) 100%), image-set(url('../img/resources.webp') type('image/webp'), url('../img/resources.jpg') type('image/jpeg')); background-size: cover; background-position: center; }
.hero.hero-contacts { background-image: linear-gradient(135deg, rgba(12,24,40,0.40) 0%, rgba(18,32,50,0.55) 100%), image-set(url('../img/golgofa.webp') type('image/webp'), url('../img/golgofa.jpg') type('image/jpeg')); background-size: cover; background-position: center 60%; }

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
}

.hero h2, .hero h1 {
    font-family: var(--font);
    font-size: 32px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero p {
    font-size: 17px;
    max-width: 700px;
    opacity: 0.9;
    margin-bottom: 28px;
}

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover { background: var(--accent-light); color: var(--white); }

.btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
    background: transparent;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

.btn-dark {
    background: var(--primary);
    color: var(--white);
}
.btn-dark:hover { background: #3d556b; color: var(--white); }

/* ===== Секции ===== */
.section {
    padding: 50px 0;
}

.section-title {
    font-family: var(--font);
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.section-title.center {
    text-align: center;
    display: block;
    border-bottom: none;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 36px;
    font-size: 15px;
}

/* ===== Сетка карточек ===== */
.grid {
    display: grid;
    gap: 24px;
}

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

@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== Карточка статьи ===== */
.pub-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.pub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.pub-card .pub-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
}

.pub-card h3 {
    font-family: var(--font);
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.pub-card h3 a { color: var(--primary); }
.pub-card h3 a:hover { color: var(--accent); }

.pub-card .pub-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.pub-card .pub-meta span { margin-right: 12px; }

.pub-card .pub-abstract {
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
    flex-grow: 1;
}

.pub-card .pub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f0ede5;
    color: var(--text-light);
}

.tag-doi {
    background: #e8eaf6;
    color: #3949ab;
}

.pub-card .pub-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.pub-card .pub-link {
    font-size: 14px;
    font-weight: 600;
}

/* ===== Фильтры ===== */
.filters {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filters h4 {
    font-family: var(--font);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 16px;
}

.filter-group {
    margin-bottom: 18px;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-sans);
    background: #fafafa;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .filter-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .filter-row { grid-template-columns: 1fr; }
}

/* ===== Карточка события ===== */
.event-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.event-card:hover { transform: translateY(-3px); }

.event-card .event-banner {
    background:
        linear-gradient(135deg, rgba(20,32,48,0.62) 0%, rgba(40,55,72,0.70) 100%),
        image-set(url('../img/hall-sm.webp') type('image/webp'), url('../img/hall-sm.jpg') type('image/jpeg')) center / cover no-repeat;
    background-color: var(--primary);
    color: var(--white);
    padding: 28px 24px 24px;
    min-height: 120px;
}

.event-card .event-date {
    font-size: 13px;
    color: var(--accent-light);
    margin-bottom: 6px;
}

.event-card .event-banner h3 {
    font-family: var(--font);
    font-size: 18px;
}

.event-card .event-body {
    padding: 20px 24px;
}

.event-card .event-body p {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
}

.event-card .event-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.event-card .event-meta span { margin-right: 14px; }

.event-card .event-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.event-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-upcoming { background: #e8f5e9; color: #2e7d32; }
.badge-past { background: #f5f5f5; color: #888; }

/* ===== Видео галерея ===== */
.video-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.video-card:hover { transform: translateY(-3px); }

.video-thumb {
    width: 100%;
    height: 180px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.video-thumb::before {
    content: '▶';
    font-size: 42px;
    color: rgba(255,255,255,0.8);
    position: absolute;
}

.video-thumb.bg1 { background: linear-gradient(135deg, rgba(20,32,48,.45), rgba(40,55,72,.5)), image-set(url('../img/lecture-sm.webp') type('image/webp'), url('../img/lecture-sm.jpg') type('image/jpeg')) center/cover; }
.video-thumb.bg2 { background: linear-gradient(135deg, rgba(20,32,48,.45), rgba(40,55,72,.5)), image-set(url('../img/church-sm.webp') type('image/webp'), url('../img/church-sm.jpg') type('image/jpeg')) center/cover; }
.video-thumb.bg3 { background: linear-gradient(135deg, rgba(20,32,48,.45), rgba(40,55,72,.5)), image-set(url('../img/hall-sm.webp') type('image/webp'), url('../img/hall-sm.jpg') type('image/jpeg')) center/cover; }

.video-card .video-info {
    padding: 16px;
}

.video-card .video-info h4 {
    font-family: var(--font);
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 6px;
}

.video-card .video-info p {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== Фото галерея ===== */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .photo-gallery { grid-template-columns: repeat(2, 1fr); }
}

.photo-item {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.photo-item .photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 10px;
}

.photo-item .ph1 { background: image-set(url('../img/conferences-sm.webp') type('image/webp'), url('../img/conferences-sm.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph2 { background: image-set(url('../img/church-sm.webp') type('image/webp'), url('../img/church-sm.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph3 { background: image-set(url('../img/lecture-sm.webp') type('image/webp'), url('../img/lecture-sm.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph4 { background: image-set(url('../img/hall-sm.webp') type('image/webp'), url('../img/hall-sm.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph5 { background: image-set(url('../img/resources-sm.webp') type('image/webp'), url('../img/resources-sm.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph6 { background: image-set(url('../img/listeners-sm.webp') type('image/webp'), url('../img/listeners-sm.jpg') type('image/jpeg')) center/cover; }

.album-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.album-card:hover { transform: translateY(-3px); }

.album-cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

.album-info {
    padding: 16px;
}

.album-info h4 {
    font-family: var(--font);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 4px;
}

.album-info p {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== О институте ===== */
.about-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.about-block h3 {
    font-family: var(--font);
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.about-block p { margin-bottom: 14px; }

.about-block ul {
    list-style: none;
    padding-left: 0;
}

.about-block ul li {
    padding: 6px 0 6px 24px;
    position: relative;
}

.about-block ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.team-card {
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 28px;
    margin: 0 auto 14px;
}

.team-card h4 {
    font-family: var(--font);
    font-size: 17px;
    color: var(--primary);
    margin-bottom: 4px;
}

.team-card .team-role {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 8px;
}

.team-card p {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== Ресурсы ===== */
.resource-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.2s;
}

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

.resource-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f0ede5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.resource-card h4 {
    font-family: var(--font);
    font-size: 17px;
    color: var(--primary);
    margin-bottom: 6px;
}

.resource-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== Контакты ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.contact-info h3 {
    font-family: var(--font);
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 14px;
}

.contact-info .contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.contact-info .contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0ede5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.contact-info .contact-item p {
    font-size: 14px;
    padding-top: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-sans);
    background: #fafafa;
    margin-bottom: 14px;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Детальная страница статьи ===== */
.article-detail {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-detail .article-meta-top {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.article-detail .article-meta-top span { margin-right: 16px; }

.article-detail h1 {
    font-family: var(--font);
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.35;
}

.article-detail .article-author {
    font-size: 15px;
    color: var(--accent);
    margin-bottom: 24px;
    font-weight: 600;
}

.article-detail .article-abstract {
    background: #f7f5f0;
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 28px;
    font-size: 15px;
    color: #444;
}

.article-detail .article-abstract strong {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 8px;
}

.article-detail .article-keywords {
    margin-bottom: 28px;
}

.article-detail .article-keywords strong {
    font-size: 14px;
    color: var(--primary);
}

.article-detail h2 {
    font-family: var(--font);
    font-size: 22px;
    color: var(--primary);
    margin: 28px 0 14px;
}

.article-detail p { margin-bottom: 16px; font-size: 15px; }

.article-detail .article-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* ===== Популярное на главной ===== */
.popular-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.popular-block h3 {
    font-family: var(--font);
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 16px;
}

.popular-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.popular-item:last-child { border-bottom: none; }

.popular-num {
    font-family: var(--font);
    font-size: 28px;
    color: var(--accent-light);
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
}

.popular-item .popular-text {
    font-size: 14px;
    color: var(--text);
}

.popular-item .popular-text a {
    font-weight: 600;
    color: var(--primary);
}

.popular-item .popular-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===== Стат-блок ===== */
.stats {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-item .stat-num {
    font-family: var(--font);
    font-size: 36px;
    color: var(--accent-light);
    font-weight: bold;
}

.stat-item .stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

/* ===== Подвал ===== */
.site-footer {
    background: #1e2a35;
    color: rgba(255,255,255,0.7);
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h4 {
    color: var(--accent-light);
    font-size: 15px;
    margin-bottom: 14px;
    font-family: var(--font);
}

.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul li a { font-size: 14px; color: rgba(255,255,255,0.6); }
.site-footer ul li a:hover { color: var(--white); }

.footer-logo-block { margin-bottom: 14px; }
.footer-logo-block .logo-icon {
    width: 56px;
    height: 56px;
    background: #fff;
}
.footer-logo-block .logo-icon img {
    width: 56px;
    height: 56px;
}

/* Homepage extras */
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.stats { background: var(--primary); color: #fff; padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 600px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-item .stat-num { font-family: var(--font); font-size: 36px; color: var(--accent-light); font-weight: bold; }
.stat-item .stat-label { font-size: 14px; opacity: 0.8; margin-top: 4px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.5;
}

/* ===== Утилиты ===== */
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }

.playlist-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.playlist-tab {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-tab.active, .playlist-tab:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== Адаптив: планшет и телефон ===== */
@media (max-width: 1024px) {
    .container { padding: 0 16px; }
    .hero h2, .hero h1 { font-size: 28px; }
}

@media (max-width: 768px) {
    body { font-size: 18px; }
    .header-inner { padding: 6px 14px; }
    .logo-block { gap: 10px; flex: 1; min-width: 0; }
    .logo-text h1, .logo-text .site-name {
        font-size: 18px;
        white-space: normal;
    }
    .logo-text .subtitle { font-size: 14px; letter-spacing: 0.4px; }
    .menu-toggle {
        display: block;
        min-width: 44px;
        min-height: 44px;
        font-size: 26px;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.25);
        border-radius: 8px;
        flex-shrink: 0;
    }
    .main-nav > ul {
        display: none;
        flex-direction: column;
        padding: 6px 0 10px;
    }
    .main-nav.open > ul { display: flex; }
    .main-nav a {
        padding: 14px 18px;
        font-size: 18px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        border-left: 3px solid transparent;
    }
    .main-nav a:hover, .main-nav a.active {
        border-bottom-color: rgba(255,255,255,0.08);
        border-left-color: var(--accent-light);
    }
    .hero { padding: 36px 0 32px; }
    .hero h2, .hero h1 { font-size: 26px; }
    .hero p { font-size: 17px; margin-bottom: 20px; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn,
    .btn { width: 100%; text-align: center; }
    .section { padding: 32px 0; }
    .section-title { font-size: 24px; }
    .article-detail { padding: 20px 16px; }
    .article-detail h1 { font-size: 24px; }
    .article-detail p { font-size: 17px; }
    p, li, .card p, .pub-card p, .event-card .event-body p,
    .resource-card p, .about-block p, .hint, .today-label {
        font-size: 17px;
    }
    .site-footer ul li a { font-size: 16px; }
    .stat-item .stat-label { font-size: 15px; }
    .journal-table { font-size: 15px; }
    .article-detail .article-footer { flex-direction: column; }
    .about-block { padding: 20px 16px; }
    .pub-card, .event-card .event-body, .resource-card { padding: 16px; }
    .filters { padding: 16px; }
    .contact-form input,
    .contact-form textarea,
    .filter-group select,
    .filter-group input {
        font-size: 16px; /* без автозума iOS */
    }
    .stats-grid { gap: 12px; }
    .stat-item .stat-num { font-size: 28px; }
    .footer-grid { gap: 22px; }
    .photo-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
}

@media (max-width: 480px) {
    body { font-size: 17px; }
    .logo-text h1 br, .logo-text .site-name br { display: none; }
    .logo-text h1, .logo-text .site-name { font-size: 17px; }
    .logo-icon, .logo-icon img { width: 52px; height: 52px; }
    .hero h2, .hero h1 { font-size: 24px; }
    .hero p { font-size: 16px; }
    .section-title { font-size: 22px; }
    .article-detail h1 { font-size: 22px; }
    .article-detail p, p, li { font-size: 16px; }
    .grid { gap: 14px; }
    .photo-gallery { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .filter-row { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
    .menu-toggle { display: none !important; }
    .main-nav > ul { display: flex !important; flex-direction: row; }
}

/* ===== Журнал ===== */
.journal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 12px;
}
.journal-controls label { font-size: 13px; color: var(--text-light); display: flex; flex-direction: column; gap: 4px; }
.journal-controls select,
.journal-toolbar input {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    background: #fff;
}
.journal-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.journal-toolbar input { flex: 1; min-width: 200px; }
.today-label { font-size: 14px; color: var(--text-light); padding-bottom: 8px; }
.file-btn { color: var(--primary); border-color: var(--primary); background: #fff; cursor: pointer; margin: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.journal-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.journal-table th, .journal-table td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: middle; }
.journal-table th { background: #f3f0ea; font-size: 13px; }
.journal-table .center { text-align: center; }
.att-select { padding: 4px; border-radius: 4px; border: 1px solid var(--border); }
.att-present { background: #e8f5e9; }
.att-absent { background: #fdecea; }
.att-late { background: #fff8e1; }
.mark { display: inline-block; min-width: 24px; text-align: center; border-radius: 4px; padding: 2px 6px; margin: 0 2px; background: #f0ede5; }
.mark-5 { background: #e8f5e9; }
.mark-4 { background: #e3f2fd; }
.mark-3 { background: #fff8e1; }
.mark-2 { background: #fdecea; }
.mark-btn { margin-right: 4px; border: 1px solid var(--border); background: #fff; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-family: Arial, Helvetica, sans-serif; }
.mark-btn:hover { background: var(--primary); color: #fff; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.hint { color: var(--text-light); font-size: 14px; margin-bottom: 12px; }

/* ===== Выпадающее меню Образование ===== */
.has-sub { position: relative; }
.main-nav .submenu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #1b2c3c;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
    z-index: 200;
    padding: 6px 0;
    list-style: none;
    margin: 0;
    flex-direction: column;
}
.main-nav .has-sub.open > .submenu {
    display: block !important;
}
.submenu a {
    padding: 10px 16px;
    border-bottom: none !important;
    font-size: 13px;
    white-space: nowrap;
}
.submenu a:hover, .submenu a.active {
    background: rgba(255,255,255,0.08);
    border-left: 3px solid var(--accent-light);
}
@media (max-width: 768px) {
    .main-nav .submenu {
        position: static;
        box-shadow: none;
        background: #172636;
        padding-left: 8px;
    }
}

.about-block, .section-title { scroll-margin-top: 140px; }


.page-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
    margin: 0 0 24px;
    padding: 10px 0 14px;
    border-top: 1px solid #d4a017;
    border-bottom: 1px solid #d4a017;
}
.page-subnav a {
    padding: 4px 14px;
    font-size: 14px;
    color: #2c3e50;
    border-right: 1px solid #d4a017;
}
.page-subnav a:last-child { border-right: none; }
.page-subnav a:hover { color: #c9a227; }
.section-title {
    border-bottom-color: #d4a017;
}
.main-nav {
    border-top: 1px solid rgba(212,160,23,0.45);
    border-bottom: 2px solid #d4a017;
}


/* Performance */
img { height: auto; }
.section { content-visibility: auto; contain-intrinsic-size: auto 1px auto 700px; }
html.cv-all .section { content-visibility: visible; }
.site-header { content-visibility: visible; }
@media (max-width: 768px) {
    .hero { min-height: 180px; padding: 36px 0 32px; }
}

.page-banner-photo {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.page-banner-photo img {
    width: 100%;
    height: auto;
    display: block;
}
.page-banner-photo figcaption {
    font-size: 13px;
    color: var(--text-light);
    padding: 8px 12px 10px;
    background: var(--white);
}


/* ===== Телефон: крупнее текст на всех страницах ===== */
@media (max-width: 768px) {
    html { font-size: 18px; }
    body { font-size: 18px !important; line-height: 1.75; }

    p, li, td, th, dd, dt, label, figcaption,
    .hint, .today-label, .meta, .card-meta,
    .pub-meta, .event-meta, .article-meta,
    .site-footer p, .site-footer li, .site-footer a,
    .about-block p, .about-block li,
    .pub-card p, .event-card p, .event-card .event-body p,
    .resource-card p, .card p,
    .article-detail p, .article-detail li,
    .article-detail .article-abstract,
    .article-detail .article-keywords,
    .article-detail .article-footer,
    .popular-block p, .popular-block li,
    .contact-block p, .filters p,
    .playlist-tab, .journal-controls label,
    .link-btn {
        font-size: 17px !important;
        line-height: 1.7;
    }

    h1, .article-detail h1, .logo-text h1, .logo-text .site-name {
        font-size: 22px !important;
    }
    h2, .hero h2, .section-title, .article-detail h2, .hero h1 {
        font-size: 24px !important;
    }
    h3, .pub-card h3, .event-card h3, .resource-card h3,
    .popular-block h3, .card h3 {
        font-size: 20px !important;
    }
    h4 { font-size: 18px !important; }

    .hero p { font-size: 18px !important; }
    .logo-text .subtitle { font-size: 15px !important; }
    .main-nav a { font-size: 18px !important; }
    .btn, .btn-primary, .btn-outline {
        font-size: 16px !important;
    }

    .article-detail .article-abstract strong,
    .article-detail .article-keywords strong {
        font-size: 15px !important;
    }

    .stat-item .stat-label { font-size: 15px !important; }
    .stat-item .stat-num { font-size: 30px !important; }
    .journal-table, .journal-table th, .journal-table td {
        font-size: 16px !important;
    }

    input, select, textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    html, body { font-size: 17px !important; }
    p, li, td, th, .article-detail p, .article-detail li,
    .pub-card p, .event-card p, .resource-card p,
    .about-block p, .site-footer p, .site-footer a {
        font-size: 17px !important;
    }
    h1, .article-detail h1 { font-size: 21px !important; }
    h2, .hero h2, .section-title, .hero h1 { font-size: 22px !important; }
    h3 { font-size: 19px !important; }
}

/* ===== Мобильные версии фоновых фото (в 2–3 раза легче) ===== */
@media (max-width: 800px) {
    .site-header { background-image: linear-gradient(180deg, rgba(8,14,28,0.62) 0%, rgba(12,22,40,0.78) 100%), image-set(url('../img/header-bg-sm.webp') type('image/webp'), url('../img/header-bg-sm.jpg') type('image/jpeg')); }
    .hero.hero-home { background-image: linear-gradient(135deg, rgba(12,24,40,0.42) 0%, rgba(18,32,50,0.58) 100%), image-set(url('../img/nizhny-novgorod-sm.webp') type('image/webp'), url('../img/nizhny-novgorod-sm.jpg') type('image/jpeg')); }
    .hero.hero-about { background-image: linear-gradient(135deg, rgba(12,24,40,0.35) 0%, rgba(16,32,50,0.50) 100%), image-set(url('../img/kollazh-institut-sm.webp') type('image/webp'), url('../img/kollazh-institut-sm.jpg') type('image/jpeg')); }
    .hero.hero-publications { background-image: linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.80) 100%), image-set(url('../img/publications-sm.webp') type('image/webp'), url('../img/publications-sm.jpg') type('image/jpeg')); }
    .hero.hero-article { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/article-sm.webp') type('image/webp'), url('../img/article-sm.jpg') type('image/jpeg')); }
    .hero.hero-courses { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/courses-sm.webp') type('image/webp'), url('../img/courses-sm.jpg') type('image/jpeg')); }
    .hero.hero-journal { background-image: linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.80) 100%), image-set(url('../img/journal-sm.webp') type('image/webp'), url('../img/journal-sm.jpg') type('image/jpeg')); }
    .hero.hero-listeners { background-image: linear-gradient(135deg, rgba(20,32,48,0.68) 0%, rgba(28,44,62,0.76) 100%), image-set(url('../img/listeners-sm.webp') type('image/webp'), url('../img/listeners-sm.jpg') type('image/jpeg')); }
    .hero.hero-conferences { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/conferences-sm.webp') type('image/webp'), url('../img/conferences-sm.jpg') type('image/jpeg')); }
    .hero.hero-media { background-image: linear-gradient(135deg, rgba(20,32,48,0.70) 0%, rgba(28,44,62,0.78) 100%), image-set(url('../img/media-sm.webp') type('image/webp'), url('../img/media-sm.jpg') type('image/jpeg')); }
    .hero.hero-resources { background-image: linear-gradient(135deg, rgba(20,32,48,0.72) 0%, rgba(28,44,62,0.80) 100%), image-set(url('../img/resources-sm.webp') type('image/webp'), url('../img/resources-sm.jpg') type('image/jpeg')); }
    .hero.hero-contacts { background-image: linear-gradient(135deg, rgba(12,24,40,0.40) 0%, rgba(18,32,50,0.55) 100%), image-set(url('../img/golgofa-sm.webp') type('image/webp'), url('../img/golgofa-sm.jpg') type('image/jpeg')); }
}

/* ===== Обложки фотоальбомов (раньше были в style= и грузили тяжёлые JPG) ===== */
.album-cover.ac1 { background: linear-gradient(135deg, rgba(20,32,48,.55), rgba(40,55,72,.55)), image-set(url('../img/conferences-sm.webp') type('image/webp'), url('../img/conferences-sm.jpg') type('image/jpeg')) center/cover; }
.album-cover.ac2 { background: linear-gradient(135deg, rgba(20,32,48,.5), rgba(40,55,72,.55)), image-set(url('../img/church-sm.webp') type('image/webp'), url('../img/church-sm.jpg') type('image/jpeg')) center/cover; }
.album-cover.ac3 { background: linear-gradient(135deg, rgba(20,32,48,.5), rgba(40,55,72,.55)), image-set(url('../img/lecture-sm.webp') type('image/webp'), url('../img/lecture-sm.jpg') type('image/jpeg')) center/cover; }
.album-cover.ac4 { background: linear-gradient(135deg, rgba(20,32,48,.5), rgba(40,55,72,.55)), image-set(url('../img/hall-sm.webp') type('image/webp'), url('../img/hall-sm.jpg') type('image/jpeg')) center/cover; }
.album-cover.ac5 { background: linear-gradient(135deg, rgba(20,32,48,.5), rgba(40,55,72,.55)), image-set(url('../img/resources-sm.webp') type('image/webp'), url('../img/resources-sm.jpg') type('image/jpeg')) center/cover; }
.album-cover.ac6 { background: linear-gradient(135deg, rgba(20,32,48,.5), rgba(40,55,72,.55)), image-set(url('../img/listeners-sm.webp') type('image/webp'), url('../img/listeners-sm.jpg') type('image/jpeg')) center/cover; }

/* ===== Отложенная загрузка фонов: картинка грузится, когда блок близко к экрану ===== */
.js .lazy-bg:not(.bg-in) { background-image: none !important; background-color: #3a4a5c; }

/* =====================================================================
   ДИНАМИКА САЙТА (../js/ui.js)
   Всё отключается, если в системе включено «Уменьшить движение».
   ===================================================================== */

/* Плавная прокрутка к якорям, не прячем заголовок под липкой шапкой */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 120px; }

/* Шапка: при прокрутке становится компактнее */
.site-header, .header-inner, .logo-icon, .logo-icon img, .logo-text h1, .logo-text .site-name {
    transition: padding .3s ease, width .3s ease, height .3s ease, font-size .3s ease, box-shadow .3s ease;
}
.site-header.is-compact { box-shadow: 0 4px 18px rgba(0,0,0,.28); }
@media (min-width: 769px) {
    .site-header.is-compact .header-inner { padding-top: 2px; padding-bottom: 2px; }
    .site-header.is-compact .logo-icon,
    .site-header.is-compact .logo-icon img { width: 58px; height: 58px; }
    .site-header.is-compact .logo-text h1, .site-header.is-compact .logo-text .site-name { font-size: 19px; }
}

/* Пункты меню: золотая линия выезжает из центра */
.main-nav a { position: relative; }
.main-nav a::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: 4px; height: 2px;
    background: var(--accent-light); border-radius: 2px;
    transition: left .25s ease, right .25s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { left: 14px; right: 14px; }

/* Мобильное меню: плавно раскрывается вместо резкого появления */
@media (max-width: 768px) {
    .js .main-nav > ul {
        display: flex !important;
        max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height .35s ease, opacity .25s ease;
    }
    .js .main-nav.open > ul { max-height: 80vh; opacity: 1; }
    .js .main-nav:not(.open) > ul { padding-top: 0; padding-bottom: 0; border-width: 0; }
    .main-nav a::after { display: none; }
    /* название не слипается и не залезает под кнопку меню */
    .logo-text h1 br, .logo-text .site-name br { display: none; }
    .logo-text h1, .logo-text .site-name { font-size: 16px; overflow-wrap: anywhere; hyphens: auto; }
    .logo-text .subtitle { font-size: 12px; }
}

/* Первый экран: текст мягко поднимается, фон медленно «дышит» */
.hero { overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.js .hero h2, .js .hero p, .js .hero .breadcrumb, .js .hero h1 { animation: heroUp .8s cubic-bezier(.2,.7,.2,1) both; }
.js .hero p { animation-delay: .12s; }
.js .hero .breadcrumb { animation-delay: .2s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Появление блоков при прокрутке */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Карточки: подъём, тень, золотая полоса сверху */
.pub-card, .event-card, .video-card, .album-card, .resource-card, .team-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.pub-card { position: relative; overflow: hidden; }
.pub-card::before {
    content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.pub-card:hover, .event-card:hover, .video-card:hover, .album-card:hover, .resource-card:hover, .team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(20,32,48,.14);
}
.pub-card:hover::before { transform: scaleX(1); }
.pub-link { display: inline-block; transition: transform .2s ease; }
.pub-card:hover .pub-link { transform: translateX(4px); }

/* Превью видео и фото: лёгкое приближение при наведении */
.video-thumb, .album-cover, .photo-placeholder { transition: transform .5s ease, filter .3s ease; }
.video-card, .album-card, .photo-item { overflow: hidden; }
.video-card:hover .video-thumb, .album-card:hover .album-cover, .photo-item:hover .photo-placeholder { transform: scale(1.05); filter: brightness(1.08); }

/* Кнопки: «блик» при наведении */
.btn { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg); transition: left .55s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.btn:hover::after { left: 120%; }

/* Цифры статистики — счётчик; рейтинг «Популярное» — сдвиг */
.stat-num { font-variant-numeric: tabular-nums; }
.popular-item { transition: background-color .2s ease, transform .2s ease; border-radius: var(--radius); }
.popular-item:hover { background: rgba(201,162,39,.08); transform: translateX(4px); }

/* Кнопка «Наверх» */
.to-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 90;
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--primary); color: var(--accent-light); font-size: 22px; line-height: 46px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s, background-color .2s;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: #fff; }
.to-top:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }

/* Полоса прогресса чтения на странице статьи */
.read-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 200;
    background: linear-gradient(90deg, var(--accent), var(--accent-light)); transform-origin: left; transform: scaleX(0); }

/* Видео: аккуратная рамка */
.history-video video { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); background: #000; max-width: 100%; height: auto; }

/* Уважение к настройке «Уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ===== Карточки конференций с собственными фото (08.10.2026) ===== */
.event-card .event-banner.ev-photo {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-shadow: 0 1px 2px rgba(0,0,0,0.75), 0 0 10px rgba(0,0,0,0.45);
}
.event-card .event-banner.ev-photo h3 { line-height: 1.35; }
.event-card .event-banner.ev-mayak {
    background:
        linear-gradient(180deg, rgba(14,24,38,0.18) 0%, rgba(14,24,38,0.40) 45%, rgba(14,24,38,0.72) 100%),
        image-set(url('../img/events/mayak.webp') type('image/webp'), url('../img/events/mayak.jpg') type('image/jpeg')) center 40% / cover no-repeat;
    background-color: var(--primary);
}
.event-card .event-banner.ev-spbcu {
    background:
        linear-gradient(90deg, rgba(14,24,38,0.45) 0%, rgba(14,24,38,0.30) 60%, rgba(14,24,38,0.10) 100%),
        image-set(url('../img/events/spbcu-logo.webp') type('image/webp'), url('../img/events/spbcu-logo.jpg') type('image/jpeg')) right 14px top 14px / auto 50px no-repeat;
    background-color: #8a0a14;
    padding-top: 76px;
}
.event-card .event-banner.ev-nizhny {
    background:
        linear-gradient(180deg, rgba(14,24,38,0.15) 0%, rgba(14,24,38,0.38) 45%, rgba(14,24,38,0.72) 100%),
        image-set(url('../img/events/nizhny.webp') type('image/webp'), url('../img/events/nizhny.jpg') type('image/jpeg')) center 45% / cover no-repeat;
    background-color: var(--primary);
}
.event-card .event-banner.ev-vnovgorod {
    background:
        linear-gradient(180deg, rgba(14,24,38,0.10) 0%, rgba(14,24,38,0.30) 45%, rgba(14,24,38,0.68) 100%),
        image-set(url('../img/events/vnovgorod-church.webp') type('image/webp'), url('../img/events/vnovgorod-church.jpg') type('image/jpeg')) center 35% / cover no-repeat;
    background-color: var(--primary);
    min-height: 190px;
    padding: 34px 32px 28px;
}
.event-card .event-banner.ev-vnovgorod h3 { font-size: 22px; max-width: 760px; }
.event-card .event-links .link-empty { color: var(--text-light); cursor: default; }

/* Отчёт о конференции: широкая карточка с фото в центре */
.report-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 920px; margin: 0 auto; }
.event-card.report-card:hover { transform: none; }
.report-photo { margin: 4px auto 18px; text-align: center; }
.report-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.report-photo figcaption { font-size: 13px; color: var(--text-light); margin-top: 8px; font-style: italic; }
.report-card .event-body { padding: 24px 28px; }
.report-card .event-links { justify-content: center; gap: 12px 28px; font-size: 14px; }

/* Страница отзыва */
.review-text { max-width: 800px; }
.review-text p { margin-bottom: 16px; text-align: justify; }
.review-author { text-align: right; font-weight: 600; margin-top: 8px; }
.review-source { text-align: right; font-size: 14px; color: var(--text-light); }
#reports, #upcoming { scroll-margin-top: 110px; }


/* ===== Об институте: Документы (21.10.2026) ===== */
.doc-org { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.doc-org-addr { grid-column: 1 / -1; }
.doc-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); margin-bottom: 6px; }
.about-block .doc-org p { margin-bottom: 4px; }
.about-block .doc-org-name { font-weight: bold; color: var(--primary); line-height: 1.45; }
.about-block .doc-org-short { font-size: 14px; color: var(--text-light); }
.about-block ul.doc-list li { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.about-block ul.doc-list li:last-child { border-bottom: 0; }
.about-block ul.doc-list li::before { content: none; }
.doc-item-main { min-width: 0; }
.doc-title { display: block; font-weight: bold; color: var(--text); }
.doc-meta { display: block; font-size: 13px; color: var(--text-light); margin-top: 4px; }
.doc-status { display: inline-block; font-size: 13px; margin-top: 6px; padding: 2px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); color: var(--text-light); }
.doc-link { flex-shrink: 0; white-space: nowrap; font-size: 14px; padding: 7px 14px; border: 1px solid var(--accent); border-radius: var(--radius); }
.doc-link:hover { background: var(--accent); color: var(--white); }
.doc-req { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin-top: 8px; font-size: 14px; }
.doc-req dt { color: var(--text-light); }
.doc-req dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .doc-org { grid-template-columns: 1fr; }
    .about-block ul.doc-list li { flex-direction: column; gap: 10px; }
    .doc-req { grid-template-columns: 1fr; gap: 0; }
    .doc-req dd { margin-bottom: 6px; }
}

/* Отчёт с фото в тексте, обтекание (23.10.2026) */
.report-text { max-width: 900px; }
.report-text::after, .report-text .clear { content: ""; display: block; clear: both; }
.report-float { width: 38%; margin: 4px 0 14px; clear: both; }
.report-text p { text-align: left; }
.report-float.float-right { float: right; margin-left: 24px; }
.report-float.float-left { float: left; margin-right: 24px; }
.report-float img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.report-float figcaption { font-size: 13px; line-height: 1.4; color: var(--text-light); margin-top: 6px; font-style: italic; text-align: center; }
@media (max-width: 700px) {
    .report-float, .report-float.float-right, .report-float.float-left { float: none; width: 100%; margin: 6px 0 16px; }
}
.report-final { clear: both; max-width: 640px; margin: 10px auto 0; }

/* Метка «Состоялся» на главной (24.10.2026) */
.event-badge.badge-held { background: #fde0de; color: #b42318; }

/* Новые проекты на странице Ресурсы (24.10.2026) */
.project-card { display: flex; gap: 28px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); align-items: flex-start; }
.project-cover { flex: 0 0 220px; display: block; }
.project-cover img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.project-body { flex: 1 1 auto; min-width: 0; }
.project-body h3 { font-size: 22px; line-height: 1.3; margin: 4px 0 8px; color: var(--primary); }
.project-body p { margin: 10px 0 12px; line-height: 1.6; }
.project-status { display: inline-block; background: #fff4d6; color: #8a6d0b; font-size: 13px; padding: 5px 10px; border-radius: 4px; margin-bottom: 12px; }
@media (max-width: 700px) { .project-card { flex-direction: column; align-items: center; padding: 16px; } .project-cover { flex-basis: auto; width: 60%; max-width: 240px; } }
.method .about-block h3 { font-size: 18px; margin: 18px 0 8px; color: var(--primary); }
.method .about-block ol, .method .about-block ul { margin: 0 0 12px 22px; line-height: 1.6; }
.method .about-block li { margin-bottom: 6px; }
.method code { background: #f3efe4; padding: 1px 5px; border-radius: 3px; font-size: 0.95em; }
#oformlenie, #podacha, #ekzegeza, #citirovanie, #projects { scroll-margin-top: 110px; }
.project-body .pub-type { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.project-body .pub-meta { font-size: 13px; color: var(--text-light); }
.project-body .pub-meta span { margin-right: 14px; }
.project-body .pub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.project-body .pub-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 14px; }
.project-body .pub-link { font-size: 14px; font-weight: 600; }
.project-body p { font-size: 15px; color: #444; }

/* Конференция к 500-летию Ф. Манца: заголовок на затемнённой гравюре (24.10.2026) */
.event-card .event-banner.ev-manz {
    background:
        linear-gradient(180deg, rgba(10,14,22,0.20) 0%, rgba(10,14,22,0.40) 45%, rgba(10,14,22,0.72) 100%),
        image-set(url('../img/events/manz-1527.webp') type('image/webp'), url('../img/events/manz-1527.jpg') type('image/jpeg')) center 35% / cover no-repeat;
    background-color: #1f2630;
}
@media (max-width: 800px) {
    .event-card .event-banner.ev-manz {
        background:
            linear-gradient(180deg, rgba(10,14,22,0.20) 0%, rgba(10,14,22,0.40) 45%, rgba(10,14,22,0.72) 100%),
            image-set(url('../img/events/manz-1527-sm.webp') type('image/webp'), url('../img/events/manz-1527-sm.jpg') type('image/jpeg')) center 35% / cover no-repeat;
        background-color: #1f2630;
    }
}
.event-card .event-banner.ev-manz .event-date { color: #fff; }

/* Фотогалерея НЭФ-2026 (24.10.2026) */
a.album-link { display: block; color: inherit; text-decoration: none; }
.album-cover.ac-nef { background: linear-gradient(135deg, rgba(20,32,48,.45), rgba(40,55,72,.5)), image-set(url('../img/gallery/nef-2026/08-sm.webp') type('image/webp'), url('../img/gallery/nef-2026/08-sm.jpg') type('image/jpeg')) center 30%/cover; }
.album-more { color: var(--accent); font-weight: 600; }
#photos { scroll-margin-top: 110px; }
.gal-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.gal-item { margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); display: flex; flex-direction: column; }
.gal-item a { display: block; aspect-ratio: 4/3; overflow: hidden; cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gal-item a:hover img { transform: scale(1.04); }
.gal-item figcaption { padding: 12px 14px 14px; font-size: 14px; line-height: 1.45; color: var(--text); }
.gal-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.gal-links { margin-top: 26px; display: flex; gap: 24px; flex-wrap: wrap; }
.lb[hidden] { display: none; }
.lb { position: fixed; inset: 0; z-index: 2000; background: rgba(8,12,18,.92); display: flex; align-items: center; justify-content: center; padding: 20px 64px; }
.lb figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lb img { max-width: 100%; max-height: 82vh; display: block; margin: 0 auto; border-radius: 4px; }
.lb figcaption { color: #eee; font-size: 15px; margin-top: 12px; line-height: 1.4; }
.lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; padding: 8px 12px; opacity: .85; }
.lb button:hover { opacity: 1; }
.lb-close { top: 10px; right: 14px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 900px) { .gal-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .gal-grid { grid-template-columns: 1fr; } .lb { padding: 20px 36px; } }

/* Программа курса «Современная библеистика» (24.10.2026) */
.course-program { margin: 0 0 14px; padding: 12px 14px; background: #f7f4ec; border-left: 3px solid var(--accent); border-radius: 4px; }
.course-program-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.course-program ol { margin: 0 0 0 18px; padding: 0; font-size: 14px; line-height: 1.5; color: #444; }
.course-program li { margin-bottom: 4px; }
.course-program-more { font-size: 14px; color: #444; margin: 2px 0 0 18px; }

/* Переход по якорю: подсветка найденного места (ui.js, initAnchors) */
.anchor-flash { animation: anchorFlash 2.2s ease-out; border-radius: 4px; }
@keyframes anchorFlash {
    0%, 35% { background-color: rgba(201,162,39,0.22); box-shadow: 0 0 0 6px rgba(201,162,39,0.22); }
    100%    { background-color: transparent; box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) { .anchor-flash { animation: none; } }

/* Название института в шапке и подвале — не заголовок h1 (SEO), вид как у h1 */
.logo-text .site-name { font-weight: bold; }
