/* =========================================
   1. VARIABLES & GLOBAL STYLES
   ========================================= */
:root {
    --zigzag-blue: #003366;
    --zigzag-red: #cc0000;
    --zigzag-white: #ffffff;
    --zigzag-gray: #f4f4f4;
    --zigzag-yellow: #ffcc00;
}

body { 
    font-family: 'Source Sans 3', sans-serif; 
    color: #333; 
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--zigzag-white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--zigzag-blue);
}

p { margin-bottom: 1.2rem; }

/* =========================================
   2. NAVBAR & NAVIGATION
   ========================================= */
.navbar { 
    border-bottom: 3px solid var(--zigzag-red); 
    padding: 15px 0;
    position: relative; /* Penting untuk posisi menu mobile */
}

.navbar-brand img {
    height: 55px;
    transition: 0.3s;
}

.nav-link { 
    color: var(--zigzag-blue) !important; 
    font-weight: 600; 
    transition: 0.3s;
    font-size: 1.05rem;
}

.nav-link:hover { 
    color: var(--zigzag-red) !important; 
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Dropdown Desktop (Hover Effect) */
@media (min-width: 992px) {
    .dropdown-menu { 
        display: block; 
        opacity: 0; 
        visibility: hidden; 
        transition: all 0.3s ease; 
        transform: translateY(10px);
        border-top: 3px solid var(--zigzag-red);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 0;
        overflow: hidden;
    }
    .nav-item:hover .dropdown-menu { 
        opacity: 1; 
        visibility: visible; 
        transform: translateY(0); 
    }
}

.dropdown-item {
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--zigzag-blue);
}

.dropdown-item:hover, 
.dropdown-item:active {
    background-color: var(--zigzag-red) !important;
    color: white !important;
}

/* =========================================
   3. HERO & MAIN SLIDER
   ========================================= */
.carousel-container {
    max-width: 1320px;
    margin: 20px auto;
    padding: 0 15px;
}

/* Pembersihan Redundansi Slider (Gruping Selektor) */
#mainSlider, 
#mainSlider .carousel-inner, 
#mainSlider .carousel-item,
#mainSlider .carousel-item img {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#mainSlider .carousel-item img {
    width: 100%;
    height: 500px; 
    object-fit: contain;
    border-radius: 15px;
    filter: none !important; 
}

.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Penting agar gambar tidak keluar batas saat bergerak */
    color: white;
}

.hero-bg {
    position: absolute;
    /* inset -50px memberikan ruang gerak agar tepi gambar tidak terlihat saat parallax */
    top: -50px; left: -50px; right: -50px; bottom: -50px; 
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), 
                url('../img/bg.webp') center/cover no-repeat; 
    /* Menggunakan variabel CSS yang dihitung oleh JS */
    transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.1);
    transition: transform 0.1s ease-out;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-interior {
    height: 450px;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

.hero-overlay {
    position: absolute; 
    inset: 0;
    background: linear-gradient(to right, rgba(0, 31, 63, 0.9), rgba(0, 51, 102, 0.4));
}

/* =========================================
   4. COMPONENTS (Features, Zoom, Buttons)
   ========================================= */
.feature-box {
    background-color: #ffffff;
    transition: all 0.4s ease;
    border: 1px solid #eee;
    position: relative;
    z-index: 1;
}

/* Efek Hover Feature Box Lebih Ringkas */
.feature-box:hover {
    background-color: var(--zigzag-blue) !important;
    transform: translateY(-10px);
    color: #ffffff !important;
}

.feature-box:hover h5, 
.feature-box:hover p {
    color: #ffffff !important;
}

.feature-box:hover .feature-icon {
    filter: brightness(0) invert(1) !important;
    transform: scale(1.1);
}

.zoom-container { overflow: hidden; }

.custom-size {
    width: 60% !important;
    height: auto;
    transition: transform 0.5s ease;
    display: block;
    margin: 0 auto;
}

.zoom-container:hover .custom-size {
    transform: scale(1.1);
}

.btn-zigzag {
    background-color: var(--zigzag-blue);
    color: white;
    border-radius: 5px;
    transition: 0.4s;
    border: none;
    padding: 10px 25px;
}

.btn-zigzag:hover {
    background-color: var(--zigzag-red);
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
    color: white;
}

/* =========================================
   5. BLOG SLIDER
   ========================================= */
.card-hover-effect { transition: transform 0.3s ease; }
.card-hover-effect:hover { transform: translateY(-5px); }

.blog-ctrl {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0.8;
    border: none;
    position: absolute;
    z-index: 5;
    display: flex; /* Memastikan icon di tengah */
    align-items: center;
    justify-content: center;
}

.blog-ctrl:hover {
    opacity: 1;
    background: var(--zigzag-red);
    color: white !important;
}

.blog-ctrl.carousel-control-prev { left: -20px; }
.blog-ctrl.carousel-control-next { right: -20px; }

/* =========================================
   6. CTA SECTION & ANIMATIONS
   ========================================= 
.cta-section {
    background-attachment: fixed;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-text-blink {
    animation: colorChange 3s infinite;
    font-weight: 800;
}

@keyframes colorChange {
    0%, 100% { color: #ffffff; }
    50% { color: var(--zigzag-yellow); }
}*/

/* =========================================
   7. FOOTER & SOCIALS
   ========================================= */
footer { background: #1a1a1a; color: white; padding: 40px 0; }

.social-icon-hover {
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.social-link:hover .social-icon-hover {
    /* Filter warna kuning Zig Zag */
    filter: invert(72%) sepia(85%) saturate(1458%) hue-rotate(358deg) brightness(103%) contrast(106%);
}

/* =========================================
   8. RESPONSIVE FIXES (Mobile & Tablet)
   ========================================= */
@media (max-width: 991px) {
    /* Mencegah bug background fixed di mobile */
    .hero-interior, .cta-section {
        background-attachment: scroll !important;
    }

    .navbar { padding: 10px 0 !important; }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #ddd;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 15px;
        z-index: 999;
    }

    .navbar-nav {
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Perbaikan 2: Jarak antar menu ditingkatkan menjadi 8px */
    .nav-item {
        width: 100%;
        text-align: center;
        margin: 8px 0;
    }

    /* Perbaikan 1: Logika Dropdown di Mobile menggunakan position static */
    .dropdown-menu {
        display: none; 
        position: static !important;
        width: 100% !important;
        text-align: center;
        border: none;
        box-shadow: none;
        background: #f8f9fa;
        transform: none !important; 
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .navbar-collapse.show .dropdown-menu.show {
        display: block !important;
    }
}
/* whatsapp */
.whatsapp-btn {
    background: #25D366;
    border-color: #25D366;
}
.whatsapp-btn:hover {
    background: #20b858;
}

/* =========================================
   6. CTA SECTION (PARALLAX FIX)
   ========================================= */
.cta-section {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Penting agar gambar tidak keluar frame */
    border-radius: 15px; /* Sesuai dengan rounded-4 di HTML */
    background-color: #00295c; /* Warna cadangan jika gambar gagal load */
}

/* Kita buat container khusus untuk background agar bisa digerakkan */
.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Dibuat lebih tinggi dari frame agar ada ruang gerak */
    background-image: url('../img/Butuh_Dana.webp');
    background-position: center top; /* Memaksa bagian atas gambar (Tulisan Mendesak) muncul duluan */
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
    /* Kita akan mengontrol transform: translateY via JS nanti */
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 41, 92, 0.5); 
    z-index: 2;
}

.cta-section .container {
    position: relative;
    z-index: 3;
}

/* Animasi Warna Teks */
.cta-text-blink {
    animation: colorChange 3s infinite;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

@keyframes colorChange {
    0%, 100% { color: #ffffff; }
    50% { color: var(--zigzag-yellow); }
}

/* FIX UNTUK MOBILE (Mencegah Blank di Chrome Mobile) */
@media (max-width: 991px) {
    .cta-section {
        background-attachment: scroll !important; /* Mobile tidak dukung fixed dengan baik */
        min-height: 300px;
    }
}