/* =============================================
   GUIDE SECTION - THEO WEBMUINTROL
   ============================================= */

.guide-section {
    padding: 80px 0;
    background-image: url('../images/backgruond.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.guide-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.guide-section .section-title {
    color: #fff;
    text-align: center;
    margin-bottom: 60px;
    font-size: 36px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Guide Container */
.guide-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.guide-item {
    display: none;
}

.guide-item.active {
    display: block;
    position: relative;
    width: 100%;
    height: 600px;
}

/* Video Positioning - Giống WebMuIntrol */
.guide-main-video,
.guide-side-video {
    position: absolute;
    border-radius: 10px;
    overflow: hidden;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Slide animations */
.guide-main-video.slide-left {
    animation: slideToLeft 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guide-main-video.slide-right {
    animation: slideToRight 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guide-side-video.slide-in-left {
    animation: slideInFromLeft 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.guide-side-video.slide-in-right {
    animation: slideInFromRight 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideToLeft {
    from {
        transform: translate(-55%, -50%) scale(1.25);
        opacity: 1;
    }
    to {
        transform: translate(-55%, -50%) scale(0.9);
        opacity: 0;
    }
}

@keyframes slideToRight {
    from {
        transform: translate(-55%, -50%) scale(1.25);
        opacity: 1;
    }
    to {
        transform: translate(-55%, -50%) scale(0.9);
        opacity: 0;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translate(-30%, -20%) scale(0.85);
        opacity: 0;
    }
    to {
        transform: translate(-30%, -20%) scale(0.98);
        opacity: 0.9;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translate(30%, -20%) scale(0.85);
        opacity: 0;
    }
    to {
        transform: translate(30%, -20%) scale(0.98);
        opacity: 0.9;
    }
}

/* Main Video - Center Top */
.guide-main-video {
    width: 560px;
    height: 340px;
    left: 52%;
    top: 30%;
    transform: translate(-55%, -50%) scale(1.25);
    z-index: 90;
    cursor: pointer;
}

/* Side Videos */
.guide-side-video {
    width: 450px;
    height: 350px;
    cursor: pointer;
    transform: scale(0.98);
    opacity: 0.9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-side-video:hover {
    transform: scale(1.02);
    opacity: 1;
}

.guide-side-video:active {
    transform: scale(0.95);
    transition: all 0.15s ease;
}

.guide-side-video.left {
    left: 15%;
    top: 20%;
    transform: translate(-30%, -20%) scale(0.98);
    z-index: 20;
}

.guide-side-video.right {
    right: 15%;
    top: 20%;
    transform: translate(30%, -20%) scale(0.98);
    z-index: 10;
}

/* Video Container */
.guide-video-full {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-video-full iframe,
.guide-video-full video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: opacity 0.3s ease;
}

/* Smooth animation when swapping videos */
.guide-video-full.swapping iframe,
.guide-video-full.swapping video {
    opacity: 0;
}

/* Video Titles */
.guide-video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #ffd700;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.guide-side-video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #ffd700;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Navigation Buttons */
.guide-nav-btn {
    position: absolute;
    top: 25%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.guide-nav-prev {
    left: -120px;
}

.guide-nav-next {
    right: -120px;
}

.guide-nav-btn img {
    width: 70px;
    height: auto;
    display: block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-nav-btn:hover img {
    transform: scale(1.15);
}

.guide-nav-btn:active img {
    transform: scale(0.9);
    transition: all 0.1s ease;
}

.guide-nav-btn.hover-img .img-hover {
    display: none;
}

.guide-nav-btn.hover-img:hover .img-normal {
    display: none;
}

.guide-nav-btn.hover-img:hover .img-hover {
    display: block;
}

/* Dots Navigation */
.guide-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.guide-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-dot:hover {
    background: rgba(255, 215, 0, 0.6);
    transform: scale(1.2);
}

.guide-dot.active {
    background: #ffd700;
    width: 30px;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 1400px) {
    .guide-nav-prev {
        left: -60px;
    }
    
    .guide-nav-next {
        right: -60px;
    }
    
    .guide-nav-btn img {
        width: 60px;
    }
}

@media (max-width: 1200px) {
    .guide-nav-prev {
        left: 10px;
    }
    
    .guide-nav-next {
        right: 10px;
    }
    
    .guide-nav-btn img {
        width: 50px;
    }
}

@media (max-width: 768px) {
    .guide-section {
        padding: 60px 0;
        min-height: 50vh;
    }
    
    .guide-section .section-title {
        font-size: 2rem;
    }
    
    .guide-item.active {
        height: 400px;
    }
    
    .guide-main-video {
        width: 320px;
        height: 200px;
        left: 50%;
        top: 20%;
    }
    
    .guide-side-video {
        width: 250px;
        height: 180px;
    }
    
    .guide-side-video.left {
        left: 5%;
        top: 10%;
    }
    
    .guide-side-video.right {
        right: 5%;
        top: 10%;
    }
    
    .guide-video-title {
        font-size: 1rem;
        padding: 12px;
    }
    
    .guide-side-video-title {
        font-size: 0.85rem;
        padding: 10px;
    }
    
    .guide-nav-btn img {
        width: 40px;
    }
    
    .guide-dots {
        bottom: 100px;
    }
}
