/* Общие стили для карусели */
.carousel {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.carousel-inner {
    width: 100%;
}

.carousel-item {
    width: 100%;
}

.carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Высота карусели для разных устройств */
.carousel-item img {
    height: 300px; /* Мобильные по умолчанию */
}

@media (min-width: 576px) {
    .carousel-item img {
        height: 400px; /* Планшеты */
    }
}

@media (min-width: 768px) {
    .carousel-item img {
        height: 500px; /* Небольшие десктопы */
    }
}

@media (min-width: 992px) {
    .carousel-item img {
        height: 600px; /* Средние десктопы */
    }
}

@media (min-width: 1200px) {
    .carousel-item img {
        height: 700px; /* Большие экраны */
    }
}

/* Стили для индикаторов и контролов */
.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 8%;
    opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-size: 100% 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px;
}

/* Полноэкранный вариант (опционально) */
.fullscreen-carousel {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.fullscreen-carousel .carousel-item img {
    width: 100vw;
}

/* Стили для подписей */
.carousel-caption {
    right: 0;
    left: 0;
    bottom: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.carousel-caption h5 {
    font-size: 1.25rem;
    font-weight: bold;
}

.carousel-caption p {
    font-size: 1rem;
}

/* Адаптация подписей для мобильных */
@media (max-width: 576px) {
    .carousel-caption {
        padding: 10px;
    }
    .carousel-caption h5 {
        font-size: 1rem;
    }
    .carousel-caption p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
}

/* Убираем отступы у контейнера для карусели */
.no-gutters {
    margin-right: 0;
    margin-left: 0;
}
.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* Стили для страницы новости */
.news-content {
    line-height: 1.8;
    text-align: justify;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 0.25rem;
}

/* Галерея медиафайлов */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* Комментарии */
.comment-list {
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
}

.comment-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.comment-author {
    font-weight: bold;
    color: #0d6efd;
}

.comment-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Адаптация для мобильных */
@media (max-width: 767.98px) {
    .news-content {
        font-size: 1rem;
    }
    
    .news-navigation .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}