/* Custom styles and animations */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar - Soft & Auto-hide */
html {
    overflow-y: overlay; /* WebKit: Thanh cuộn nằm đè lên nội dung, không chiếm diện tích */
    scrollbar-width: thin; /* Firefox: Thanh cuộn mỏng */
    scrollbar-color: transparent transparent; /* Firefox: Ẩn thanh cuộn mặc định */
}

/* Firefox: Hiện khi cuộn */
html.is-scrolling {
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: transparent; /* Ẩn nền track */
}

::-webkit-scrollbar-track {
    background-color: transparent; /* Ẩn track */
}

::-webkit-scrollbar-thumb {
    background-color: transparent; /* Ẩn thumb mặc định */
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.3s ease-in-out;
}

/* Hiện thanh cuộn khi có class is-scrolling (được thêm bởi JS) hoặc khi hover vào thanh cuộn */
html.is-scrolling ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    html.is-scrolling ::-webkit-scrollbar-thumb,
    ::-webkit-scrollbar-thumb:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    html.is-scrolling {
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
}

/* Animation for the hero visual */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Gradient text utility if needed */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Logo Slider Animation */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.slider-wrapper {
    display: flex;
    width: fit-content;
    animation: scroll 30s linear infinite;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
