﻿/* ---------- HERO CONTAINER ---------- */
.herodm-section-img,
.hero-section-img {
    position: relative;
    height: 100vh;
    min-height: 520px;
    overflow: hidden;
}

/* ---------- BACKGROUND IMAGES (crossfade + zoom) ---------- */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Mượt */
}

/* Overlay content hiệu ứng */
.overlayimg .title,
.overlayimg .desc,
.overlayimg .btnslide-img {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.overlayimg.show .title,
.overlayimg.show .desc,
.overlayimg.show .btnslide-img {
    opacity: 1;
    transform: translateX(0);
}

    .bg-image.active-img {
        opacity: 1;
        animation: zoomSlide 6s ease-in-out forwards;
    }

@keyframes zoomSlide {
    from {
        transform: scale(1) translate(0, 0);
    }

    to {
        transform: scale(1.1) translate(0, -2%);
    }
}

/* ---------- OVERLAY CONTENT ---------- */
.overlayimg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    opacity: 0;
    transition: opacity .6s ease, transform .6s ease;
}

    .overlayimg.show {
        opacity: 1;
        transform: translateY(-50%);
    }

    /* --- Title H2 --- */
    .overlayimg .title {
        margin: 0 0 14px;
        font-size: 56px;
        font-weight: 600;
        letter-spacing: .5px;
        opacity: 0;
        transform: translateX(-60px) scale(.95);
        transition: all .9s cubic-bezier(.22,.9,.1,1);
    }

    .overlayimg.show .title {
        opacity: 1;
        transform: translateX(0) scale(1.02);
    }

    /* --- Description --- */
    .overlayimg .desc {
        margin: 0 0 22px;
        font-size: 18px;
        color: rgba(255,255,255,0.9);
        opacity: 0;
        transform: translateY(10px);
        transition: all .55s .15s ease;
    }

    .overlayimg.show .desc {
        opacity: 1;
        transform: translateY(0);
    }

/* --- Button --- */
.btnslide-img {
    display: inline-block;
    padding: 12px 36px;
    border-radius: 40px;
    border: 2px solid rgba(255,255,255,0.85);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    background: transparent;
    transition: all .28s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

    .btnslide-img:hover {
        background: #fff;
        color: #000 !important;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .btnslide-img:active {
        transform: scale(0.95);
    }

/* ---------- SIDE MENU ---------- */
.sidedm-menu-img {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 240px;
}

    .sidedm-menu-img ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .sidedm-menu-img li {
        display: block;
        padding: 12px 18px;
        margin-bottom: 12px;
        font-size: 16px;
        color: rgba(255,255,255,0.9);
        background: rgba(0,0,0,0.25);
        border-radius: 10px;
        cursor: pointer;
        transition: transform .22s ease, background .22s ease, color .18s ease;
        box-shadow: inset 0 -1px 0 rgba(255,255,255,0.02);
        position: relative;
    }

        .sidedm-menu-img li::before {
            content: "";
            position: absolute;
            left: -10px;
            top: 50%;
            transform: translateY(-50%);
            height: 60%;
            width: 6px;
            border-radius: 4px;
            background: transparent;
            transition: background .25s ease;
        }

        .sidedm-menu-img li:hover {
            transform: translateX(6px);
            background: rgba(255,255,255,0.06);
            color: #fff;
        }

        .sidedm-menu-img li.active {
            background: rgba(255,255,255,0.09);
            color: #fff;
        }

            .sidedm-menu-img li.active::before {
                background: #ffffffcc;
            }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .overlayimg .title {
        font-size: 34px;
    }

    .overlayimg .desc {
        font-size: 15px;
    }

    .sidedm-menu-img {
        left: 14px;
        width: 200px;
    }
}

@media (max-width: 600px) {
    .sidedm-menu-img {
        left: 0;
        right: 0;
        top: 70%;
        transform: none;
        width: auto;
        display: flex;
        justify-content: center;
    }

        .sidedm-menu-img ul {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            width: 100%;
        }

        .sidedm-menu-img li {
            width: 50%;
            max-width: 90%;
            text-align: center;
            margin-bottom: 5px;
            padding: 5px 10px;
            border-radius: 28px;
            font-size: 15px;
            background: rgba(46,47,50,0.89);
            border: 2px solid #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

            .sidedm-menu-img li.active {
                background: rgba(169,165,157,0.59);
            }

            .sidedm-menu-img li::before {
                display: none;
            }
}
