/**
 * Hero Block Styles
 * Стилі для героїчного блоку (як на Тільді)
 * 
 * @package MyFood
 * @since 1.0
 */

/* ============================================
   HERO БЛОК - ОСНОВНІ СТИЛІ
   ============================================ */

.block-hero {
    position: relative;
    width: 100%;
    min-height: 715px;
    overflow-x: clip;
    overflow-y: visible;
    display: flex;
    align-items: center;
    padding: 60px 0 0 0;
    margin-bottom: 0;
}

/* Фоновий контейнер з декоративними елементами */
.block-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
}

/* Фонове зображення (як на Тільді) */
.block-hero__background-image {
    position: absolute;
    top: 0;
    left: calc(50% - 600px + -462px);
    right: 0;
    bottom: 0;
    height: auto;
    z-index: 1;
    display: block;
    pointer-events: none;
}

@media screen and (min-width: 2100px) {
    .block-hero__background-image {
        left: 0;
    }
}

.block-hero__background-image img {
    width: 100%;
    object-fit: fill;
    height: 100%;
    display: block;
}

/* Основний контейнер */
.block-hero__container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 135px;
    padding: 0 20px;
}

/* ============================================
   ЛІВА ЧАСТИНА - КОНТЕНТ
   ============================================ */

.block-hero__content {
    position: relative;
    color: #ffffff;
    margin-top: 113px;
    max-width: 1000px;
    z-index: 3;
}

/* Інформація про роботу та доставку */
.block-hero__info {
    max-width: 560px;
    color: #ffffff;
    font-size: 16px;
    line-height: 2;
    font-family: 'Gilroy', Arial, sans-serif;
    font-weight: 400;
    margin-bottom: 40px;
}

.block-hero__info strong {
    font-weight: 600;
}

/* Заголовок H1 */
.block-hero__h1 {
    font-size: 37px;
    font-weight: 400;
    line-height: 2;
    margin: 0 0 20px 0;
    color: #ffffff;
    font-family: 'Gilroy', Arial, sans-serif;
}

/* Підзаголовок H2 */
.block-hero__h2 {
    font-size: 45px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 40px 0;
    color: #ffffff;
    font-family: 'Gilroy', Arial, sans-serif;
}

/* Кнопка */
.block-hero__button-wrap {
    margin-top: 50px;
}

.block-hero__button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 1px;
    color: #ffffff;
    background: #e03a61;
    border: 1px solid transparent;
    border-radius: 45px;
    text-decoration: none;
    font-family: 'Gilroy', Arial, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0px 10px 15px 0px rgba(224, 58, 97, 0.4);
}

.block-hero__button:hover {
    background: #c02f52;
    transform: translateY(-2px);
    box-shadow: 0px 15px 25px 0px rgba(224, 58, 97, 0.5);
}

.block-hero__button-icon {
    font-size: 24px;
    line-height: 1;
}

/* ============================================
   ПРАВА ЧАСТИНА - ЗОБРАЖЕННЯ
   ============================================ */

.block-hero__images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Основна піца */
.block-hero__pizza {
    position: absolute;
    top: 0px;
    left: calc(50% - 600px + 830px);
    width: 731px;
    z-index: 3;
    pointer-events: auto;
}

.block-hero__pizza img {
    width: 100%;
    height: auto;
    display: block;
}

/* Parallax елементи */
.parallax-element {
    position: absolute;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    z-index: 4;
    pointer-events: auto;
}

/* Ніж для піци - позиціонований відносно піци */
.block-hero__knife {
    position: absolute;
    top: 15%;
    right: 8%;
    width: 25%; /* 25% від ширини піци */
    z-index: 10;
}

.block-hero__knife img {
    width: 100%;
    height: auto;
    display: block;
    transform-origin: center center; /* Для паралакс ефекту */
}

/* Помідор */
.block-hero__tomato {
    top: 88px;
    left: -310px;
    width: 156px;
}

.block-hero__tomato img {
    width: 100%;
    height: auto;
    display: block;
}

/* Зелений листок - позиціонований відносно секції, на краю екрану */
.block-hero__leaf {
    position: absolute;
    bottom: -225px;
    left: -30px;
    width: 123px;
    z-index: 2;
}

.block-hero__leaf img {
    width: 100%;
    height: auto;
    display: block;
    transform-origin: center center; /* Для паралакс ефекту */
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet - 960px */
@media screen and (max-width: 1199px) {
    .block-hero {
        min-height: 550px;
    }
    
    /* Приховуємо листок на планшетах і мобільних */
    .block-hero__leaf {
        display: none;
    }

    .block-hero__background-image img {
        object-fit: cover;
    }
    
    .block-hero__container {
        max-width: 960px;
    }
    
    .block-hero__background-image {
        top: -20px;
        left: calc(50% - 480px + -240px);
    }
    
    .block-hero__h1 {
        font-size: 30px;
    }
    
    .block-hero__h2 {
        font-size: 35px;
    }
    
    .block-hero__info {
        max-width: 450px;
    }
    
    
    .block-hero__pizza {
        top: -80px;
        left: calc(50% - 480px + 630px);
        width: 658px;
    }
    
    .block-hero__tomato {
        left: -140px;
    }
}

/* Tablet Small - 959px */
@media screen and (max-width: 959px) {
    .block-hero {
        min-height: 700px;
    }
    
    .block-hero__content {
        text-align: center;
        max-width: 410px;
        margin: 90px auto 0;
    }
    
    .block-hero__pizza {
        top: -25px;
        left: calc(50% - 320px + 673px);
        width: 768px;
    }
    
    .block-hero__h1 {
        font-size: 28px;
    }
    
    .block-hero__h2 {
        font-size: 30px;
    }
    
    .block-hero__button-wrap {
        margin-top: 30px;
    }
    
    .block-hero__background-image {
        top: -10px;
        left: calc(50% - 320px + -230px);
    }
    
    .block-hero__h1 {
        text-align: center;
    }
    
    .block-hero__h2 {
        font-size: 35px;
        text-align: center;
    }
    
    .block-hero__info {
        max-width: 100%;
        text-align: center;
    }
}

/* Mobile - 639px */
@media screen and (max-width: 639px) {
    .block-hero {
        min-height: 600px;
        padding: 40px 0 0 0;
    }
    
    .block-hero__h1 {
        font-size: 28px;
    }
    
    .block-hero__h2 {
        font-size: 36px;
    }
    
    .block-hero__content {
        max-width: 350px;
    }
    
    .block-hero__info {
        font-size: 13px;
        line-height: 1.65;
    }
    
    .block-hero__button {
        padding: 14px 32px;
        font-size: 18px;
    }
    
    .block-hero__pizza {
        top: 295px;
        left: calc(50% - 240px + 973px);
        width: 768px;
    }
    
    .block-hero__background-image {
        top: 0px;
        left: calc(50% - 240px + -325px);
        width: 1943px;
    }
    
    .block-hero__knife {
        top: 3%;
        right: 5%;
        width: 22%;
    }
    
    .block-hero__tomato {
        width: 86px;
        top: 225px;
        left: -87px;
    }
    
}

/* Mobile Small - 479px */
@media screen and (max-width: 479px) {
    .block-hero {
        min-height: 450px;
    }
    
    .block-hero__h1 {
        font-size: 18px;
        line-height: 1.65;
        margin-bottom: 15px;
    }
    
    .block-hero__h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .block-hero__content {
        max-width: 320px;
    }
    
    .block-hero__info {
        font-size: 12px;
        line-height: 1.65;
    }
    
    .block-hero__button {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .block-hero__pizza {
        top: 260px;
        left: calc(50% - 160px + 720px);
        width: 768px;
    }
    
    .block-hero__background-image {
        top: 0px;
        left: calc(50% - 160px + -543px);
        width: 1978px;
    }
    
    .block-hero__knife {
        top: 2%;
        right: 3%;
        width: 20%;
    }
    
    .block-hero__tomato {
        width: 56px;
        left: -60px;
    }
    
}

/* ============================================
   АНІМАЦІЇ
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    .block-hero__content {
        animation: fadeInLeft 0.8s ease-out;
    }
    
    .block-hero__images {
        animation: fadeInRight 0.8s ease-out;
    }
    
    @keyframes fadeInLeft {
        from {
            opacity: 0;
            transform: translateX(-30px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    @keyframes fadeInRight {
        from {
            opacity: 0;
            transform: translateX(30px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

