/* Основные стили для всех страниц */

/* Базовые переменные */
:root {
    --primary-color: #3182ce;
    --primary-hover: #2c5282;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-color: #f8fafc;
    --card-bg: #fff;
    --card-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    --primary-accent: #3182ce;
    --text-dark: #1a365d;
    --header-height: 30px;
    /* Дефолтная высота шапки */
}

/* Глобальный сброс отступов */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Общие стили контейнера */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    padding-top: var(--header-height);
    /* Используем переменную */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    /*Добавилось на single-course.css*/
    color: #1a365d;
}

/* Общие компоненты */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Общие стили кнопок */
.button {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.enroll-button {
    background: #2196F3;
    color: white;
}

.button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Сетка (общая) */
.tabs__content-item {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Аккордеон (базовые стили) */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem;
    background: #f8fafc;
    border: none;
    cursor: pointer;
}

/* Сетка (базовые стили) */
.grid-2-columns {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* Карточки курсов (общие)  Одинаковые с .cards-grid*/
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    min-height: 500px;
    /* Запасная высота */
    position: relative;
}

.no-courses {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
}

/* Типографика */
h1,
h2,
h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Хлебные крошки (интеграция в общую систему) */
.breadcrumbs {
    padding: 12px 0;
    margin: 0 0 2rem;
    /* Соответствие общей вертикальной ритмике */
    font-size: 0.9rem;
    /* Использование относительных единиц */
    color: var(--text-light);
    /* Использование CSS-переменных */
    background: var(--bg-color);
    /* Легкий фон для разделения секций */
    border-radius: 4px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    /* Анимация в едином стиле с кнопками */
    display: inline-flex;
    /* Для будущих иконок */
    align-items: center;
}

.breadcrumbs a:hover {
    color: var(--primary-hover);
    text-decoration: none;
    /* Убираем подчеркивание в пользу цвета */
}

.breadcrumbs .current {
    color: var(--text-dark);
    font-weight: 600;
    /* Соответствие заголовкам */
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: var(--border-color);
    font-weight: 300;
}




/* Добавляем адаптивные медиа-запросы */
@media (max-width: 1280px) {
    :root {
        --header-height: 55px;
        /* Добавлено */
    }

    .container {
        max-width: 90%;
        padding-top: var(--header-height);
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --header-height: 50px;
        /* Добавлено */
    }

    .container {
        padding-top: var(--header-height);
    }

    .grid-2-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 45px;
        /* Добавлено */
    }

    .container {
        padding-top: var(--header-height);
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .breadcrumbs {
        padding: 8px 15px;
        /* Добавляем боковые отступы */
        margin-bottom: 1.5rem;
        font-size: 0.85rem;
    }

    .breadcrumbs .separator {
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 40px;
        /* Добавлено */
    }

    .container {
        padding: 0 15px;
        padding-top: var(--header-height);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .accordion-header {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Состояния для темной темы */
@media (prefers-color-scheme: dark) {
    .breadcrumbs {
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.8);
    }

    .breadcrumbs a {
        color: #90cdf4;
    }

    .breadcrumbs .current {
        color: #fff;
    }
}