/* ===========================================
   HERO BLOCK STYLES - Объединённые и очищенные
   =========================================== */

/* Базовые стили hero секции */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    margin-bottom: 0;
    background-color: #ffffff;
    overflow: hidden;
}

/* Фоновый контейнер для Spline */
.spline-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background-color: #ffffff;
}

.spline-background spline-viewer {
    width: 140%;
    height: 100%;
    transform-origin: left center;
    transform: scale(1.2);
    z-index: 0;
}

/* Скрытие водяного знака Spline */
::part(watermark),
::shadow-part(watermark) {
    display: none !important;
}

spline-viewer {
    --watermark-display: none;
}

.spline-background iframe {
    display: none;
}

/* Контентная область hero */
.hero__content {
    position: relative;
    z-index: 999;
    max-width: 1400px;
    padding: 40px;
    margin: 0 auto;
    padding-top: 150px;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    transform: translateZ(0);
}

.text-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    position: relative;
}

.text-left {
    grid-column: 1 / 3;
    margin-bottom: 20px;
    text-align: left;
}

/* Заголовок h1 */
h1 {
    font-family: 'Gilroy', sans-serif;
    font-size: 78px;
    line-height: 0.9;
    margin: 0;
    padding: 0;
    font-weight: 400;
    text-transform: uppercase;
    color: #1a1a1a;
    text-align: left;
}

h1 span {
    display: block;
    text-align: left;
    margin-left: 0;
}

h1 span:first-child {
    color: #FF6B00;
    margin-left: 0;
}

/* Правый блок с описанием */
.text-right {
    grid-column: 2 / 3;
    margin-top: -40px;
    position: relative;
    justify-self: end;
    width: 480px;
    margin-left: 0;
}

p {
    font-family: 'Gilroy', sans-serif;
    font-size: 22px;
    line-height: 1.4;
    color: #333333;
    margin: 0;
    text-align: left;
    width: 100%;
}

/* Описание под заголовком */
.hero-description {
    font-size: 22px;
    line-height: 1.4;
    color: #333333;
    margin: 30px 0 0 0;
    text-align: left;
    max-width: 700px;
    width: 100%;
    margin-left: 300px;
    display: block;
    position: relative;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Кнопка CTA */
.hero .cta-button {
    min-width: auto;
    padding: 0 32px;
    width: fit-content;
    display: inline-flex;
    white-space: nowrap;
    height: 46px;
    font-size: 14px;
    border-radius: 23px;
    margin-left: 380px;
    font-weight: 500;
}

/* Оптимизация для мобильных устройств */
.mobile-view .hero {
    -webkit-overflow-scrolling: touch;
    will-change: transform;
    touch-action: pan-y;
}

/* Fix для Safari mobile */
@supports (-webkit-touch-callout: none) {
    .mobile-view .hero {
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }
}

/* ===========================================
   МЕДИА-ЗАПРОСЫ - ПРОПОРЦИОНАЛЬНАЯ АДАПТИВНОСТЬ
   =========================================== */

/* Большие экраны (1400px+): стандартная высота */
@media (min-width: 1401px) {
    .hero {
        height: 85vh;
    }
    .spline-background {
        height: 100vh;
    }
}

/* Средне-большие экраны (1200-1400px): небольшое увеличение высоты */
@media (max-width: 1400px) and (min-width: 1201px) {
    .hero {
        height: calc(75vh + 5vw);
        min-height: 85vh;
        max-height: 110vh;
    }
    .spline-background {
        height: calc(100vh + 5vw);
        min-height: 100vh;
        max-height: 110vh;
    }
}

/* Десктоп средний (1000-1200px): пропорциональное увеличение */
@media (max-width: 1200px) and (min-width: 1001px) {
    .hero {
        height: calc(70vh + 8vw);
        max-height: 115vh;
    }
    .spline-background {
        height: calc(100vh + 8vw);
        min-height: 105vh;
        max-height: 115vh;
    }
    
    .hero__content {
        padding: 30px;
        padding-top: 160px;
        max-width: 900px;
    }

    .text-container {
        gap: 20px;
    }
    
    .text-left {
        padding-left: 0;
    }

    h1 {
        font-size: 64px;
        white-space: nowrap;
    }

    h1 span {
        margin-left: 0;
    }

    .text-right {
        margin-left: 0;
        width: 400px;
    }

    p {
        font-size: 20px;
    }

    .hero .cta-button {
        margin-left: 200px;
    }

    .spline-background spline-viewer {
        width: 120%;
        transform-origin: left center;
    }

    .hero-description {
        margin-left: 200px;
        font-size: 20px;
        max-width: 600px;
    }
}

/* Планшет большой (800-1000px): больше высоты */
@media (max-width: 1000px) and (min-width: 801px) {
    .hero {
        height: calc(60vh + 12vw);
        max-height: 120vh;
    }
    .spline-background {
        height: calc(100vh + 12vw);
        min-height: 110vh;
        max-height: 120vh;
    }
    
    .hero__content {
        padding: 28px;
        padding-top: 140px;
        max-width: 800px;
    }

    .text-container {
        gap: 20px;
    }
    
    .text-left {
        padding-left: 0px;
    }

    h1 {
        font-size: 64px;
    }

    h1 span {
        margin-left: 0;
        font-size: 58px;
        white-space: nowrap;
    }

    .hero-description {
        margin-left: 150px;
        font-size: 19px;
        max-width: 550px;
    }

    .hero .cta-button {
        margin-left: 150px;
    }
}

/* Планшет средний (600-800px): значительное увеличение высоты */
@media (max-width: 800px) and (min-width: 601px) {
    .hero {
        height: calc(100vh + 18vw);
        min-height: 110vh;
        max-height: 130vh;
    }
    .spline-background {
        height: calc(100vh + 18vw);
        min-height: 115vh;
        max-height: 130vh;
    }
    
    .hero__content {
        padding: 26px;
        padding-top: 120px;
        max-width: 700px;
        box-sizing: border-box;
    }
    
    .text-container {
        grid-template-columns: 1fr;
        gap: 40px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .text-left {
        width: 100%;
        padding-left: 0;
    }

    .text-right {
        margin-left: 0 !important;
        width: 100%;
        order: 2;
    }

    h1 {
        font-size: 56px;
        line-height: 1.1;
        margin-bottom: 16px;
    }

    h1 span {
        margin-left: 0;
    }

    .hero-description {
        margin-left: 0;
        font-size: 18px;
        max-width: 100%;
        margin-top: 16px;
        padding-right: 20px;
    }

    .hero .cta-button {
        margin-left: 0;
        margin-top: 20px;
    }
}

/* Общее правило для скрытия 3D анимации на экранах 600px и меньше */
/* ВАЖНО: размещаем ДО специфичных медиа-запросов */
@media (max-width: 600px) {
    .spline-background,
    .spline-background spline-viewer,
    spline-viewer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Устанавливаем белый фон для hero блока без 3D анимации */
    .hero {
        background-color: #ffffff !important;
        background-image: none !important;
    }
}

/* Мобильный большой (480-600px): максимальная адаптация */
@media (max-width: 600px) and (min-width: 481px) {
    .hero {
        min-height: 90vh;
        max-height: 140vh;
    }
    .spline-background {
        height: calc(100vh + 25vw);
        min-height: 120vh;
        max-height: 140vh;
        opacity: 0.8;
        display: none; /* Скрываем 3D анимацию */
    }

    .spline-background spline-viewer {
        width: 150%;
        height: 110%;
        transform-origin: center center;
        transform: scale(1.1);
        display: none; /* Скрываем 3D анимацию */
    }
    
    .hero__content {
        padding: 24px;
        padding-top: 100px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .text-container {
        grid-template-columns: 1fr;
        gap: 24px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 8px;
    }

    .text-left {
        width: 100%;
        padding-left: 0;
    }

    h1 {
        font-size: 48px;
        line-height: 1.1;
        margin-bottom: 16px;
    }

    h1 span {
        margin-left: 0;
    }

    p {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .hero-description {
        margin-left: 0;
        font-size: 17px;
        max-width: 100%;
        margin-top: 16px;
        padding-right: 8px;
    }

    .hero .cta-button {
        margin-left: 0;
        width: auto;
        min-width: 200px;
        margin-top: 20px;
        padding: 0 24px;
    }
}

/* Мобильный стандартный (360-480px): компактная высота с достаточным местом */
@media (max-width: 480px) and (min-width: 361px) {   
    .hero {
        min-height: 80vh;
        max-height: 145vh;
    }
    .spline-background {
        height: calc(100vh + 30vw);
        min-height: 125vh;
        max-height: 145vh;
        opacity: 0.5;
        display: none; /* Скрываем 3D анимацию */
    }

    .spline-background spline-viewer {
        width: 180%;
        height: 100%;
        transform-origin: left center;
        transform: scale(0.9);
        display: block;
        visibility: visible;
        display: none; /* Скрываем 3D анимацию */
    }

    .hero__content {
        padding: 20px;
        padding-top: 90px;
        width: 100%;
        box-sizing: border-box;
    }

    .text-container {
        gap: 20px;
        padding: 0 8px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        font-size: 40px;
        line-height: 1.1;
        margin-bottom: 16px;
    }

    h1 span {
        margin-left: 0;
    }

    p {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 18px;
    }

    .hero .cta-button {
        width: auto;
        min-width: 180px;
        margin-left: 0;
        padding: 0 20px;
        height: 44px;
        font-size: 14px;
        margin-top: 18px;
    }

    .hero-description {
        font-size: 16px;
        line-height: 1.4;
        margin-top: 12px;
        margin-left: 0;
        max-width: 100%;
        padding-right: 8px;
    }
}

/* Малый мобильный (до 360px): максимальная высота для маленьких экранов */
@media (max-width: 360px) {
    .hero {
        height: calc(100vh + 35vw);
        min-height: 130vh;
        max-height: 150vh;
    }
    .spline-background {
        height: calc(100vh + 35vw);
        min-height: 130vh;
        max-height: 150vh;
        opacity: 0.4;
        display: none; /* Скрываем 3D анимацию */
    }

    .spline-background spline-viewer {
        width: 200%;
        height: 100%;
        transform-origin: left center;
        transform: scale(0.8);
        display: none; /* Скрываем 3D анимацию */
    }
    
    .hero__content {
        padding: 16px;
        padding-top: 80px;
        width: 100%;
        box-sizing: border-box;
    }

    h1 {
        font-size: 32px;
        line-height: 1.1;
    }

    h1 span {
        margin-left: 0;
    }
    
    .hero-description {
        margin-left: 0;
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 12px;
        max-width: 100%;
        padding-right: 4px;
    }

    p {
        font-size: 14px;
        line-height: 1.4;
    }

    .hero .cta-button {
        margin-left: 0;
        min-width: 210px;
        height: 42px;
        font-size: 13px;
        margin-top: 16px;
    }
}

/* Ландшафтная ориентация на низких экранах */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 100vh;
    }

    .spline-background {
        height: 100vh;
    }

    .hero__content {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    h1 {
        font-size: 46px;
    }

    h1 span {
        margin-left: 0;
    }

    .text-container {
        gap: 20px;
    }

    p {
        font-size: 16px;
    }

    .spline-background spline-viewer {
        width: 120%;
        height: 120%;
        transform-origin: left center;
    }
}

/* ===========================================
   АДАПТИВНЫЕ ОТСТУПЫ ДЛЯ CONTENT-WRAPPER
   =========================================== */

/* Планшеты (601-768px): базовый отступ + небольшое увеличение */
@media (max-width: 768px) and (min-width: 601px) {
    .content-wrapper {
        margin-top: calc(10vh + 2vw) !important;
    }
}

/* Мобильные (481-600px): увеличенный отступ */
@media (max-width: 600px) and (min-width: 481px) {
    .content-wrapper {
        margin-top: calc(70vh + 5vw) !important;
    }
}

/* Мобильные (361-480px): средний отступ */
@media (max-width: 480px) and (min-width: 361px) {
    .content-wrapper {
        margin-top: calc(65vh + 3vw) !important;
    }
}

/* Малые мобильные (до 360px): минимальный отступ */
@media (max-width: 360px) {
    .content-wrapper {
        margin-top: calc(130vh + 2vw) !important;
    }
}

/* Общее правило для скрытия 3D анимации на экранах 600px и меньше */
@media (max-width: 600px) {
    .spline-background,
    .spline-background spline-viewer,
    spline-viewer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Устанавливаем белый фон для hero блока без 3D анимации */
    .hero {
        background-color: #ffffff !important;
        background-image: none !important;
    }
} 