html {
    scroll-behavior: smooth;
}

.hero-gradient {
    background: #fef9f7 !important;
    background-image: none !important;
}

.hero-gradient::before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background-image: none !important;
    background: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

body .hero-gradient::before {
    display: none !important;
    background-image: none !important;
    content: none !important;
}

/* Hero блок на мобильных устройствах */
@media (max-width: 1023px) {
    .hero-gradient {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .hero-gradient::before {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        background-image: none !important;
        background: none !important;
        content: '' !important;
        width: 0 !important;
        height: 0 !important;
        position: absolute !important;
        z-index: -1 !important;
    }
}

/* Десктоп стили */
@media (min-width: 1024px) {
    .hero-gradient {
        position: relative;
        height: 100vh;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
        background-image: none !important;
    }
    
    .hero-gradient > div {
        align-items: center !important;
    }
    
    
    .hero-gradient::before {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        background-image: none !important;
        background: none !important;
        content: none !important;
        width: 0 !important;
        height: 0 !important;
        position: absolute !important;
        z-index: -1 !important;
        pointer-events: none !important;
    }
    
    body .hero-gradient::before {
        display: none !important;
        background-image: none !important;
        content: none !important;
        background: none !important;
    }
}

/* Плавность переключения фото */
.story-img {
    transition: opacity 0.6s ease-in-out;
    will-change: opacity;
}

.story-img-active {
    opacity: 1;
    z-index: 1;
}

.story-img-next {
    opacity: 0;
    z-index: 2;
}

/* Затемнения внутри контейнера сторис */
.story-overlay-top {
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
}

/* Светлое засветление снизу */
.story-overlay-bottom {
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
}

/* Прогресс бар */
.progress-bar-fill {
    transition: width 0.1s linear; 
}

/* Кнопки навигации */
.nav-btn {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent !important;
    padding: 0.5rem;
}
.story-container:hover .nav-btn {
    opacity: 1;
}

/* Затемнение по бокам при hover */
.story-side-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 30;
}
.story-side-overlay-left {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, transparent 100%);
}
.story-side-overlay-right {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.4) 0%, transparent 100%);
}
.story-container:hover .story-side-overlay {
    opacity: 1;
}

/* Адаптивность контейнера stories */
.story-figure {
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
}

.story-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.story-container > div {
    aspect-ratio: 9/16;
    width: 100%;
}

/* Мобильные устройства (до 640px) */
@media (max-width: 639px) {
    .story-figure {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .story-container {
        width: 100%;
        max-width: 100%;
    }
    
    .story-container > div {
        max-width: 100%;
        max-height: 80vh;
    }
    
    /* Исправление обрезания круглого элемента на мобильных */
    .w-full.lg\\:w-1\\/2:has(.story-figure) {
        overflow: visible !important;
        padding-bottom: 5rem !important;
    }
}

/* Убеждаемся, что родительский контейнер не обрезает нижнюю иконку на всех устройствах */
.w-full.lg\\:w-1\\/2 {
    overflow: visible !important;
}

/* Планшеты (640px - 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
    .story-figure {
        max-width: 380px;
        width: 100%;
        margin: 0 auto;
    }
    
    .story-container {
        max-width: 100%;
        width: 100%;
    }
    
    .story-container > div {
        max-width: 100%;
        max-height: 85vh;
    }
}

/* Десктоп (1024px и выше) */
@media (min-width: 1024px) {
    .story-figure {
        max-width: 360px;
        width: 360px;
        margin: 0 auto;
        flex-shrink: 0;
        padding-bottom: 4rem;
        overflow: visible !important;
    }
    
    .story-container {
        max-width: 360px;
        width: 360px;
    }
    
    .story-container > div {
        max-width: 100%;
        width: 100%;
        max-height: 75vh;
    }
    
    .w-full.lg\\:w-1\\/2:has(.story-figure) {
        overflow: visible !important;
        padding-bottom: 4rem !important;
    }
}

/* Большие экраны (1280px и выше) */
@media (min-width: 1280px) {
    .story-figure {
        max-width: 400px;
        width: 400px;
        padding-bottom: 4rem;
    }
    
    .story-container {
        max-width: 400px;
        width: 400px;
    }
    
    .story-container > div {
        max-height: 80vh;
    }
}

/* Анимации для блока результатов */
.fade-in-text {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    filter: blur(10px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, filter 1s ease-out;
}
.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    filter: blur(10px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, filter 1s ease-out;
}
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

/* Скрываем скроллбар, но оставляем функционал */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* FAQ аккордеон */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding-top: 0;
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 1rem;
}
.faq-icon {
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
.faq-item.active .faq-icon i {
    display: block;
}