/* ========================================================================
   1. HERO CAROUSEL CONTROLS
   ======================================================================== */
.carousel-control-prev,
.carousel-control-next {
    opacity: 0; 
    transition: opacity 0.3s ease; 
    width: 10%; 
}

#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
    opacity: 1; 
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: transparent; 
    border: 2px solid #fff; 
    width: 60px;  
    height: 60px; 
    background-size: 30%; 
    border-radius: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e") !important;
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e") !important;
}

.carousel-control-prev { left: 30px; }
.carousel-control-next { right: 30px; }

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.2); 
}

/* ========================================================================
   RESPONSIVE MOBILE FIX (PT. IBS CUSTOM)
   ======================================================================== */
@media (max-width: 768px) {
    #heroCarousel .carousel-item img {
        width: 55vh !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center;
    }

    /* 2. Mengecilkan Tombol Navigasi Carousel di HP */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 35px !important;  /* Lebih kecil agar tidak menutupi gambar */
        height: 35px !important;
        background-size: 40% !important;
    }
    
    .carousel-control-prev { left: 10px !important; } /* Geser lebih rapat ke pinggir */
    .carousel-control-next { right: 10px !important; }

    .carousel-caption {
        display: block !important; /* Paksa muncul di HP */
        bottom: 20% !important; /* Naikkan tulisan agak ke tengah biar tidak tertutup indikator */
        background: rgba(0, 0, 0, 0.3); /* Tambahkan bayangan halus agar teks terbaca */
        padding: 10px;
        border-radius: 8px;
    }
    .carousel-caption h1 {
        font-size: 1.1rem !important;
        margin-bottom: 5px;
    }

    .carousel-caption h3 {
        font-size: 0.8rem !important;
        display: block !important; /* Paksa sub-judul muncul juga */
    }

    /* 4. Perbaikan Gallery agar tetap rapi */
    .gallery-carousel .carousel-inner,
    .gallery-carousel .carousel-item img {
        height: 200px !important;
    }
    
    .gallery-thumbnails {
        gap: 4px;
    }
    
    .gallery-thumb-item {
        height: 45px;
    }

    /* 5. Kecepatan Marquee di HP dipercepat sedikit agar tidak lambat */
    .scroll-left, .scroll-right {
        animation-duration: 25s !important;
    }
}

/* ========================================================================
   2. SCOPE OF SERVICES CARDS (MAKARA STYLE)
   ======================================================================== */
.service-card-makara { 
    transition: all 0.3s ease; 
}
.service-card-makara:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important; 
}
.btn-view-more:hover { 
    background-color: #007bff; 
    color: white !important; 
}

/* ========================================================================
   3. PROFESSIONAL PORTFOLIO GALLERY 
   ======================================================================== */
.gallery-carousel .carousel-inner {
    height: 250px !important; 
}

.gallery-carousel .carousel-item img {
    width: 100% !important;
    height: 250px !important; 
    object-fit: cover !important; 
    border-radius: 4px;
    opacity: 1 !important;
    filter: brightness(1) !important;
}

/* Mematikan lapisan hitam khusus untuk gallery agar tidak merusak Hero */
.gallery-carousel .carousel-item::after, 
.gallery-carousel .carousel-item::before {
    display: none !important;
}

.gallery-carousel {
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

.gallery-thumbnails {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    gap: 6px;
}

.gallery-thumb-item {
    width: 24%;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4; 
    transition: all 0.4s ease; 
    border: 3px solid transparent; 
    border-radius: 4px;
}

.gallery-thumb-item.active {
    opacity: 1 !important;
    border-color: #007bff !important; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 6px rgba(0,123,255,0.2);
}

.gallery-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a237e;
    margin-top: 15px;
    text-transform: uppercase;
}

.btn-fullscreen {
    position: absolute;
    top: 10px; right: 10px; z-index: 10;
    background: rgba(0, 0, 0, 0.6); color: white;
    border: none; border-radius: 4px; padding: 6px 12px;
    cursor: pointer;
}

.gallery-carousel:fullscreen {
    background-color: #000 !important; /* Latar belakang jadi hitam pekat */
    display: flex;
    align-items: center;
}

/* Memaksa inner dan gambar menjadi seukuran layar monitor (100vh) */
.gallery-carousel:fullscreen .carousel-inner {
    height: 100vh !important;
}

.gallery-carousel:fullscreen .carousel-item img {
    height: 100vh !important;
    object-fit: contain !important; /* Gambar tidak dipotong, tapi dipaskan ke layar */
    border-radius: 0 !important;
}

/* ------------------------------------------------------------------------
   Dukungan Khusus untuk Safari / Chrome versi lama (-webkit-)
   ------------------------------------------------------------------------ */
.gallery-carousel:-webkit-full-screen {
    background-color: #000 !important;
    display: flex;
    align-items: center;
}

.gallery-carousel:-webkit-full-screen .carousel-inner {
    height: 100vh !important;
}

.gallery-carousel:-webkit-full-screen .carousel-item img {
    height: 100vh !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

/* ========================================================================
   4. CLIENTS MARQUEE (COMPANY WORK EXPERIENCE)
   ======================================================================== */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 30px 0; 
    background: transparent;
}

.marquee-track {
    width: 100%;
    overflow: hidden;
    display: flex;
}

.marquee-content {
    display: flex;
    width: max-content;
    align-items: center;
}

.scroll-left { animation: scroll-left-anim 50s linear infinite; }
.scroll-right { animation: scroll-right-anim 50s linear infinite; }

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    width: 250px; 
    flex-shrink: 0;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.marquee-item img {
    max-width: 100%;
    max-height: 110px; 
    object-fit: contain;
    filter: none; 
    opacity: 1;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.marquee-item:hover img {
    transform: scale(1.15); 
}

@keyframes scroll-left-anim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

@keyframes scroll-right-anim {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}