/* Общие стили */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom right, #f0f0f0, #e0e0e0);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden; /* Убираем горизонтальный скролл */
}

/* Хедер */
header {
    background: linear-gradient(to right, #3c3f41, #2c3e50);
    color: white;
    padding: 20px 40px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

header h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
    flex-grow: 1;
    text-align: left;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-grow: 1;
}

.search-form input {
    padding: 10px;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-form input:focus {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    border-color: #2980b9;
}

.search-form button {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    background-color: #2c3e50;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
}

.search-form button:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

/* Контейнеры */
.container {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    width: 100%;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

/* Боковое меню - Прилипающее меню */
.sidebar {
    width: 25%;
    max-width: 300px;
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
    display: block;
    position: -webkit-sticky; /* Для поддержки Safari */
    position: sticky;
    top: 20px; /* Отступ сверху — когда прилипнет */
    overflow-y: auto;
    max-height: calc(100vh - 40px); /* Ограничение высоты с учетом отступа сверху и снизу */
}

.sidebar:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.sidebar h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #34495e;
    text-align: center;
}

.sections-menu,
.steps-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-item {
    margin-bottom: 20px;
}

/* Стили для кнопок разделов */
.modern-button {
    display: block;
    width: 100%;
    background: linear-gradient(to right, #34495e, #5d6d7e);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 20px;
    text-align: left;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-button:hover {
    background: linear-gradient(to right, #2c3e50, #3c3f41);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modern-button.expanded {
    background: linear-gradient(to right, #5d6d7e, #34495e);
    color: #ffffff;
}

/* Развернутый список шагов (внутри разделов) */
.steps-menu {
    padding-left: 20px;
    border-left: 4px solid #2980b9;
    margin-top: 10px;
}

.step-link {
    display: block;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    color: #34495e;
    padding: 10px 15px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.step-link:hover {
    background-color: #f0f4f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Основное содержимое */
.content {
    flex-grow: 1;
    background: linear-gradient(135deg, #f7f7f7, #eaeaea);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    width: calc(75% - 40px);
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.category {
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    background: linear-gradient(to right, #ffffff, #f0f2f5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.2s;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.category h2 {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
    color: #34495e;
}

/* Новый стиль для шагов */
.steps li {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(to bottom, #ffffff, #f5f5f5);
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left: 8px solid #34495e;
    transition: box-shadow 0.3s ease, transform 0.2s;
    position: relative;
}

.steps li:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.steps h3 {
    margin-top: 0;
    font-size: 20px;
    color: #2c3e50;
}

.steps p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

/* Прогресс-бар */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #b0c4de;
    z-index: 1000;
}

.progress {
    height: 100%;
    width: 0;
    background-color: #34495e;
    transition: width 0.3s ease;
}

/* Подвал */
footer {
    background: linear-gradient(to right, #2c3e50, #3c3f41);
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    /* Хедер */
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    header h1 {
        text-align: center;
        font-size: 22px;
    }

    .menu-toggle {
        display: block; /* Показываем кнопку на мобильной версии */
        background: #2c3e50;
        color: white;
        padding: 10px 20px;
        font-size: 16px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        margin-bottom: 20px;
        transition: background 0.3s ease;
    }

    .menu-toggle:hover {
        background: #1a252f;
    }

    .search-form {
        width: 100%;
        margin-top: 10px;
        justify-content: center;
    }

    .search-form input {
        width: calc(100% - 100px);
        max-width: 100%;
    }

    /* Основное содержимое */
    .content {
        width: 100%;
        padding: 20px;
    }

    .steps li {
        padding: 15px;
        border-left: 6px solid #2c3e50;
    }

    /* Подвал */
    footer {
        font-size: 14px;
        padding: 12px;
    }
}
