:root {
    --main-dark-blue: #3666a0;
    --pattern-turquoise-blue: #357593;
    --badge-dark-blue: #15253e;
    --beige: #fff6d2;
    --bird-color: #f0eddc;
    --orange: #e79d5e;
    --black: #131313;
    --white: #fff;
    --gray: #b0aea9;
    --light-blue: #b8daef;
    --light-blue-old: #c7dffc;
    --accent: #0d6efd;
    --accent-grad: linear-gradient(135deg, #0d6efd, #6f42c1);
    --border-radius: 10px;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
}

body {
    background: var(--light-blue-old);
}

.header-image {
    background: url('../images/cls_head.png') top right/cover no-repeat;
}
.header-background {
    background: url('../images/header.jpg') no-repeat;
    min-height: 180px;
    display: flex;
    align-items: center;
    position: relative;
    background-color: #f8f9fa;
}
.victory-logo {
    max-height: 267px !important;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    transition: transform .3s;
    float: right;
    margin-top: -270px;
}
.victory-logo:hover { transform: scale(1.05); }
.site-title-container { padding: 20px; text-align: center; }
.site-title {
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    color: var(--accent) !important;
    font-size: 2.8rem !important;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}
.min-w-350 { min-width: 350px; }
ul.main > li > a.nav-link { color: var(--white); }
.bg-blue { background: var(--main-dark-blue); }
.social-icons { display: flex; gap: 15px; }
.social-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-grad); color: var(--white);
    text-decoration: none; transition: .3s; box-shadow: 0 4px 8px rgba(0,0,0,.1);
}
.social-icon:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,.15); }
.eye-container { display: flex; align-items: center; gap: 10px; }
.eye { font-size: 16px; font-weight: bold; color: #6c757d; margin: 0; white-space: nowrap; }
.home-menu { margin: 40px 0; }
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    gap: 20px; margin-top: 30px;
}
.menu-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: .3s;
    border: none;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.menu-card:before {
    content: '';
    position: absolute; left: 0; top: 0; height: 100%; width: 5px;
    background: var(--accent-grad); opacity: 0; transition: .3s;
}
.menu-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,.15); }
.menu-card:hover:before { opacity: 1; }
.menu-card a {
    color: #2c3e50; text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1.5;
    display: block; width: 100%; transition: color .3s;
}
.menu-card:hover a { color: var(--accent); }
.menu-card .icon {
    margin-right: 15px; width: 40px; height: 40px;
    background: var(--accent-grad); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); flex-shrink: 0;
}

footer {
    background: #062857;
    color: var(--white);
    padding: 40px 0 20px 0;
    margin-top: 50px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 30px; margin-bottom: 30px;
}
.footer-section { min-width: 250px; }
.footer-section h5 {
    color: #4facfe; margin-bottom: 20px; font-weight: 600;
    border-bottom: 2px solid #4facfe; padding-bottom: 10px;
}
.footer-contact p { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-contact i { color: #4facfe; width: 20px; }
.ad-space {
    background: rgba(255,255,255,0.05); border-radius: 10px; padding: 20px; margin: 20px 0;
    text-align: center; border: 1px dashed rgba(255,255,255,0.2);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px; text-align: center; color: #aaa; font-size: 14px;
}

.rounded { margin-top: 30px; }
.mass-biblio { text-align: center; }
.survey-container,
.content-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
    padding: 30px;
    margin-bottom: 30px;
}
.survey-title, .content-title, .about-title, .services-title, .events-title, .gallery-title, .section-title {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 25px;
}
.question { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #e9ecef; }
.question-number { font-weight: bold; color: var(--accent); }
.form-check { margin-bottom: 8px; }
.btn-submit {
    background: var(--accent); color: var(--white); padding: 10px 30px; font-size: 1.1rem;
}
.btn-submit:hover { background: #0b5ed7; color: var(--white); }
.required { color: red; }
.conditional-question {
    background: #f8f9fa; padding: 15px; border-radius: 5px; margin-top: 10px;
}
.library-card, .material-item {
    border-left: 4px solid var(--accent);
    padding: 15px; margin-bottom: 20px; background: #f8f9fa; border-radius: 0 5px 5px 0;
}
.material-item {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.section-title {
    cursor: default;
    user-select: none;
    padding: 10px 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #dee2e6;
}
.section-collapse-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
}
.section-collapse-trigger:focus-visible {
    outline: 2px solid var(--accent, #0d6efd);
    outline-offset: 2px;
}

.library-name, .portal-name { font-weight: bold; color: var(--accent); }
.library-address, .library-phone { color: #6c757d; font-size: .9rem; margin-bottom: 5px; }
.portal-card {
    border: 1px solid #dee2e6; border-radius: 5px; padding: 15px; margin-bottom: 15px; transition: .3s;
}
.portal-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,.1); transform: translateY(-2px); }
.facility-list { margin: 0; padding-left: 20px; }
.facility-list li { margin-bottom: 5px; }
.about-section, .services-section, .events-section, .history-section { margin-bottom: 40px; }
.history-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none; border-radius: var(--border-radius); padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow);
}
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent-grad); border-radius: 3px;
}
.timeline-item {
    position: relative; margin-bottom: 25px; padding-left: 20px;
}
.timeline-item::before {
    content: ''; position: absolute; left: -33px; top: 8px; width: 12px; height: 12px;
    background: var(--accent); border-radius: 50%; border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--accent);
}
.timeline-content {
    background: var(--white); padding: 25px; border-radius: 12px; box-shadow: var(--shadow);
    border-left: 4px solid var(--accent); margin-left: 30px;
}
.timeline-content:hover { transform: translateX(5px); transition: .3s; }
.awards-grid, .national-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 20px; margin-top: 20px;
}
.award-card, .project-card {
    background: var(--white); border: 1px solid #e9ecef; border-radius: 8px; padding: 20px; transition: .3s;
    position: relative; overflow: hidden;
}
.award-card::before, .service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: var(--accent-grad);
}
.award-card:hover, .project-card:hover, .event-card:hover, .menu-card:hover {
    transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,.15);
}
.award-year, .badge-service {
    background: var(--accent); color: var(--white); padding: 5px 12px; border-radius: 20px;
    font-size: .85rem; font-weight: bold; display: inline-block; margin-bottom: 10px;
}
.stats-counter {
    text-align: center; padding: 20px; background: var(--white); border-radius: var(--border-radius);
    box-shadow: var(--shadow); margin-bottom: 20px;
}
.stat-number { font-size: 2.5rem; font-weight: bold; color: var(--accent); margin-bottom: 5px; }
.stat-label { color: #6c757d; font-size: .9rem; text-transform: uppercase; letter-spacing: 1px; }
.program-badge, .sub-service {
    display: inline-block; background: rgba(13,110,253,.1); color: var(--accent);
    padding: 8px 15px; border-radius: 20px; margin: 5px; font-size: .85rem; border: 1px solid rgba(13,110,253,.2);
}
.innovation-section, .milestone-highlight {
    background: var(--accent-grad); color: var(--white); padding: 30px; border-radius: var(--border-radius); margin: 30px 0;
    text-align: center;
}
.innovation-section h3, .milestone-year { color: var(--white); margin-bottom: 20px; font-size: 3rem; font-weight: bold; }
.milestone-text { font-size: 1.2rem; margin-bottom: 0; }
.service-card {
    border: 1px solid #dee2e6; border-radius: 10px; padding: 25px; margin-bottom: 25px; transition: .3s;
    height: 100%; background: var(--white); box-shadow: 0 3px 10px rgba(0,0,0,.08); position: relative; overflow: hidden;
}
.service-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,.15); }
.service-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; text-align: center; }
.service-category {
    background: var(--accent-grad); color: var(--white); padding: 20px; border-radius: var(--border-radius);
    margin-bottom: 30px; text-align: center;
}
.service-category h3 { color: var(--white); margin: 0; font-size: 1.5rem; }
.service-list { list-style: none; padding-left: 0; margin-bottom: 0; }
.service-list li { margin-bottom: 12px; padding-left: 30px; position: relative; line-height: 1.5; }
.service-list li:before { content: "▸"; color: var(--accent); font-weight: bold; position: absolute; left: 10px; font-size: 1.2rem; }
.preview-iframe { width: 100%; height: 80vh; min-height: 720px; border: 0; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.06); display: block; }
.section-title { cursor: default; }
.section-title[aria-expanded="true"] .fa-chevron-down,
.section-title button[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.section-title .fa-chevron-down { transition: transform .3s; }
.material-content { margin-top: 15px; }
.btn-group-sm { margin-top: 10px; }
.eco-feature, .quote-block {
    background: rgba(40,167,69,.1); border-radius: 8px; padding: 15px; margin: 10px 0; border-left: 4px solid #28a745;
}
.quote-block { background: rgba(13,110,253,.1); border-left: 4px solid var(--accent); font-style: italic; }
.events-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 25px; margin-top: 30px;
}
.event-card {
    background: var(--white); border-radius: 12px; padding: 0; box-shadow: var(--shadow); transition: .3s;
    border: none; overflow: hidden; border-left: 4px solid var(--accent);
    display: flex; flex-direction: column; height: 100%;
}
.event-header, .event-footer {
    background: #f8f9fa; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; border-bottom: 1px solid #e9ecef;
}
.event-date { font-weight: bold; color: #2c3e50; font-size: .95rem; margin: 0; }
.event-age { background: var(--accent); color: var(--white); padding: 4px 10px; border-radius: 15px; font-size: .75rem; font-weight: 500; margin: 0; }
.event-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.event-title { color: #2c3e50; font-weight: 600; margin-bottom: 12px; font-size: 1.1rem; line-height: 1.4; min-height: 52px; }
.event-description {
    color: #6c757d; margin-bottom: 15px; line-height: 1.5; flex-grow: 1;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.event-location { background: #f8f9fa; padding: 12px 15px; border-radius: 8px; margin-bottom: 15px; border-left: 3px solid var(--accent); }
.location-name { font-weight: 600; color: #2c3e50; margin-bottom: 5px; font-size: .95rem; }
.location-address { color: #6c757d; font-size: .85rem; margin: 0; }
.event-footer { border-top: 1px solid #e9ecef; margin-top: auto; }
.event-price { font-weight: 600; color: #28a745; margin: 0; font-size: .95rem; }
.btn-event {
    background: var(--accent); color: var(--white); padding: 8px 16px; border-radius: 6px; text-decoration: none;
    font-weight: 500; font-size: .85rem; transition: .3s; border: none; display: inline-block; text-align: center;
    white-space: nowrap; cursor: pointer;
}
.btn-event:hover {
    background: #0b5ed7; color: var(--white); transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13,110,253,.3);
}
.btn-pushkin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24); font-size: .8rem; padding: 8px 12px;
}
.btn-pushkin:hover {
    background: linear-gradient(135deg, #ee5a24, #c44512);
    box-shadow: 0 4px 8px rgba(238,90,36,.3);
}
.modal-event-img {
    width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 20px;
}
.event-details, .contact-info {
    background: #f8f9fa; padding: 15px; border-radius: 8px; margin: 15px 0; border-left: 3px solid var(--accent);
}
.event-detail-item { display: flex; align-items: center; margin-bottom: 8px; }
.event-detail-item i { color: var(--accent); width: 20px; margin-right: 10px; }
.modal-contact-info { background: #e7f1ff; padding: 15px; border-radius: 8px; margin-top: 20px; }
.partners-grid, .resources-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
}
.partner-item, .resource-item {
    background: rgba(255,255,255,.05); border-radius: 10px; padding: 15px; text-align: center; transition: .3s;
    border: 1px dashed rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
    min-height: 120px;
}
.partner-item:hover, .resource-item:hover, .main-banner-item:hover {
    background: rgba(255,255,255,.1); transform: translateY(-3px);
}
.partner-img, .resource-img, .main-banner-img {
    max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px;
}
.partner-img { max-height: 100px; }
.resource-img { max-height: 80px; }
.main-banner-img { max-height: 120px; border-radius: 8px; }
.main-banner-section { margin: 40px 0; }
.main-banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 20px;
}
.main-banner-item {
    background: rgba(255,255,255,.05); border-radius: 12px; padding: 20px; text-align: center; transition: .3s;
    border: 1px dashed rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; min-height: 150px;
}
.gallery-section { margin: 25px 0; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
    gap: 15px; margin-bottom: 20px;
}
.gallery-item {
    position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,.1); transition: .3s; cursor: pointer; aspect-ratio: 4/3;
}
.gallery-item:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,0,0,.2); }
.gallery-img { width: 100%; height: 100%; object-fit: cover; }
.news-footer, .share-buttons {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;
    padding-top: 20px; border-top: 1px solid #e9ecef;
}
.share-btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 20px;
    text-decoration: none; color: var(--white); font-size: .85rem; transition: .3s;
}
.share-btn:hover { transform: translateY(-2px); color: var(--white); }
.btn-vk { background: #4c75a3; }
.btn-telegram { background: #0088cc; }
.btn-ok { background: #ee8208; }
.modal-gallery .modal-dialog { max-width: 90%; max-height: 90vh; }
.modal-gallery .modal-content { background: transparent; border: none; }
.modal-gallery .modal-body { padding: 0; text-align: center; }
.modal-gallery-img { max-width: 100%; max-height: 80vh; border-radius: 10px; }
.gallery-counter {
    position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,.7); color: var(--white);
    padding: 6px 12px; border-radius: 15px; font-size: .8rem;
}
.project-image { width: 100%; height: 200px; object-fit: cover; }
.project-content { padding: 20px; }
.project-title { color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.preview-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 320px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    margin-bottom: 16px;
    overflow: auto;
}
.preview-panel.active {
    display: flex;
}
.preview-panel video, .preview-panel embed, .preview-panel object {
    width: 100%;
    height: 60vh;
    min-height: 320px;
    border-radius: 6px;
    background: #222;
}
.preview-placeholder {
    color: #999;
    font-size: 1.1em;
}
.preview img {
    max-width: 270px;
    max-height: 300px;
    border-radius: 6px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.news-image-main {
    max-width: 40%;
    height: auto;
    display: block;
}

@media (max-width: 992px) {
    .header-background { min-height: 150px; background-size: cover; }
    .events-grid { grid-template-columns: repeat(2,1fr); gap: 20px; }
    .preview-panel video, .preview-panel embed, .preview-panel object { height: 40vh; min-height: 220px; }
}
@media (max-width: 768px) {
    .timeline-content { margin-left: 0; }
    .news-header, .news-body { padding: 20px; }
    .news-title { font-size: 1.3rem; }
    .news-image-main { height: 200px; }
    .gallery-grid { grid-template-columns: repeat(2,1fr); }
    .news-footer { flex-direction: column; align-items: stretch; }
    .share-buttons { justify-content: center; }
    .footer-content { grid-template-columns: 1fr; }
    .partners-grid, .resources-grid, .main-banner-grid { grid-template-columns: repeat(2,1fr); gap: 15px; }
    .partner-item, .resource-item { min-height: 100px; padding: 12px; }
    .main-banner-item { min-height: 120px; padding: 15px; }
    .partner-img { max-height: 80px; }
    .resource-img { max-height: 70px; }
    .main-banner-img { max-height: 100px; }
    .events-grid { grid-template-columns: 1fr; gap: 20px; }
    .event-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .event-footer { flex-direction: column; align-items: stretch; gap: 12px; }
    .btn-event { width: 100%; text-align: center; }
    .event-title { min-height: auto; font-size: 1.2rem; }
    .service-card { padding: 20px; margin-bottom: 20px; }
    .service-icon { font-size: 2rem; margin-bottom: 15px; }
    .service-category { padding: 15px; margin-bottom: 20px; }
    .service-category h3 { font-size: 1.3rem; }
    .embed-responsive { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; }
    .embed-responsive::before { display: block; content: ""; }
    .embed-responsive-16by9::before { padding-top: 56.25%; }
    .embed-responsive-item { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; }
    .header-background { min-height: 120px; background-size: cover; }
    .header-background .row { text-align: center; }
    .social-icon { width: 35px; height: 35px; }
    .header-background .col-3 { width: 100%; text-align: center; margin-bottom: 10px; }
    .header-background .col-6 { width: 100%; order: 1; }
    .header-background .order-1 { order: 2; }
    .header-background .order-3 { order: 3; }
    .site-title-container { display: none; }
}
@media (max-width: 576px) {
    .partners-grid, .resources-grid, .main-banner-grid { grid-template-columns: 1fr; }
    .preview-panel video, .preview-panel embed, .preview-panel object { height: 30vh; min-height: 120px; }
}
@media (max-width: 500px) {
    .site-title { font-size: 2.1rem !important; }
}
