/* ==========================================================================
   DECOFI HERO SLIDER (global.bxslider)
   Concept: Architectural Editorial Chamfer + YouTube Video Stage + HUD Controls
   ========================================================================== */

/* 1. Khung bao ngoài & Chiều cao giảm 20% so với bản cũ (780px -> 624px Desktop, 580px -> 464px Mobile) */
.slides_inhome.hero-bxslider-block {
    position: relative;
    width: 100%;
    background-color: #0b1320;
    overflow: hidden;
    user-select: none;
}

.slides_inhome .bx-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    max-width: 100% !important;
}

.slides_inhome .bx-wrapper .bx-viewport {
    border: 0 !important;
    box-shadow: none !important;
    background: #0b1320 !important;
    left: 0 !important;
    transform: translateZ(0);
}

.slides_inhome .bx-wrapper .bx-loading,
.slides_inhome .bx-wrapper .bx-controls-direction {
    display: none !important;
}

.slides_inhome .hero-slide-item {
    position: relative;
    width: 100%;
    height: 730px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

@media (max-width: 991px) {
    .slides_inhome .hero-slide-item {
        height: 500px !important;
    }
}

@media (max-width: 767px) {
    .slides_inhome .hero-slide-item {
        height: 416px !important;
    }
}

/* Lớp phủ đen đã được gỡ bỏ để hình ảnh/video sáng rõ 100% */
.slides_inhome .hero-slide-backdrop {
    display: none !important;
}

/* 2. Sân khấu Video YouTube tràn viền (Object-Fit Cover cho Iframe 16:9) */
.slides_inhome .hero-video-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    background-color: transparent;
    opacity: 0;
    transition: opacity 0.65s ease;
}

.slides_inhome .hero-slide-item.is-video-playing .hero-video-stage {
    opacity: 1;
}

.slides_inhome .hero-video-scale-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 ratio */
    min-height: 100%;
    min-width: 177.78vh; /* 16:9 ratio */
    transform: translate(-50%, -50%) scale(1.04);
    pointer-events: none;
}

.slides_inhome .hero-video-scale-wrap iframe,
.slides_inhome .hero-yt-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    pointer-events: none;
}

/* 3. Khối Text Kiến Trúc (Đồng bộ concept Vát Góc Chamfer của trang Dự án & Lĩnh vực hoạt động) */
.slides_inhome .hero-caption-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 68px;
    z-index: 12;
    pointer-events: none;
}

@media (max-width: 767px) {
    .slides_inhome .hero-caption-layer {
        bottom: 62px;
    }
}

.slides_inhome .hero-caption-card {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    max-width: 660px;
    padding: 22px 30px 22px 26px;
    background-color: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-left: 4px solid var(--c-primary, #ce2027);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    box-shadow: 0 20px 44px rgba(11, 19, 32, 0.26);
    color: #ffffff;
    transform: translateY(0);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease;
}

/* Đường viền góc vát chéo ở góc trên bên phải */
.slides_inhome .hero-caption-card::after {
    content: "";
    position: absolute;
    top: -2px;
    right: 19px;
    width: 30px;
    height: 1.5px;
    background-color: rgba(255, 255, 255, 0.32);
    transform-origin: 0 0;
    transform: rotate(45deg);
    pointer-events: none;
}

@media (max-width: 767px) {
    .slides_inhome .hero-caption-layer {
        bottom: 60px;
    }

    .slides_inhome .hero-caption-card {
        max-width: calc(100% - 4px);
        padding: 14px 16px 14px 14px;
        gap: 6px;
        background-color: rgba(15, 23, 42, 0.56);
        clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    }

    .slides_inhome .hero-caption-meta {
        padding-bottom: 6px;
    }

    .slides_inhome .hero-caption-badge {
        padding: 3px 9px;
        font-size: 10px;
        letter-spacing: 1.1px;
    }
}

.slides_inhome .hero-caption-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.22);
}

.slides_inhome .hero-caption-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: var(--c-secondary, #14539a);
    border-left: 0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.25;
}

.slides_inhome .hero-caption-index {
    font-family: var(--font-main, 'Fahkwang', sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.slides_inhome .hero-caption-index small {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
}

.slides_inhome .hero-caption-slogan {
    margin: 0;
    font-family: var(--font-main, 'Fahkwang', sans-serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.38;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.slides_inhome .hero-caption-slogan span {
    color: #ff4d54;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

@media (min-width: 1200px) {
    .slides_inhome .hero-caption-slogan {
        font-size: 27px;
    }
}

@media (max-width: 767px) {
    .slides_inhome .hero-caption-slogan {
        font-size: 17px;
        line-height: 1.4;
    }
}

.slides_inhome .hero-caption-actions {
    padding-top: 4px;
}

.slides_inhome .hero-caption-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px 8px 16px;
    background-color: rgba(20, 83, 154, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    color: #ffffff !important;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.slides_inhome .hero-caption-cta i {
    color: #ff4d54;
    transition: transform 0.3s ease;
}

.slides_inhome .hero-caption-cta:hover {
    background-color: var(--c-primary, #ce2027);
    border-color: var(--c-primary, #ce2027);
}

.slides_inhome .hero-caption-cta:hover i {
    color: #ffffff;
    transform: translateX(4px);
}

/* 4. Nút Điều Hướng Trái / Phải (< >) Hiện Đại, Chuyên Nghiệp (Chamfer Glassmorphism) */
.slides_inhome .hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(11, 19, 32, 0.22);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.slides_inhome .hero-nav-btn::before {
    content: "";
    position: absolute;
    top: 9px;
    left: -2px;
    width: 16px;
    height: 1.5px;
    background-color: rgba(255, 255, 255, 0.35);
    transform-origin: 0 0;
    transform: rotate(-45deg);
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.slides_inhome .hero-nav-prev {
    left: 28px;
}

.slides_inhome .hero-nav-next {
    right: 28px;
}

.slides_inhome .hero-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    transition: transform 0.3s ease;
}

.slides_inhome .hero-nav-btn:hover {
    background-color: var(--c-secondary, #14539a);
    border-color: #ffffff;
    box-shadow: 0 10px 28px rgba(20, 83, 154, 0.45);
}

.slides_inhome .hero-nav-btn:hover::before {
    background-color: #ffffff;
}

.slides_inhome .hero-nav-prev:hover svg {
    transform: translateX(-2px);
}

.slides_inhome .hero-nav-next:hover svg {
    transform: translateX(2px);
}

@media (max-width: 767px) {
    .slides_inhome .hero-nav-btn {
        width: 34px;
        height: 34px;
        top: 38%;
    }
    .slides_inhome .hero-nav-btn svg {
        width: 18px;
        height: 18px;
    }
    .slides_inhome .hero-nav-prev {
        left: 10px;
    }
    .slides_inhome .hero-nav-next {
        right: 10px;
    }
    .slides_inhome .hero-bottom-hud {
        bottom: 12px;
    }
    .slides_inhome .hero-hud-pager-wrap {
        padding: 6px 12px;
        gap: 10px;
    }
    .slides_inhome .hero-custom-pager .bx-pager-link {
        width: 14px !important;
    }
    .slides_inhome .hero-custom-pager .bx-pager-link.active {
        width: 26px !important;
    }
    .slides_inhome .hero-sound-btn {
        height: 34px;
        padding: 0 10px;
    }
}

/* 5. Thanh HUD Đáy: Bộ đếm + Pager (...) dạng Pill Thanh Ngang Hiện Đại + Nút Âm Thanh ở góc */
.slides_inhome .hero-bottom-hud {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 25;
    pointer-events: none;
}

.slides_inhome .hero-hud-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.slides_inhome .hero-hud-pager-wrap {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 7px 16px;
    background-color: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    box-shadow: 0 8px 24px rgba(11, 19, 32, 0.22);
}

.slides_inhome .hero-live-counter {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-main, 'Fahkwang', sans-serif);
    line-height: 1;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.slides_inhome .hero-counter-current {
    font-size: 15px;
    font-weight: 700;
    color: #ff4d54;
}

.slides_inhome .hero-counter-sep,
.slides_inhome .hero-counter-total {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.slides_inhome .hero-custom-pager,
.slides_inhome .hero-custom-pager .bx-pager {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
}

.slides_inhome .hero-custom-pager .bx-pager-item {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.slides_inhome .hero-custom-pager .bx-pager-link {
    display: block !important;
    width: 18px !important;
    height: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background-color: rgba(255, 255, 255, 0.35) !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    border: 0 !important;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.slides_inhome .hero-custom-pager .bx-pager-link:hover {
    background-color: rgba(255, 255, 255, 0.75) !important;
    width: 24px !important;
}

.slides_inhome .hero-custom-pager .bx-pager-link.active {
    width: 36px !important;
    height: 4px !important;
    background-color: var(--c-primary, #ce2027) !important;
    box-shadow: 0 0 10px rgba(206, 32, 39, 0.7) !important;
}

/* 6. Nút Bật / Tắt Âm Thanh Video ở góc phải bên dưới */
.slides_inhome .hero-sound-btn {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    background-color: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(11, 19, 32, 0.22);
    transition: all 0.3s ease;
}

.slides_inhome .hero-sound-btn.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
}

.slides_inhome .hero-sound-btn:hover {
    background-color: var(--c-secondary, #14539a);
    border-color: #ffffff;
}

.slides_inhome .hero-sound-btn.is-unmuted {
    background-color: rgba(20, 83, 154, 0.88);
    border-color: #ffffff;
}

.slides_inhome .hero-sound-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.slides_inhome .hero-sound-btn .hero-sound-icon-unmuted {
    display: none;
}

.slides_inhome .hero-sound-btn.is-unmuted .hero-sound-icon-muted {
    display: none;
}

.slides_inhome .hero-sound-btn.is-unmuted .hero-sound-icon-unmuted {
    display: inline-flex;
}

/* Sóng nhạc equalizer nhỏ bên cạnh icon loa khi bật tiếng */
.slides_inhome .hero-sound-waves {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 13px;
}

.slides_inhome .hero-sound-waves i {
    display: block;
    width: 2.5px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.45);
    transition: height 0.25s ease, background-color 0.25s ease;
}

.slides_inhome .hero-sound-btn.is-unmuted .hero-sound-waves i {
    background-color: #ff4d54;
    animation: heroSoundWave 0.85s ease-in-out infinite alternate;
}

.slides_inhome .hero-sound-btn.is-unmuted .hero-sound-waves i:nth-child(2) {
    animation-delay: 0.2s;
}

.slides_inhome .hero-sound-btn.is-unmuted .hero-sound-waves i:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes heroSoundWave {
    0% {
        height: 4px;
    }
    100% {
        height: 13px;
    }
}
