﻿/* Общие стили для секции опросов */
.polls-section {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 1200px;
}

/* Сетка для списка опросов */
.polls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* По умолчанию 2 колонки для десктопов */
    gap: 20px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

/* Элемент карточки в сетке */
.poll-item {
    max-width: 100%; /* Убираем ограничение 50%, чтобы карточки занимали всю доступную ширину в одной колонке на iPad */
    width: 100%;
    box-sizing: border-box;
}

/* Карточка опроса (для списка опросов) */
.poll-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%; /* Фиксированная высота, равная высоте изображения на десктопе */
}

/* Изображение в карточке */
.poll-card-img-wrapper {
    width: 100%;
    height: 550px; /* Уменьшаем высоту изображения, чтобы оставить место для текста */
    overflow: hidden;
    position: relative;
}

.poll-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.poll-card:hover .card-img-top {
    transform: scale(1.05);
}

.poll-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Тело карточки */
.poll-card-body {
    padding: 1rem;
    text-align: left;
    flex-grow: 0;
   
}

/* Заголовок опроса в карточке */
.poll-card-text {
    font-size: 1.1rem;
    color: #007bff;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    
    overflow: hidden;
    text-overflow: ellipsis;
}

.poll-winner, .poll-winners {
    color: #007bff; /* Синий цвет текста, как у других элементов */
    font-size: 1rem; /* Слегка уменьшенный размер для компактности */
    font-weight: 600; /* Жирный текст для выделения */
    margin: 0.5rem 0; /* Небольшой отступ сверху и снизу */
    text-align: center; /* Центрируем текст */
    white-space: nowrap; /* Предотвращаем перенос строки */
    overflow: hidden; /* Скрываем лишний текст, если он не помещается */
    text-overflow: ellipsis; /* Добавляем многоточие, если текст обрезается */
}

/* Контейнер для списка победителей */
.top-options-container {
    padding: 1rem;
   
    margin: 1.5rem 0;
}



/* Заголовок "Победитель" или "Победители" */
.winners-title {
    color: #333333;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

/* Список победителей (без маркеров) */
.tie-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Прямоугольнички для имен победителей */
.winner-item {
    background: #007bff; /* Синий фон, как у выбранных опций */
    color: #ffffff; /* Белый текст */
    border: 2px solid #007bff; /* Синяя граница для единообразия */
    border-radius: 8px; /* Тот же радиус, что у option-label */
    padding: 1.2rem; /* Тот же padding, что у option-label */
    margin: 0.8rem 0; /* Тот же margin, что у option-label */
    font-size: 1.4rem; /* Тот же размер шрифта, что у option-label */
    font-weight: 600; /* Сохраняем жирность текста */
    display: flex;
    align-items: center;
    justify-content: center; /* Центрируем текст */
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Легкая тень, как у option-label */
    width: 100%; /* Полная ширина */
}

/* Стили для вариантов ответа (без видимых радио-кнопок) */
.poll-options {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.option-item {
    margin-bottom: 0.8rem; /* Maintain spacing between options */
}

.poll-options input[type="radio"] {
    display: none; /* Hide radio buttons completely */
}

.option-label {
    background: #f8f9fa;
    border: 1px solid #007bff;
    border-radius: 8px;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center; /* Center text horizontally and vertically */
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%; /* Ensure full width to match the container */
}

/* Style for the label of the checked radio button (selected option) */
.poll-options input[type="radio"]:checked + .option-label {
    background: #007bff; /* Blue background for selected option */
    color: #f8f9fa; /* White text for selected option */
    border-color: #007bff; /* Keep border consistent */
}

/* Hover effect for non-selected options */
.option-label:hover {
    background: #a0c3e3; /* Light blue background on hover for non-selected options */
}

/* Стили для сообщения о голосовании */
.already-voted {
    color: #007bff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: center;
    margin: 0;
    font-size: 1rem; /* Уменьшаем размер шрифта */
    line-height:1.5rem;
}

/* Неактивный опрос */
.inactive-poll {
    color: #888;
    font-style: italic;
    font-size: 0.9rem; /* Уменьшаем размер шрифта */
    margin: 0;
}

/* Сообщение об отсутствии опросов */
.no-polls {
    background-color: #f0f8ff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    color: #333333;
    font-size: 18px;
    font-weight: bold;
    margin: 2rem auto;
    max-width: 600px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Контейнер для деталей опроса */
.poll-details-card {
    margin: 20px auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Внутренний контейнер для расположения изображения и контента */
.poll-layout {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    height: 550px; /* Фиксированная высота, равная высоте изображения на десктопе */
}

/* Изображение опроса */
.poll-image {
    flex: 1;
    min-width: 300px;
    height: 100%; /* Занимает всю высоту контейнера */
}

.poll-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Контент опроса (текст и форма) */
.poll-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
   
    min-width: 300px;
    overflow-y: auto; /* Добавляем вертикальную прокрутку, если контент не помещается */
    max-height: 100%; /* Ограничиваем высоту контента высотой контейнера */
}

/* Форма голосования */
.poll-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Кнопка голосования */
.vote-btn {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: center;
    width: fit-content;
    margin-top: 10px; /* Add spacing above the button */
}

    .vote-btn:hover {
        background-color: #0056b3;
    }

/* Список результатов опроса (для администраторов) */
.poll-results {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

    .poll-results li {
        margin-bottom: 10px;
        color: #333333;
        font-size: 16px;
    }

/* Ссылка "Назад к опросам" */
.back-link {
    display: block;
    margin-top: 20px;
    text-decoration: none;
    color: #007bff;
    font-size: 1.2rem;
    text-align: center;
    padding: 10px;
    border: 1px solid #007bff;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

    .back-link:hover {
        color: #ffffff;
        background-color: #007bff;
    }

/* Адаптивные стили для десктопов (ширина > 1024px) */
@media (max-width: 1025px) {
    .poll-layout {
        flex-direction: row; /* Изображение слева, контент справа */
    }

    .poll-image {
        flex: 1; /* Изображение занимает половину ширины */
        height: 550px; /* Сохраняем высоту, как в poll-card */
    }

    .poll-content {
        flex: 1; /* Контент занимает половину ширины */
        overflow-y: auto; /* Добавляем вертикальную прокрутку на iPad, если контент не помещается */
    }

    .option-label {
        font-size: 1.2rem; /* Reduce font size for iPad */
        padding: 1rem;
    }
}

ul {
    padding-left: 0px !important;
}

/* Адаптивные стили для iPad и мобильных устройств (ширина ≤ 1024px) */
@media (max-width: 1024px) {
    .top-option.winner {
        font-size: 1.4rem;
        padding: 1rem;
    }
    

    .winner-item {
        font-size: 1.2rem;
        padding: 1rem;
    }

    .polls-grid {
        grid-template-columns: 1fr; /* Одна колонка для iPad и устройств до 1024px */
        padding: 10px;
        gap: 15px;
    }

    .poll-card {
        height: auto; /* Убираем фиксированную высоту для iPad, чтобы контент мог растягиваться */
    }

    .poll-card-img-wrapper {
        height: 550px; /* Сохраняем высоту изображения */
    }

    

    .poll-layout {
        flex-direction: column; /* Изображение сверху, контент снизу */
        height: auto; /* Убираем фиксированную высоту, чтобы контент мог растягиваться */
    }

    .poll-image {
        width: 100%;
        height: 400px;
    }

    .poll-content {
        width: 100%;
        padding: 15px;
        overflow-y: auto; /* Добавляем вертикальную прокрутку на iPad, если контент не помещается */
    }

    .poll-image-img {
        height: 100%;
    }

    .poll-card-text, .poll-title, .poll-results li,  .top-option, .already-voted, .inactive-poll {
        font-size: 1rem;
    }

    .vote-btn, .back-link {
        font-size: 1rem;
        padding: 10px 20px;
    }
}

/* Адаптивные стили для мобильных устройств (ширина < 768px) */
@media (max-width: 768px) {
    .top-option.winner {
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }

    .winner-item {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .option-label {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .polls-section, .poll-voting-container, .poll-details-card {
        padding: 10px;
    }

    .polls-grid {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        padding: 10px;
        gap: 10px;
    }

    .poll-card {
        height: auto; /* Убираем фиксированную высоту для мобильных, чтобы контент мог растягиваться */
    }

    .poll-card-img-wrapper {
        height: 350px;
    }

    

    .poll-image {
        height: 250px;
    }

    .poll-layout {
        height: auto; /* Убираем фиксированную высоту для мобильных */
    }

    .poll-card-text, .poll-title, .poll-results li, .option-label, .top-option, .already-voted, .inactive-poll {
        font-size: 14px;
    }

    .vote-btn, .back-link {
        font-size: 12px;
        padding: 8px 16px;
    }
}
/* Сетка карточек */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 10px; 
    margin: 0 auto; 
    width: 100%; 
    box-sizing: border-box; 
}

/* Карточки */
.col-md-4 {
    box-sizing: border-box;
    margin-bottom: 1.5rem !important;
    width:100%;
    padding:0;
}

/* Карточка альбома */
.album-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #aacbe0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 300px; 
}

    .album-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: scale(1.02);
    }

.album-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid #aacbe0;
}

.album-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.album-text {
    color: #007bff;
}

.album-card:hover .album-thumbnail {
    transform: scale(1.1);
}

.album-card-body {
    padding: 15px;
    text-align: center;
}

.album-title {
    font-size: 1.2rem;
    color: #003366;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.album-meta {
    font-size: 0.9rem;
    color: #6a7685;
}

/* Адаптивность */
@media (max-width: 768px) {
    .row {
        grid-template-columns: 1fr; 
    }
}

/* Сетка карточек */


/* Карточка */
.video-card {
    background-color: #f8f9fa;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem !important;
    padding: 0 !important;
    cursor: pointer;
}

    .video-card:hover {
        transform: scale(1.03); 
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
    }

    .video-card.expanded {
        grid-column: 1 / -1;
    }

/* Видео */
.video-card-iframe-wrapper {
    position: relative; 
    width: 100%;
    padding-top: 56.25%; 
    overflow: hidden;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    border: none; 
}

/* Текстовая часть карточки */
.video-card-body {
    padding: 1rem;
    text-align: center; 
}

.video-card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.video-card-date {
    font-size: 1rem;
    font-weight: bold;
    color: #6a7685; 
    margin-top: 0.5rem;
}

/* Адаптивные стили */
@media (max-width: 768px) {
  
    .video-card-body {
        padding: 0.8rem; 
    }

    .video-card-title {
        font-size: 1rem; 
    }

    .video-link {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
    
}
