* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(141.23deg, #667EEA 0%, #764BA2 100%);
    min-height: 100vh;
}

button {
    border: none;
    outline: none;
    background: none;
}

/* ===== ХЕДЕР ===== */
.header {
    font-family: 'Arial', sans-serif;
    padding: 0.5rem 1rem;
    background: rgb(85 91 161 / 70%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header--hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.name a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    font-size: 1.8rem;
}

.logo a {
    color: white;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.logo a:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a,
.logout-link-button {
    color: white;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 1px;
    white-space: nowrap;
    font-size: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.nav-links a:hover,
.logout-link-button:hover {
    opacity: 0.6;
}

/* ===== ГЕРОЙ ===== */
.hero {
    padding: 7rem 1rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 5vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.9;
    padding: 0 1rem;
}

/* ===== СЕКЦИИ ===== */
.section {
    padding: 3rem 0;
    background: white;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== МЕДИА-ЗАПРОСЫ ===== */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .name a {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }
}

/* Телефоны в альбомной ориентации и маленькие планшеты */
@media (max-width: 768px) {
    .header {
        padding: 0.5rem;
    }

    .nav {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }

    .name a {
        font-size: 1.5rem;
    }

    .logo a {
        font-size: 0.8rem;
    }

    .nav-links {
        gap: 0.8rem;
        justify-content: center;
        width: 100%;
    }

    .nav-links a,
    .logout-link-button {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .hero {
        padding: 6rem 1rem 2rem;
        min-height: 90vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Телефоны в портретной ориентации (до 480px) */
@media (max-width: 480px) {
    .header {
        padding: 0.4rem 0.3rem;
    }

    .name a {
        font-size: 1.2rem;
    }

    .logo a {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a,
    .logout-link-button {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .hero {
        padding: 5rem 0.5rem 1.5rem;
        min-height: 85vh;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .container {
        padding: 0 0.8rem;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .name a {
        font-size: 1rem;
    }

    .nav-links a,
    .logout-link-button {
        font-size: 0.7rem;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }
}

/* ===== АДАПТИВНАЯ НАВИГАЦИЯ ===== */

/* Бургер-кнопка (скрыта на десктопе) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Анимация бургера → крестик */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ (до 768px) ===== */
@media (max-width: 768px) {
    /* Показываем бургер */
    .hamburger {
        display: flex;
    }

    /* Меню скрыто за экраном */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: rgba(85, 91, 161, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        transition: right 0.4s ease-in-out;
        z-index: 999;
        margin: 0;
        list-style: none;
    }

    /* Открытое меню */
    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.3rem;
        padding: 0.8rem 0;
        display: block;
        white-space: normal;
    }

    /* Затемнение фона при открытом меню */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    /* Блокировка прокрутки */
    body.menu-open {
        overflow: hidden;
    }
}

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .nav-links {
        width: 100%;
        max-width: 100%;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.6rem 0;
    }

    .hamburger span {
        width: 24px;
        height: 2.5px;
    }
}