* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-display: swap;
}

body {
    background-color: #f9f5e9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(to right, #2c1810, #5d4037);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    /* ФИКСАЦИЯ ШАПКИ */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #ff9800;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo span {
    color: #ff9800;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

nav a:hover {
    color: #ff9800;
    background: rgba(255,255,255,0.1);
}

section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: #5d4037;
    font-size: 2.2rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #ff9800;
    margin: 15px auto;
    border-radius: 2px;
}

.lessons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.lesson-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.lesson-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.lesson-card-content {
    padding: 25px;
}

.lesson-card h3 {
    color: #5d4037;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.lesson-card p {
    color: #666;
    margin-bottom: 20px;
}

.difficulty {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.beginner {
    background-color: #e8f5e9;
    color: #2e7d32;
}

footer {
    background-color: #2c1810;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 3px solid #ff9800;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #ff9800;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #ff9800; 
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #5d4037;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: #ff9800;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #5d4037;
    color: #aaa;
    font-size: 0.9rem;
}

/* Стили для модулей на странице уроков */
.module-block {
    margin-bottom: 60px;
}

.module-title {
    color: #5d4037;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #ff9800;
    display: inline-block;
}

/* Убедимся, что сетка карточек работает внутри модуля */
.module-block .lessons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {
    /* КОМПАКТНАЯ ШАПКА */
    header {
        padding: 10px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 10px; 
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        /* УБРАЛИ flex-direction: column; */
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .lessons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    nav a {
        font-size: 0.95rem;
    }
}