/* Общие стили для всего сайта */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Импорт шрифтов с Google Fonts (Roboto для основного текста, Open Sans для заголовков) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Open+Sans:wght@400;500;600;700&display=swap');

/* 
 * CSS-переменные для единообразия стилей по всему сайту 
 * Использование переменных позволяет легко менять цветовую схему и другие параметры
 */
:root {
    --primary-color: #006DB6;         /* Основной синий цвет университета */
    --secondary-color: #00427A;       /* Темно-синий цвет для акцентов */
    --accent-color: #FFB800;          /* Акцентный золотой цвет */
    --text-color: #212B36;            /* Основной цвет текста (темный) */
    --light-text: #6B7280;            /* Светлый цвет для параграфов */
    --background-color: #FFFFFF;      /* Цвет фона (белый) */
    --section-bg: #F7F9FC;            /* Светлый фон для секций */
    --border-color: #E5E7EB;          /* Цвет границ */
    --success-color: #10B981;         /* Зеленый цвет для успешных уведомлений */
    --warning-color: #F59E0B;         /* Оранжевый для предупреждений */
    --danger-color: #EF4444;          /* Красный для ошибок */
    --container-width: 1280px;        /* Максимальная ширина контейнера */
    --header-height: 80px;            /* Высота шапки сайта */
    --border-radius: 8px;             /* Скругление углов */
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Тень для блоков */
    --transition: all 0.3s ease;      /* Стандартное время перехода анимации */
}

/* 
 * Базовые стили для тега body 
 * Задаем основной шрифт, цвета и размеры для всего сайта
 */
body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 16px;
    overflow-x: hidden;
    background: url('assets/img/background.webp') top center repeat-y #f7f9fc;
    background-size: 100% auto;
    background-position: top center;
}

/* 
 * Контейнер для центрирования содержимого
 * Используется для ограничения максимальной ширины контента и центрирования на странице
 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* 
 * Стили для всех заголовков 
 * Используем Open Sans для более читаемых заголовков
 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', Arial, sans-serif;
    margin-bottom: 0.5em;
    line-height: 1.3;
    color: var(--secondary-color);
}

/* Отступы для основных секций сайта */
section {
    padding: 60px 0;
}
/* Общее исправление для всех мобильных устройств */
@media (max-width: 768px) {
    /* Исправление общего контейнера */
    .container {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* Более специфичное исправление для маленьких экранов */
@media (max-width: 480px) {
    /* Полностью сбрасываем отступы для контейнера */
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Специфические стили для самых маленьких экранов для устранения отступа слева */
@media (max-width: 425px) {
    .container {
        padding: 0;
        width: 100%;
        margin: 0 auto;
    }
}

.content {
    width: 80%;
    max-width: 1500px;
    margin: 0 auto 0 auto;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 40px 40px 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

.content h2 {
    margin-bottom: 32px;
    color: #1a2a3a;
    font-size: 28px;
    font-weight: 700;
    text-align: left;
    font-family: 'Open Sans', Arial, sans-serif;
    width: 100%;
}

@media (max-width: 900px) {
    .content {
        width: 96%;
        padding: 24px 8px 24px 8px;
    }
}

@media (max-width: 768px) {
    body {
        background: #f7f9fc !important;
    }
    .content {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 18px 4vw 18px 4vw;
    }
}

/* Popular Questions Section Styles */
.popular-questions-section {
    padding: 60px 0;
    margin-bottom: 40px;
    background-color: #f8f9fa;
    border-radius: 15px;
}

.popular-questions-section h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.questions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.questions-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.questions-column {
    flex: 1 1 40%;
    min-width: 300px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.question-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    width: 100%;
}

.question-button:hover, .question-button.active {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.wide-button {
    grid-column: span 2;
}

.questions-footer {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 20px;
}

.questions-footer-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.question-content-container {
    flex: 1 1 50%;
    min-width: 350px;
    height: 650px;
    position: relative;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.question-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.question-image.active {
    display: block;
}

.question-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-content {
        position: absolute;
        top: 0;
        left: 0;
    width: 100%;
        height: 100%;
    padding: 30px;
    overflow-y: auto;
    background-color: white;
    display: none;
}

.question-content.active {
    display: block;
    animation: fadeInContent 0.4s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.question-content p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.question-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.question-content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.question-content li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.ask-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 109, 182, 0.2);
}

.ask-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 109, 182, 0.4);
}

@media (max-width: 992px) {
    .questions-column {
        flex: 1 1 100%;
    }
    
    .question-content-container {
        flex: 1 1 100%;
        height: 550px;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .questions-grid {
        grid-template-columns: 1fr;
    }
    
    .wide-button {
        grid-column: span 1;
    }
    
    .questions-footer {
        grid-column: span 1;
    }
    
    .question-content-container {
        height: 500px;
    }
}

@media (max-width: 576px) {
    .popular-questions-section h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .question-content {
        padding: 20px;
    }
    
    .question-content h3 {
        font-size: 20px;
    }
}


.interesting-section, 
.popular-questions-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.interesting-section h2, 
.popular-questions-section h2 {
    width: 100%;
    box-sizing: border-box;
}

.interesting-items,
.questions-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
