/* ========== Hero секция — стабильная и адаптивная ========== */
.hero {
    width: 100%;
    min-height: 100vh;
    background-color: #fff9f9;
    padding: 0;
    margin: 0 0 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.hero-card {
    display: flex;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    width: calc(100% - 40px);
    max-width: 1600px;
    height: 85vh;
    margin: 0 auto;
    gap: 40px;
    box-sizing: border-box;
}

/* Текст */
.hero-text {
    flex: 0 0 520px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.hero-text h1 {
    font-size: clamp(1.9rem, 4vw, 2.3rem);
    margin-bottom: 1.2rem;
    color: #e03e3e;
    line-height: 1.3;
    font-weight: bold;
}

.hero-text h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    margin-bottom: 1.4rem;
    color: #444;
    line-height: 1.4;
}

/* Заголовок: две части */
.hero-title-main,
.hero-title-sub {
    display: inline;
}

/* Фото */
.hero-image {
    flex: 0 0 640px;
    height: 100%;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    margin-left: auto;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
}

/* Кнопка — единое определение */
.btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1.2rem;
    color: white;
    background-color: #ff6b6b;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid white;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    text-align: center;
    font-weight: bold;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    background-color: #e03e3e;
}

/* ========== Адаптивность ========== */

/* Планшеты и ниже */
@media (max-width: 1200px) {
    .hero-text {
        min-width: 320px;
        padding: 40px 20px;
        flex: 0 0 400px;
    }
    .hero-image {
        flex: 0 0 360px;
    }
}

@media (max-width: 992px) {
    .hero-text {
        min-width: 280px;
        flex: 0 0 320px;
    }
    .hero-image {
        flex: 0 0 320px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .hero-card {
        flex-direction: column;
        height: auto;
        margin: 0 16px;
        gap: 24px;
        padding: 20px 0;
    }

    .hero-title-main,
    .hero-title-sub {
        display: block;
        text-align: center;
    }

    .hero-text {
        min-width: auto;
        padding: 30px 20px;
        text-align: center;
        align-items: center;
        flex: none;
    }

    /* Разбивка заголовка на две строки */
    .hero-title-main,
    .hero-title-sub {
        display: block;
        text-align: center;
    }

    .hero-title-sub {
        font-size: clamp(1.4rem, 4.5vw, 1.6rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-text h1 {
        font-size: 1.9rem;
        line-height: 1.3;
        margin-bottom: 1.1rem;
        text-align: center;
    }

    .hero-image {
        width: 100%;
        height: 360px;
        min-height: 320px;
        flex: none;
    }

    .hero-image img {
        object-position: center 25%;
    }

    
    .btn {
        align-self: center;
        padding: 12px 32px;
        font-size: 1.1rem;
        min-width: auto;
        width: auto;
    }
}

/* Десктоп: крупная кнопка */
@media (min-width: 769px) {
    .btn {
        padding: 16px 80px;
        font-size: 1.3rem;
        min-width: 620px;
    }
}