﻿* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, sans-serif; line-height: 1.6; color: var(--text-dark); overflow-x: hidden; }

nav { position: fixed; top: 0; width: 100%; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); z-index: 1000; padding: 1rem 5%; box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
nav ul { list-style: none; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--text-dark); font-weight: 600; position: relative; }
nav a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); transition: width 0.3s; }
nav a:hover::after { width: 100%; }

section {
    min-height: auto; /* Убираем принудительную высоту экрана */
    padding: 80px 5% 60px; /* Адаптивные отступы */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
section.visible { opacity: 1; transform: translateY(0); }
h2 { font-size: 2.5rem; margin-bottom: 2rem; text-align: center; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

#player {
    min-height: 100vh;
    height: auto;
    padding: 2rem 5%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-container {
    min-height: 70vh; /* Минимальная высота */
    height: auto; /* Разрешаем растягиваться под контент */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.slide {
    position: absolute;
    inset: 0; /* Современный аналог top:0; right:0; bottom:0; left:0; */
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}
.slide.active { opacity: 1; }
.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}
.overlay-buttons {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 2rem 4rem; /* Отступы: верх, бока, низ (под точки) */
    width: 100%;
    max-width: 1000px;
}
.overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Safari поддержка */
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}
.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
}
.overlay-btn:active {
    transform: translateY(-1px) scale(0.98);
}
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.slider-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.slider-dot.active { background: white; width: 30px; border-radius: 6px; }

#about { background: var(--bg-light); }
.about-content { max-width: 900px; margin: 0 auto; text-align: center; }
.about-content p { font-size: 1.2rem; color: var(--text-light); margin-bottom: 1.5rem; line-height: 1.8; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
.feature-card { background: white; padding: 2rem; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: var(--transition); opacity: 0; transform: translateY(30px); }
.feature-card.visible { opacity: 1; transform: translateY(0); }
.feature-card:hover { transform: translateY(-10px); }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }

#registration { background: linear-gradient(to bottom, var(--bg-light), white); }
.form-container { max-width: 600px; margin: 0 auto; background: white; padding: 3rem; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 1.5rem; opacity: 0; transform: translateX(-30px); transition: all 0.5s ease; }
.form-group.visible { opacity: 1; transform: translateX(0); }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input { width: 100%; padding: 1rem; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1rem; transition: all 0.3s; }
.form-group input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.submit-btn { width: 100%; padding: 1rem; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; border: none; border-radius: 10px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; opacity: 0; transform: scale(0.9); }
.submit-btn.visible { opacity: 1; transform: scale(1); }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(102,126,234,0.4); }

/* === СЕКЦИЯ КОНТАКТОВ === */
#contact {
    position: relative;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), 
        url('../images/parallax/subscribe.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Эффект параллакса при скролле */
}

/* Заголовок делаем белым для контраста на тёмном фоне */
#contact h2 {
    background: none;
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Форма остаётся на светлой подложке для удобства ввода */
#contact .form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

#map { background: var(--bg-light); padding: 100px 0 50px; }
.map-container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.map-info { text-align: center; margin-top: 2rem; color: var(--text-light); }

#google-container {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    background: #e5e7eb; /* Заглушка пока карта грузится */
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease;
}

#google-container.visible {
    opacity: 1;
    transform: scale(1);
}

#google-container .gm-style {
    border-radius: 20px;
}


footer { background: var(--text-dark); color: white; text-align: center; padding: 2rem; }

@media (max-width: 768px) {
    section { padding: 60px 4% 40px; }
    #player { padding: 1rem 4%; min-height: auto; }
    
    .slider-container {
        min-height: 60vh;
        border-radius: 15px;
    }

    .overlay-buttons {
        flex-direction: column;
        align-items: stretch; /* Кнопки на всю ширину */
        gap: 1rem;
        padding: 2rem 1rem 3.5rem;
    }

    .overlay-btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    h2 { font-size: 2rem; }
    nav ul { gap: 1rem; font-size: 0.9rem; }
    .form-container { padding: 2rem 1.5rem; }
    #contact {
        background-attachment: scroll; /* iOS не поддерживает fixed + cover */
        padding: 80px 5% 40px;
    }
    #contact .form-container {
        padding: 2rem 1.5rem;
    }
    #google-container { height: 350px; }
}