/* Стили для страницы вопросов */
/* Добавьте в questions.css */
/* Dropdown стили */
.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    /* Открывается вниз от кнопки */
    left: 0;
    right: 0;
    min-width: 100%;
    z-index: 1000;
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 8px 16px var(--shadow);
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
    /* Небольшой отступ от кнопки */
}

.dropdown-menu.is-active {
    display: block;
}

.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: var(--primary);
    color: white;
}

.dropdown-item:hover .tag {
    background-color: white !important;
    color: var(--primary) !important;
}

.section {
  --bulma-section-padding: 0rem 1.5rem;
  --bulma-section-padding-desktop: 0rem 0rem;
  
}

/* Основной контент */
.content.is-size-4 {
    line-height: 1.6;
}

/* Контейнер вопросов */
.questions-container {
    position: relative;
}

.question-item {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.question-item.is-active {
    display: block;
}

/* Текст вопроса */
.question-text {

    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
}

/* Контейнер ответов */
.answers-container {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.answer-item {
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    padding: 0.5rem 1rem;
}

.answer-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.has-border-success {
    border-color: var(--success) !important;
    background-color: #28a745 !important;
}



/* Комментарий к вопросу */
.question-comment {
    padding: 0.5rem !important;
}

/* Dropdown */
.dropdown.is-fullwidth .dropdown-trigger {
    width: 100%;
}

.dropdown.is-fullwidth .button {
    width: 100%;
    justify-content: space-between;
}

.dropdown-content {
    max-height: 400px;
    overflow-y: auto;
}

.question-dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.question-dropdown-item:hover {
    background-color: var(--primary);
    color: white;
}

.question-dropdown-item:hover .tag {
    background-color: white !important;
    color: var(--primary) !important;
}

/* Навигационные кнопки */
.is-gap-3 {
    gap: 1rem;
}

/* Рекламные блоки */
.ad-container {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: var(--secondary);
    font-style: italic;
    font-size: 1.1rem;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.button-text {
    display: inline-block;
    text-align: left;
    white-space: normal;
    line-height: 1.4;
}

.is-fullwidth-mobile .button-text {
    text-align: center;
}

@media (max-width: 768px) {
    .button.is-large .button-text {
        font-size: 0.9rem;
    }




    .card-content {
        padding: 0rem !important;
    }

    .content.is-size-4 {
        font-size: 1.2rem !important;
    }

    .question-text {
        padding-left: 1rem;
        margin-bottom: 1.5rem;
    }

    .answers-container {
        gap: 0rem;
        padding: 0 1rem;
    }

    .answer-item {
        padding: 0.2rem !important;
    }

    .is-gap-3 {
        gap: 0.75rem;
    }

    .button.is-medium {
        font-size: 1rem;
    }

    .ad-container {
        padding: 2rem;
        min-height: 120px;
    }
}

@media (max-width: 480px) {
    .section {
        --bulma-section-padding: 0.5rem 0rem;

        .question-text {
            text-align: center;
            font-size: 1.1rem !important;
            font-weight: 700;
        }

        .answer-item {
            margin-bottom: 0.5rem;
            border-radius: 0.5rem;
        }

        .answer-item .tag {
            align-self: flex-start;
            margin-left: 0 !important;
        }

        .is-gap-3 {

            width: 100%;
        }

        .is-gap-3 .button {
            width: 100%;
        }

        .content.is-size-4 {
            font-size: 1rem !important;
        }

        .answer-text {
            font-size: 0.8rem !important;
        }

        .question-comment .content {
            font-size: 0.8rem !important;
        }

        .button.is-info.is-large.is-fullwidth-mobile {
            padding: 0.2rem;
        }
    }

    /* Гарантии читаемости */
    .question-text,
    .answer-text {
        word-break: break-word;
        hyphens: auto;
    }

    /* Touch-устройства */
    @media (hover: none) {
        .answer-item:hover {
            transform: none;
        }


    }

    /* Дополнительные CSS переменные */
    :root {
        --success: #28a745;
        --info: #17a2b8;
    }

    [data-theme="dark"] {
        --success: #34c759;
        --info: #64d2ff;
    }

    /* Утилиты */
    .is-fullwidth-mobile {
        width: 100%;
    }

    @media (max-width: 768px) {
        .is-fullwidth-mobile {
            width: 100%;
        }
    }

    /* Улучшенная прокрутка для dropdown */
    .dropdown-content {
        -webkit-overflow-scrolling: touch;
    }

    /* Стили для отключенных кнопок */
    .button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Иконки в кнопках */
    .button .icon:first-child:not(:last-child) {
        margin-right: 0.5em;
    }

    .button .icon:last-child:not(:first-child) {
        margin-left: 0.5em;
    }

    /* Добавьте в CSS */