
/* ===== Базовые стили ===== */
: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('header-bg.webp') type('image/webp'), url('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 {
    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 { 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 {
    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.webp') type('image/webp'), url('img/hall.jpg') type('image/jpeg')) center / cover no-repeat;
    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.webp') type('image/webp'), url('img/lecture.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.webp') type('image/webp'), url('img/church.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.webp') type('image/webp'), url('img/hall.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.webp') type('image/webp'), url('img/conferences.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph2 { background: image-set(url('img/church.webp') type('image/webp'), url('img/church.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph3 { background: image-set(url('img/lecture.webp') type('image/webp'), url('img/lecture.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph4 { background: image-set(url('img/hall.webp') type('image/webp'), url('img/hall.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph5 { background: image-set(url('img/resources.webp') type('image/webp'), url('img/resources.jpg') type('image/jpeg')) center/cover; }
.photo-item .ph6 { background: image-set(url('img/listeners.webp') type('image/webp'), url('img/listeners.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 { 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 {
        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 { 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 { display: none; }
    .logo-text h1 { font-size: 17px; }
    .logo-icon, .logo-icon img { width: 52px; height: 52px; }
    .hero h2 { 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: 1px 700px; }
.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 {
        font-size: 22px !important;
    }
    h2, .hero h2, .section-title, .article-detail h2 {
        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 { font-size: 22px !important; }
    h3 { font-size: 19px !important; }
}
