/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
:root {
    --bg-color: #f5efe2;
    --text-color: #141416;
    --card-bg: #ede6d6;
    --accent-color: #ff5e5e; /* Акцентный цвет для активных элементов */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* =========================================
   НАВИГАЦИЯ
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 1000;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1001; /* Чтобы логотип всегда был поверх меню */
}

.my-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #ccc;
}

.logo-text {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 1px;
}

/* =========================================
   ССЫЛКИ ДЕСКТОП И ОВЕРЛЕЙ
   ========================================= */
.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px); /* Красивое размытие фона за меню */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 900;
}

/* =========================================
   КНОПКА БУРГЕР-МЕНЮ
   ========================================= */
.burger-btn {
    display: none; /* Скрыта на компьютерах */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.burger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
}

/* =========================================
   АУДИО УПРАВЛЕНИЕ
   ========================================= */
.audio-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    z-index: 100;
}

#music-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

#music-toggle:active {
    transform: scale(0.9);
}

#volume-slider {
    width: 80px;
    accent-color: var(--text-color);
    cursor: pointer;
}

/* =========================================
   ГАЛЕРЕЯ И КАРТОЧКИ
   ========================================= */
.gallery-container {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.bg-huge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28vw;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
}

.gallery-track {
    display: flex;
    gap: 40px;
    padding-left: 30vw; 
    padding-right: 30vw;
    z-index: 1;
}

.gallery-card {
    display: block;
    position: relative;
    width: 320px;
    height: 450px;
    border-radius: 24px;
    background-color: var(--card-bg);
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-card:hover {
    transform: translateY(-15px);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #d1d8e0;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 20px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: white;
    box-sizing: border-box;
}

.card-info h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.card-info p {
    margin: 0;
    font-size: 15px;
    opacity: 0.8;
}

/* =========================================
   АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА (Меньше 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Навигация */
    nav {
        padding: 15px 20px;
    }

    .my-logo {
        width: 45px;
        height: 45px;
    }

    .logo-text {
        font-size: 18px;
    }

    /* Бургер-меню */
    .burger-btn {
        display: flex; /* Показываем кнопку на телефоне */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Прячем меню за правый край экрана */
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-color);
        display: flex;
        flex-direction: column;
        padding: 100px 30px 30px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-links a {
        margin: 15px 0;
        font-size: 22px;
        font-weight: 600;
    }

    /* Состояние открытого меню (классы добавит JS) */
    body.menu-open .nav-links {
        right: 0; /* Меню выезжает */
    }

    body.menu-open .menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Анимация крестика для бургера */
    body.menu-open .burger-line:nth-child(1) {
        transform: rotate(45deg) translateY(-2px);
    }
    body.menu-open .burger-line:nth-child(2) {
        opacity: 0; /* Средняя линия исчезает */
    }
    body.menu-open .burger-line:nth-child(3) {
        transform: rotate(-45deg) translateY(2px);
    }

    /* Галерея и карточки */
    .bg-huge-text {
        font-size: 40vw; /* Текст крупнее на узких экранах */
    }

    .gallery-track {
        padding-left: 15vw; /* Уменьшаем пустые отступы по краям */
        padding-right: 15vw;
        gap: 20px; /* Карточки ближе друг к другу */
    }

    .gallery-card {
        width: 260px; /* Карточки немного уже и ниже */
        height: 380px;
    }

    .card-info h3 {
        font-size: 20px;
    }

    /* Аудиоплеер */
    .audio-controls {
        bottom: 20px;
        right: 20px;
        padding: 8px 12px;
    }

    #music-toggle {
        font-size: 20px;
    }

    #volume-slider {
        width: 60px;
    }
}

