/* Основные стили */
html, body {
    overflow-x: hidden; /* Запрет горизонтальной прокрутки */
    width: 100%;
    max-width: 100%; /* Ограничиваем ширину */
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

/* Заголовок страницы */
h1 {
    font-size: 2.5em;
    color: #ffcc00;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 1.8em;
    color: #ccc;
    margin-bottom: 20px;
    text-align: center;
}

/* Контейнер для новостей */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%; /* Занимает всю ширину */
    max-width: 1200px; /* Ограничиваем максимальную ширину */
    margin: 20px auto;
    box-sizing: border-box; /* Учитываем padding в ширине */
}

/* Карточка новости */
.news-card {
    background-color: #333;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    width: 100%; /* Занимает всю ширину контейнера */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Изображение новости */
.news-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 20px 20px 0 0;
}

/* Контейнер для видео */
.video-container {
    width: 100%;
    height: 200px; /* Фиксированная высота для видео */
    position: relative;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

/* Видео */
.news-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Контент новости */
.news-content {
    padding: 20px;
    text-align: left;
    flex-grow: 1; /* Растягиваем контент на оставшееся пространство */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.news-content h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #ffcc00;
}

.news-content p {
    font-size: 1em;
    color: #ccc;
    margin-bottom: 15px;
}

.news-date {
    font-size: 0.9em;
    color: #888;
    display: block;
    text-align: right;
}

/* Ссылки без подчеркивания */
.news-link {
    text-decoration: none; /* Убираем подчеркивание */
    color: inherit; /* Наследуем цвет текста */
}

/* Кнопка "Назад" */
.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff5722;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}

.back-link:hover {
    background-color: #e64a19;
    transform: translateY(-2px);
}

/* Стили для Fluid Player */
#fluid_video_wrapper_my-video {
    width: 100% !important;
    height: auto !important;
    border-radius: 20px; /* Закругление краев на 20px */
    overflow: hidden; /* Обрезаем содержимое, чтобы закругление работало */
}

/* Убедимся, что элементы управления видны */
.fluid_controls {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1000; /* Убедитесь, что элементы управления поверх других элементов */
}

/* Адаптивность */
@media (max-width: 768px) {
    .news-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    .fluid_controls {
        font-size: 14px; /* Уменьшаем размер элементов управления на мобильных устройствах */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.3em;
    }

    .news-content h2 {
        font-size: 1.3em;
    }

    .news-content p {
        font-size: 0.9em;
    }

    .fluid_controls {
        font-size: 12px; /* Еще меньше размер элементов управления на очень маленьких экранах */
    }
}