html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* SVG tuyệt đối đi theo khoảng cách top - bottom */
#scroll-svg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
    width: 100%;
    max-width: 752px;
    /* Giữ kích thước gốc trên màn hình lớn */
    /* Chiều cao và top sẽ được JS cập nhật tự động */
}

@media (max-width: 1230px) {
    #scroll-svg {
        max-width: 500px;
        /* Thu nhỏ bề ngang khi màn hình dưới 1230px */
    }
}

@media (max-width: 767px) {
    #scroll-svg {
        display: none !important;
        /* Ẩn SVG trên mobile */
    }
}

.process-section {
    overflow-x: hidden;
}

.svg-line {
    clip-path: inset(0 0 100% 0);
    will-change: clip-path;
}

.svg-line.active {
    animation: drawVertical 4s linear forwards;
}

.svg-arrow {
    opacity: 0;
}

.svg-arrow.active {
    animation: showArrow 4s linear forwards;
}

@keyframes drawVertical {
    0% {
        clip-path: inset(0 0 100% 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes showArrow {

    0%,
    97% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* animation title */
/* Reveal Heading Letter-by-Letter Animation */
.wt-animate-heading-reveal,
.wt-animate-heading-reveal h1,
.wt-animate-heading-reveal h2,
.wt-animate-heading-reveal h3,
.wt-animate-heading-reveal h4,
.wt-animate-heading-reveal h5,
.wt-animate-heading-reveal h6 {
    overflow: hidden;
}

.wt-animate-heading-reveal .reveal-word {
    display: inline-block;
    white-space: nowrap;
}

.wt-animate-heading-reveal .reveal-char {
    display: inline-block !important;
    transform: translateY(100%);
    opacity: 0;
    margin-right: -0.015em;
    /* Bù trừ khoảng trống nhẹ của inline-block để giữ nguyên độ dài chữ */
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1),
        opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition-delay: calc(var(--char-index) * 0.03s);
}

.wt-animate-heading-reveal.is-in-viewport .reveal-char {
    transform: translateY(0);
    opacity: 1;
}

/* ================================================================
   Image Hover Zoom Animation
   ================================================================ */
.wt-hover-img {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.wt-hover-img .wp-block-uagb-image__figure {
    position: relative;
    overflow: hidden;
    margin: 0;
}

.wt-hover-img .wp-block-uagb-image__figure img {
    display: block;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.wt-hover-img:hover .wp-block-uagb-image__figure img {
    transform: scale(1.05);
}

/* ================================================================
   Why Cavalry List Animation
   ================================================================ */
.why-cavalry-list .why-cavalry-card {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity .8s ease, transform .8s ease;
}

.why-cavalry-list .why-cavalry-card.is-inview {
    opacity: 1;
    transform: translateX(0);
}

/* animation zoom and box-shadow */
.wt-hover-boxshadown {
    overflow: hidden !important;
    transition: box-shadow .35s ease, transform .35s cubic-bezier(0.17, 0.84, 0.44, 1) !important;
}

.wt-hover-boxshadown:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(92, 64, 51, 0.25) !important;
}