/* Стили для герой-секции */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    min-height: 80vh;
    padding: var(--space-xxl) 0;
    background: linear-gradient(135deg, var(--dark) 0%, var(--light-dark) 100%);
    position: relative;
    overflow: hidden;
    gap: var(--space-xl);
    max-width: 100%;
    margin: 0 auto;
}

.hero__content {
    flex: 0 1 50%;
    max-width: 550px;
    z-index: 2;
    padding: 0 var(--space-lg);
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: var(--light);
    margin-bottom: var(--space-xl);
    opacity: 0.9;
    line-height: 1.5;
}

.hero__cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

.hero__cta .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.hero__image {
    flex: 0 1 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 0 var(--space-lg);
}

.hero__image-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.hero__image-img:hover {
    transform: translateY(-5px);
}

/* Специфичные стили для разных страниц */
.quiz-hero .hero__title {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crocodile-hero .hero__title {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.Interactive-game-hero .hero__title {
    background: linear-gradient(135deg, #9D50BB 0%, #6E48AA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Адаптивность для планшетов */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: var(--space-xl) 0;
        gap: var(--space-lg);
        min-height: auto;
    }

    .hero__content {
        flex: 1;
        max-width: 100%;
        margin-bottom: 0;
        padding: 0 var(--space-md);
    }

    .hero__title {
        font-size: clamp(2.2rem, 4vw, 3rem);
    }

    .hero__cta {
        justify-content: center;
    }

    .hero__image {
        flex: 1;
        max-width: 500px;
        margin: 0 auto;
        padding: 0 var(--space-md);
    }

    .hero__image-img {
        max-height: 350px;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .hero {
        padding: var(--space-lg) 0;
        gap: var(--space-md);
    }

    .hero__content {
        padding: 0 var(--space-sm);
    }

    .hero__title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
        margin-bottom: var(--space-sm);
    }

    .hero__subtitle {
        font-size: clamp(1rem, 2vw, 1.1rem);
        margin-bottom: var(--space-lg);
    }

    .hero__cta {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .hero__cta .btn {
        justify-content: center;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero__image {
        padding: 0 var(--space-sm);
    }

    .hero__image-img {
        max-height: 300px;
        max-width: 100%;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .hero {
        padding: var(--space-md) 0;
    }

    .hero__content {
        padding: 0 var(--space-xs);
    }

    .hero__title {
        font-size: clamp(1.5rem, 3vw, 2rem);
        line-height: 1.3;
    }

    .hero__subtitle {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .hero__image-img {
        max-height: 250px;
    }

    .hero__cta .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.9rem;
    }
}

/* Исправления для специфичных случаев */
.hero-container {
    width: 100%;
    overflow: hidden;
}

/* Гарантия что изображения не выйдут за пределы */
.hero__image {
    position: relative;
}

.hero__image::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    z-index: 1;
}

/* Улучшение читаемости текста */
.hero__content {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Плавная анимация появления */
.hero {
    animation: fadeInUp 0.8s ease-out;
}

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