/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-animate > * {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

.stagger-animate > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animate > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animate > *:nth-child(3) { animation-delay: 0.3s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .trainer-hero {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .trainer-intro h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .header-logo {
        max-height: 60px;
        max-width: 170px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    #map {
        height: 300px !important;
    }
}

@media (max-width: 768px) {
    .header {
        height: 80px;
        padding: 0 15px;
    }
    
    .navbar {
        height: 80px;
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .header-logo {
        height: 60px;
        max-height: 50px;
        max-width: 160px;
    }
    
    .btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, select {
        font-size: 16px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 30px 20px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    main {
        margin-top: 80px;
    }
    
    .hero {
        min-height: calc(100vh - 80px);
    }
    
    .nav-right .social-icons {
        display: none;
    }
    
    .phone-number {
        display: none;
    }
    
    .nav-center {
        display: none;
    }
    
    .nav-right {
        display: none;
    }
    
    .mobile-book-btn {
        display: block;
        width: 90%;
        margin: 20px auto;
        text-align: center;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .coach-note {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .career-gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .career-gallery .gallery-item {
        height: 220px;
    }
    
    .trainer-intro h1 {
        font-size: 2.2rem;
    }
    
    .trainer-tagline {
        font-size: 1.1rem;
    }
    
    .highlight-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .trainer-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .trainer-photo-main {
        margin: 0 auto 30px;
        max-width: 300px;
    }
    
    .family-content {
        flex-direction: column;
    }
    
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 1100px) {
    .nav-right .social-icons {
        display: none;
    }
    
    .book-btn {
        padding: 10px 25px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 75px;
        padding: 0 10px;
    }
    
    .navbar {
        height: 75px;
    }
    
    .header-logo {
        max-height: 55px;
        max-width: 140px;
    }
    
    .hamburger {
        width: 30px;
        height: 30px;
    }
    
    .hamburger span {
        width: 20px;
        height: 2px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .book-btn span {
        display: none;
    }
    
    .book-btn i {
        margin: 0;
    }
    
    .nav-menu {
        top: 75px;
        height: calc(100vh - 75px);
    }
    
    main {
        margin-top: 75px;
    }
    
    .hero {
        min-height: calc(100vh - 75px);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn-large,
    .btn-xlarge {
        width: 100%;
        text-align: center;
    }
    
    .career-gallery .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .career-gallery .gallery-item {
        height: 250px;
    }
    
    .trainer-intro h1 {
        font-size: 1.8rem;
    }
    
    .trainer-quote {
        padding: 20px;
        font-size: 0.95rem;
    }
    
    .trainer-badge {
        font-size: 0.9rem;
        padding: 8px 15px;
        bottom: 10px;
        left: 10px;
    }
}

@media (max-width: 360px) {
    .header-logo {
        max-height: 40px;
        max-width: 100px;
    }
    
    .hamburger {
        width: 28px;
        height: 28px;
    }
}

/* EMERGENCY Z-INDEX FIX */
@media (max-width: 768px) {
    .header {
        z-index: 1000 !important;
    }
    
    .nav-menu {
        z-index: 999 !important;
    }
    
    .hamburger {
        z-index: 1001 !important;
    }
    
    /* Скрываем все что может мешать */
    .floating-elements,
    .subtle-floating,
    .floating-skate,
    .floating-snowflake {
        display: none !important;
    }
}