body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Стили для баннера и навигации */
.banner-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    z-index: 1;
}

.banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.banner.hidden {
    opacity: 0;
    transform: translateY(-50px);
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.banner-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.banner-text .lead {
    font-size: 1.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.banner.hidden .banner-text h1,
.banner.hidden .banner-text .lead {
    opacity: 0;
    transform: translateY(20px);
}

#navbar-container {
    position: relative;
    z-index: 2;
}

/* Стили для навигации */
.navbar {
    transition: background-color 0.3s ease;
}

.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #343a40;
    transition: all 0.3s ease;
}

.sticky-nav.fixed {
    position: fixed;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Стили для карточек событий и новостей */
.event-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.event-card .card-body {
    padding: 1.5rem;
}

.event-card .card-title {
    color: #343a40;
    font-weight: 600;
    margin-bottom: 1rem;
}

.event-card .card-text {
    color: #6c757d;
    display: block !important;
}

.event-card .collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.event-card .collapse.show {
    max-height: 1000px;
}

/* Стили для индикаторов типа карточек */
.card-type-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

.card-type-indicator i {
    color: #6c757d;
}

.event-card .card-title,
.folder-header h5 {
    margin-left: 40px;
}

.event-card .card-body,
.folder-header {
    position: relative;
}

/* Закругляем углы изображений в карточках событий */
.event-card img.card-img-top {
    border-radius: var(--bs-card-border-radius, 0.5rem);
    padding-bottom: 0.25rem;
}

/* Обновляем стили для папок */
.folder-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 1rem;
}

.folder-header:hover {
    background-color: #f8f9fa;
}

.folder-header .card-type-indicator {
    background-color: #e9ecef;
}

.folder-header .card-type-indicator i {
    color: #495057;
}

/* Стили для модальных окон папок */
.folder-modal {
    display: none;
}

.folder-modal.show {
    display: block;
}

.folder-modal .modal-dialog {
    max-width: 90%;
    margin: 2rem auto;
}

.folder-modal .modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.folder-modal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 1.5rem;
}

.folder-modal .modal-body {
    padding: 2rem;
}

/* Стили для секции новостей */
.news-section {
    margin-top: 4rem;
}

.news-section .card {
    height: 100%;
}

.news-section .card-body {
    display: flex;
    flex-direction: column;
}

.news-section .card-text {
    flex: 1;
}

.news-section .collapse {
    margin-top: 1rem;
}

.news-section ul {
    padding-left: 1.2rem;
    margin-top: 1rem;
}

.news-section ul li {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Основные блоки контента */
.content-block {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .banner-wrapper {
        height: 300px;
    }

    .banner-text h1 {
        font-size: 2rem;
    }

    .banner-text .lead {
        font-size: 1.2rem;
    }

    .folder-modal .modal-dialog {
        margin: 0;
        max-width: none;
        height: 100%;
    }

    .folder-modal .modal-content {
        border-radius: 0;
        height: 100%;
    }

    .news-section .card {
        margin-bottom: 1rem;
    }
}

/* Вспомогательные классы */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.overflow-hidden {
    overflow: hidden;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Стили для галереи */
.gallery-folder .card-title {
    margin-left: 45px !important;
    margin-top: 10px;
}

.gallery-image .card-title {
    margin-left: 0;
}

.gallery-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.gallery-image .card-body {
    display: flex;
    flex-direction: column;
}

/* Стили для контактов */
.contact-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #0d6efd;
}

.contacts-list {
    max-width: 600px;
    margin: 0 auto;
}

/* Изображения внутри Markdown-контента */
.content-block img,
.card-text img {
    max-width: 100%;
    height: auto;
}