/* ========================================
   БАЗОВЫЕ СТИЛИ И ПЕРЕМЕННЫЕ
   ======================================== */
:root {
    --gold: #ffd700;
    --dark-bg: #1a1a1a;
    --medium-bg: #2a2a2a;
    --light-bg: #1e1e1e;
    --text-light: #ddd;
    --text-medium: #bbb;
    --text-dark: #888;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    animation: bodyFadeIn 0.6s ease forwards;
}

main {
    padding-top: 60px; /* Отступ сверху для всего контента, чтобы он не заезжал под фиксированную шапку */
}


@keyframes bodyFadeIn {
    to {
        opacity: 1;
    }
}

/* УБИРАЕМ ВСЕ СИНИЕ ССЫЛКИ */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:not(nav a):not(.cta-button):not(.social-link) {
    color: var(--text-light);
}

a:not(nav a):not(.cta-button):not(.social-link):hover {
    color: var(--gold);
}

/* ========================================
   SKIP LINK ДЛЯ ДОСТУПНОСТИ
   ======================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--gold);
    color: var(--dark-bg);
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    z-index: 1001;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   КОНТЕЙНЕР
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   ШАПКА - УЛУЧШЕННАЯ МОБИЛЬНАЯ ВЕРСИЯ
   ======================================== */
header {
    background: var(--dark-bg);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: var(--gold);
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    letter-spacing: 2px;
}

/* ========================================
   НАВИГАЦИЯ
   ======================================== */
nav ul {
    list-style: none;
    display: flex;
    gap: clamp(15px, 3vw, 25px);
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    position: relative;
    padding: 8px 12px;
    transition: var(--transition);
    border-radius: 4px;
}

nav a:hover,
nav a:focus {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a[aria-current="page"]::after {
    width: 80%;
}

/* ========================================
   МОБИЛЬНОЕ МЕНЮ - УЛУЧШЕННОЕ
   ======================================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1002;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* ========================================
   HERO СЕКЦИЯ - С КРАСИВЫМИ АНИМАЦИЯМИ
   ======================================== */
#hero {
    background: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)),
        url('images/hero-bg.svg') no-repeat center center/cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

/* Анимированные частицы на фоне */
#hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particlesMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes particlesMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: heroAppear 1s ease-out forwards;
    opacity: 0;
}

@keyframes heroAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-content h2 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
    animation: titleSlide 0.8s ease-out 0.3s backwards;
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    animation: textFade 0.8s ease-out 0.5s backwards;
}

@keyframes textFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CTA КНОПКА - С ЭФФЕКТОМ СИЯНИЯ
   ======================================== */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, #ffed4e 100%);
    color: var(--dark-bg);
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    transition: var(--transition);
    border: 2px solid var(--gold);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    animation: buttonAppear 0.8s ease-out 0.7s backwards;
}

@keyframes buttonAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Эффект сияния при наведении */
.cta-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover,
.cta-button:focus {
    background: transparent;
    color: var(--gold);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
}

.cta-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* ========================================
   INTRO СЕКЦИЯ - С АНИМАЦИЕЙ
   ======================================== */
#intro {
    padding: clamp(60px, 10vw, 80px) 20px;
    text-align: center;
    background: linear-gradient(180deg, #2a2a2a 0%, #252525 100%);
    position: relative;
    overflow: hidden;
}

#intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

#intro h2 {
    color: var(--gold);
    font-size: clamp(2rem, 6vw, 2.5rem);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

#intro p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    max-width: 800px;
    margin: 0 auto;
    color: #ccc;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ========================================
   SERVICES GRID
   ======================================== */
#services {
    padding: clamp(60px, 10vw, 80px) 20px;
    background: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(20px, 4vw, 30px);
    margin-top: 40px;
}

.service-card {
    background: linear-gradient(145deg, var(--medium-bg), #252525);
    padding: clamp(25px, 5vw, 35px) clamp(20px, 4vw, 25px);
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #333;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover,
.service-card:focus-within {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2), 0 0 60px rgba(255, 215, 0, 0.1);
    border-color: var(--gold);
}

.service-card i,
.service-icon {
    font-size: clamp(2.5rem, 6vw, 3rem);
    color: var(--gold);
    margin-bottom: 20px;
    display: block;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(255,215,0,0.3));
}

.service-card:hover i,
.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.6));
}

.service-card h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 15px;
    color: #fff;
    font-weight: 600;
}

.service-card p {
    font-size: clamp(0.95rem, 2vw, 1rem);
    color: var(--text-medium);
    margin-bottom: 15px;
    line-height: 1.6;
}

.price {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--gold);
    font-weight: bold;
    display: block;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--dark-bg);
    padding: clamp(30px, 6vw, 40px) 20px;
    text-align: center;
    color: #fff;
    border-top: 1px solid #333;
}

/* ========================================
   АНИМАЦИИ
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ - УЛУЧШЕННАЯ
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Мобильное меню */
    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        gap: 30px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    nav ul.active {
        display: flex;
        opacity: 1;
        animation: fadeIn 0.3s ease;
    }

    nav a {
        font-size: 1.5rem;
        padding: 15px 30px;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero оптимизация */
    #hero {
        min-height: 80vh;
        padding: 80px 15px 40px;
    }

    .hero-content h2 {
        margin-bottom: 15px;
    }

    .hero-content p {
        margin-bottom: 25px;
    }

    .cta-button {
        padding: 12px 28px;
        width: 100%;
        max-width: 300px;
    }

    /* Секции */
    #intro,
    #services {
        padding: 50px 15px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 25px 20px;
    }
}

/* ========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   ======================================== */
@media (max-width: 480px) {
    header h1 {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    #intro h2,
    .section-title {
        font-size: 1.8rem;
    }

    .service-card i,
    .service-icon {
        font-size: 2.5rem;
    }

    nav a {
        font-size: 1.3rem;
    }
}

/* ========================================
   УЛУЧШЕНИЯ ДЛЯ ТАЧ-УСТРОЙСТВ
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем области нажатия */
    nav a,
    .cta-button,
    .service-card,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Убираем hover эффекты на тач */
    .service-card:hover {
        transform: none;
    }

    /* Активное состояние для тача */
    .service-card:active {
        transform: scale(0.98);
    }

    .cta-button:active {
        transform: scale(0.95);
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
*:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline-offset: 4px;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ДЛЯ СТРАНИЦ
   ======================================== */

/* Services Hero */
#services-hero,
#about-hero,
#contact-hero,
#booking-hero {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(26,26,26,0.9) 100%);
    padding: clamp(100px, 15vw, 140px) 20px clamp(50px, 8vw, 70px);
    text-align: center;
    /* margin-top: 60px; БЫЛО УДАЛЕНО, ТАК КАК ТЕПЕРЬ ЕСТЬ PADDING У MAIN */
}

#services-hero h1,
#about-hero h1,
#contact-hero h1,
#booking-hero h1 {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    color: var(--gold);
    margin-bottom: 20px;
    line-height: 1.2;
}

#services-hero p,
#about-hero p,
#contact-hero p,
#booking-hero p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: #ccc;
}

/* Categories Filter - улучшенная мобильная версия */
.categories-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 40px 0;
    padding: 20px;
    background: var(--medium-bg);
    border-radius: 15px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    font-size: clamp(0.85rem, 2vw, 1rem);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: translateY(0);
}

/* Contact Grid - мобильная оптимизация */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(20px, 4vw, 40px);
}

.contact-card {
    background: var(--medium-bg);
    padding: clamp(30px, 5vw, 40px) clamp(20px, 4vw, 30px);
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.contact-card:hover,
.contact-card:focus-within {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.1);
}

/* Form improvements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    color: #fff;
    font-weight: bold;
    font-size: clamp(0.95rem, 2vw, 1rem);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: clamp(12px, 2.5vw, 15px);
    border-radius: 8px;
    border: 2px solid #444;
    background: #333;
    color: #fff;
    font-size: clamp(0.95rem, 2vw, 1rem);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Модальное окно - мобильная версия */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--medium-bg);
    margin: clamp(20px, 5vh, 60px) auto;
    padding: clamp(20px, 5vw, 40px);
    border-radius: 15px;
    width: clamp(90%, 600px, 95%);
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: bold;
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

/* Team cards - мобильная версия */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(25px, 5vw, 40px);
}

.team-member {
    background: var(--medium-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .member-image img {
        height: 250px;
    }
}