:root {
    --bg-dark: #0a0a0a;
    --bg-secondary: #141414;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent: #e63946;
    --accent-hover: #c1121f;
    --header-height: 75px; /* Добавлено для scroll-padding */
}

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

html {
    scroll-padding-top: var(--header-height); /* Исправление: якоря не прячутся под header */
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Исправление: убираем горизонтальный скролл */
}

h1, h2, h3, .nav-link, .btn {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Для Safari */
    z-index: 1000;
    border-bottom: 1px solid #222;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* Добавлено: отступы между элементами */
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-main);
    text-decoration: none;
    flex-shrink: 0; /* Не сжимается */
}

.logo span { color: var(--accent); }

.logo-img {
    height: 45px;
    width: auto;
    max-width: 180px;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
    white-space: nowrap; /* Не переносится */
}

.nav-link:hover { color: var(--accent); }

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    white-space: nowrap;
}

.btn:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); }

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-secondary);
    padding: 0.3rem 0.6rem;
    border: 1px solid #333;
    border-radius: 4px;
    flex-shrink: 0;
}

.lang-switcher a { text-decoration: none; }

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: color 0.3s;
    letter-spacing: 1px;
}

.lang-btn:hover { color: var(--text-main); }
.lang-btn.active { color: var(--accent); }
.lang-divider { color: #444; font-size: 0.8rem; }

/* --- Анимации появления header --- */
.logo-img,
nav,
.lang-switcher,
.nav-container .btn { /* ✅ ИСПРАВЛЕНО: добавлена точка */
    opacity: 0;
    transform: translateY(15px);
    animation: fadeSlideUp 0.6s ease-out forwards;
}

.logo-img { animation-delay: 0s; }
nav { animation-delay: 0.15s; }
.lang-switcher { animation-delay: 0.3s; }
.nav-container .btn { animation-delay: 0.6s; } /* ✅ ИСПРАВЛЕНО */

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh; /* ✅ ИСПРАВЛЕНО: было height, теперь min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
                url(../img/hero.webp) no-repeat center center/cover;
    padding: calc(var(--header-height) + 2rem) 1rem 2rem; /* ✅ Учитываем header */
}

.hero-content h1 {
    display: none;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-logo {
    max-width: 400px;
    width: 80%;
    height: auto;
    margin: 0 auto 3rem auto; /* ✅ ИСПРАВЛЕНО: было 6rem */
    display: block;
    opacity: 0;
    filter: blur(10px) drop-shadow(0 0 20px rgba(230, 57, 70, 0.3)); /* ✅ ОБЪЕДИНЕНО: тень + blur */
    animation: blurFade 0.8s ease-out forwards;
}

@keyframes blurFade {
    to {
        opacity: 1;
        filter: blur(0) drop-shadow(0 0 20px rgba(230, 57, 70, 0.3)); /* ✅ Тень возвращается */
    }
}

/* --- Sections General --- */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow-wrap: break-word;
    hyphens: auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
    font-style: italic;
}

/* --- Music Section --- */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.music-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border: 1px solid #222;
    text-align: center;
    transition: transform 0.3s;
}

.music-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.album-art {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    margin-bottom: 1.5rem;
    border: 1px solid #222;
    transition: transform 0.3s;
}

.music-card:hover .album-art { transform: scale(1.03); }

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #222;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.streaming-links a {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    background: #222;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.streaming-links a:hover { background: var(--accent); }

.frame { border: none; }

/* --- EPK Section --- */
.epk-section {
    background: var(--bg-secondary);
    max-width: 100%;
}

.epk-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.epk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.epk-info h3 { margin-bottom: 1rem; color: var(--accent); }
.epk-info p { margin-bottom: 1.5rem; color: var(--text-muted); }

.epk-downloads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #0a0a0a;
    border: 1px solid #333;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s;
    gap: 1rem;
    overflow-wrap: break-word;
}

.download-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 { margin-bottom: 1rem; }
.contact-info p { margin-bottom: 1rem; color: var(--text-muted); }
.contact-info a { color: var(--accent); text-decoration: none; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%; /* ✅ Явная ширина */
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid #333;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    transition: border-color 0.3s;
}

.contact-form select option {
    background: var(--bg-secondary);
    color: var(--text-main);
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--bg-secondary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.7);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-icon {
    font-size: 2rem;
    color: white;
    background: var(--accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-icon { transform: scale(1); }

.gallery-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 0 1rem;
}

.gallery-cta .btn {
    display: inline-block;
    max-width: 100%; /* ✅ Не шире контейнера */
    white-space: normal; /* ✅ Разрешаем перенос текста */
    word-wrap: break-word;
    padding: 0.8rem 1.5rem;
    line-height: 1.4;
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active { display: flex; }

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    margin: 0;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    border: 2px solid #222;
}

.lightbox-content figcaption {
    text-align: center;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
    font-size: 0.95rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s, transform 0.3s;
    padding: 0.5rem 1rem;
    font-family: 'Montserrat', sans-serif;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover,
.lightbox-next:hover { transform: translateY(-50%) scale(1.2); }

/* --- Merch --- */
.merch-section {
    background: var(--bg-secondary);
    max-width: 100%;
    padding: 5rem 2rem;
}

.merch-container {
    max-width: 1200px;
    margin: 0 auto;
}

.merch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.merch-card {
    background: var(--bg-dark);
    border: 1px solid #222;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.merch-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.merch-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a1a1a;
}

.merch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.merch-card:hover .merch-image img { transform: scale(1.05); }

.merch-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    z-index: 1;
}

.merch-badge-hot { background: #f59e0b; color: #000; }

.merch-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.merch-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.merch-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.merch-price { margin-bottom: 1rem; }

.merch-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
}

.merch-price-value small {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.merch-btn {
    width: 100%;
    padding: 0.8rem;
    text-align: center;
}

.merch-cta {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #222;
}

.merch-cta p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* --- Burger Menu --- */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
}

.burger-line {
    width: 100%;
    height: 3px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-btn.active .burger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}
.burger-btn.active .burger-line:nth-child(2) { opacity: 0; }
.burger-btn.active .burger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.nav-mobile-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-btn { display: inline-block; }

/* --- Footer --- */
footer {
    background: #000;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid #222;
    overflow-wrap: break-word;
}

.social-links { margin-bottom: 1rem; }

.social-links a {
    color: var(--text-main);
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2rem;
}

.social-links a:hover { color: var(--accent); }

.footer-main-site {
    margin: 1rem 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-main-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.5rem;
    transition: color 0.3s;
    border-bottom: 1px solid transparent;
}

.footer-main-link:hover {
    color: var(--text-main);
    border-bottom-color: var(--accent);
}

.footer-main-link::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.7;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Планшеты */
@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .merch-grid { grid-template-columns: repeat(2, 1fr); }
    .epk-grid { gap: 2rem; }
    .contact-grid { gap: 2rem; }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    :root {
        --header-height: 65px;
    }
    
    .nav-container {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }
    
    .logo-img { height: 35px; }
    
    /* Показываем бургер */
    .burger-btn { display: flex; }
    
    /* Скрываем кнопку "Пригласить на концерт" в шапке */
    .header-btn { display: none; }
    
    /* Мобильное меню */
    .nav-mobile-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-mobile-container.active { right: 0; }
    
    .nav-mobile-container nav { width: 100%; }
    
    .nav-mobile-container nav ul {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    
    .nav-mobile-container .nav-link {
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }
    
    .nav-mobile-container .lang-switcher { margin-top: 1rem; }
    
    .nav-mobile-container.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: -1;
    }
    
    /* Hero */
    .hero {
        padding: calc(var(--header-height) + 1rem) 1rem 2rem;
    }
    
    .hero-logo {
        max-width: 250px;
        margin-bottom: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Секции */
    section {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-top: -1rem;
        margin-bottom: 2rem;
    }
    
    /* Музыка */
    .music-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .music-card {
        padding: 1.5rem;
    }
    
    /* EPK */
    .epk-section { padding: 3rem 0; }
    
    .epk-container { padding: 0 1rem; }
    
    .epk-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .download-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Контакты */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Галерея */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }
    
    .gallery-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .gallery-cta {
        padding: 0 0.5rem;
    }
    
    .gallery-cta .btn {
        width: 100%;
        max-width: 400px;
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
    
    /* Лайтбокс */
    .lightbox { padding: 1rem; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-close { top: 0.5rem; right: 0.5rem; }
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next { font-size: 2rem; }
    
    /* Мерч */
    .merch-section { padding: 3rem 1rem; }
    
    .merch-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .merch-info { padding: 1rem; }
    
    .merch-info h3 { font-size: 0.95rem; }
    
    .merch-desc { font-size: 0.8rem; }
    
    .merch-price-value { font-size: 1.2rem; }
    
    .merch-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
    }
    
    /* Футер */
    footer {
        padding: 2rem 1rem;
        font-size: 0.85rem;
    }
    
    .social-links a {
        margin: 0 8px;
        font-size: 1.1rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .hero-logo { max-width: 200px; }
    
    .section-title { font-size: 1.5rem; }
    
    .gallery-cta .btn {
        font-size: 0.85rem;
        padding: 0.7rem 0.8rem;
    }
    
    .merch-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .merch-image { aspect-ratio: 16 / 9; }
    
    .music-card { padding: 1rem; }
    
    .streaming-links a {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .download-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

/* Отключение анимаций для пользователей с настройками */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}