/* =========================================
   1. VARIABLES & GLOBAL SETTINGS
   ========================================= */
:root {
    --primary-green: #0b4625;  /* Hijau Tua Calcindo */
    --primary-yellow: #ffc107; /* Kuning Cerah */
    
    /* Ukuran Navbar Desktop */
    --navbar-height: 80px;      
    --brand-height: 120px;     
    --brand-width: 25%;        
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    padding-top: 80px; /* Jarak default desktop */
}

/* =========================================
   2. NAVBAR CUSTOM (DESKTOP GLOSSY)
   ========================================= */
.navbar-custom {
    background-color: var(--primary-green);
    /* Efek Glossy / Kaca */
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0.2) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
    height: var(--navbar-height); 
    padding: 0; 
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    
    /* TAMBAHAN ANIMASI HALUS */
    transition: all 0.4s ease; 
}

/* Segitiga Kuning Miring (Desktop Only) */
.navbar-custom::before {
    content: ''; position: absolute; top: 0; left: 0; 
    width: var(--brand-width); 
    height: var(--brand-height); 
    background-color: var(--primary-yellow);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 35%, rgba(0, 0, 0, 0.05) 100%);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2), inset 2px 2px 5px rgba(255,255,255,0.6);
    /* Polygon diatur ke 85% agar area bawah lebih lebar untuk logo */
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%); 
    z-index: 1; 

    /* TAMBAHAN ANIMASI HALUS */
    transition: height 0.4s ease; 
}

/* Logo Area Desktop */
.navbar-custom .navbar-brand {
    position: absolute; top: 0; left: 0; z-index: 10; 
    /* Lebar wadah logo dibatasi 80% dari area kuning agar tidak menabrak kemiringan */
    width: calc(var(--brand-width) * 0.8); 
    height: var(--brand-height); 
    display: flex; align-items: center; justify-content: center; 
    padding-left: 15px; padding-right: 0;

    /* TAMBAHAN ANIMASI HALUS */
    transition: height 0.4s ease; 
}
.navbar-custom .navbar-brand img {
    height: auto; 
    max-height: 80px; /* Membatasi tinggi agar tidak menyentuh tepi atas/bawah */
    width: auto; 
    max-width: 100%; 
    object-fit: contain; 
    margin-right: auto; 
    filter: drop-shadow(0 4px 5px rgba(0,0,0,0.3));

    /* TAMBAHAN ANIMASI HALUS */
    transition: max-height 0.4s ease; 
}

/* Menu Links */
.navbar-custom .container-fluid { height: 100%; }
.navbar-custom .collapse { height: 100%; align-items: center; }
.navbar-custom .nav-link {
    color: white !important; font-weight: 600; margin-left: 20px; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.5px;
    position: relative; z-index: 20; text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.navbar-custom .nav-link::after {
    content: ''; position: absolute; width: 0; height: 3px; bottom: -5px; left: 0;
    background-color: var(--primary-yellow); box-shadow: 0 0 8px rgba(255, 193, 7, 0.8); transition: width 0.3s;
}
.navbar-custom .nav-link:hover::after, .navbar-custom .nav-link.active::after { width: 100%; }
.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active { color: var(--primary-yellow) !important; }

/* =========================================
   3. HERO CAROUSEL
   ========================================= */
#heroCarousel {
    margin-top: -20px; border-bottom-left-radius: 50% 40px; border-bottom-right-radius: 50% 40px;
    overflow: hidden; position: relative;
}
.hero-img { height: 85vh; min-height: 500px; object-fit: cover; object-position: center; }
.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(11, 70, 37, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%); z-index: 1;
}
.carousel-caption {
    z-index: 2; bottom: 0; top: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 80px;
}
.carousel-caption h1 { text-shadow: 2px 2px 10px rgba(0,0,0,0.5); font-weight: 800; }
.carousel-caption p.lead { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); font-weight: 500; }

/* =========================================
   4. COMPONENTS & UTILITY
   ========================================= */
.text-green { color: var(--primary-green) !important; }
.text-yellow { color: var(--primary-yellow) !important; }
.bg-green { background-color: var(--primary-green) !important; }

/* Card Hover Effect */
.card-hover, .hover-up { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-hover:hover, .hover-up:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important; }

/* Floating Image Animation */
.animate-img { animation: floating 3s ease-in-out infinite; }
@keyframes floating { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

.fa-check-circle { min-width: 25px; }

/* Custom Button */
.btn-warning {
    background-color: var(--primary-yellow); border: none; color: var(--primary-green);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(0,0,0,0)); box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.btn-warning:hover { background-color: #ffca2c; color: var(--primary-green); }

/* Pagination Hijau */
.page-link { color: var(--primary-green); }
.page-link:hover { color: #08361d; background-color: #e8f5e9; }
.page-link.active { background-color: var(--primary-green) !important; border-color: var(--primary-green) !important; color: #ffc107 !important; }

/* =========================================
   5. FOOTER
   ========================================= */
footer {
    background-color: #1a1a1a; color: #e0e0e0; padding: 60px 0 20px; 
    margin-top: -1px !important; /* Menutup celah putih */
    position: relative; z-index: 10;
}
footer h5 { color: var(--primary-yellow); font-weight: bold; margin-bottom: 20px; }
footer a { color: #e0e0e0; text-decoration: none; }
footer a:hover { color: var(--primary-yellow); }

/* =========================================
   6. PRODUK PAGE STYLES (TAB HIJAU SUPER KUAT)
   ========================================= */
/* Efek Gambar Produk Zoom */
.hover-scale { transition: transform 0.4s ease; }
.hover-scale:hover { transform: scale(1.05); }

/* --- PERBAIKAN WARNA TAB (SELECTOR 'BODY' MENAMBAH PRIORITAS) --- */

/* 1. Tab Belum Diklik (Putih garis Hijau) */
body .nav-pills .nav-link {
    color: #0b4625 !important;
    background-color: #ffffff !important;
    border: 1px solid #0b4625 !important;
    margin: 0 5px;
    transition: all 0.3s ease;
}

/* 2. Tab Aktif (HIJAU MUTLAK) */
body .nav-pills .nav-link.active,
body .nav-pills .show > .nav-link {
    background-color: #0b4625 !important;  /* Ini yang mengubah Biru jadi Hijau */
    color: #ffc107 !important;            /* Teks Kuning */
    border-color: #0b4625 !important;
    box-shadow: 0 5px 15px rgba(11, 70, 37, 0.3) !important;
}

/* 3. Hover Tab (Hijau Muda) */
body .nav-pills .nav-link:hover:not(.active) {
    background-color: #e8f5e9 !important;
    color: #0b4625 !important;
}

/* Tabel Spesifikasi */
.table thead th { border-bottom: none; padding: 15px; }
.table td { padding: 12px 15px; vertical-align: middle; }

/* =========================================
   7. FLOATING WHATSAPP BUTTON
   ========================================= */
.btn-whatsapp-floating {
    position: fixed; bottom: 30px; right: 30px; z-index: 9999;
    background-color: #25d366; color: white !important;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 25px; border-radius: 50px; font-weight: bold; font-size: 16px; text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: all 0.3s ease; animation: pulse-green 2s infinite;
}
.btn-whatsapp-floating i { font-size: 24px; }
.btn-whatsapp-floating:hover { background-color: #128c7e; transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================
   8. RESPONSIVE MOBILE (PERBAIKAN LOGO TRANSPARENT)
   ========================================= */
@media (max-width: 991px) {
    /* Navbar Custom Mobile */
    body { padding-top: 80px; } 
    
    .navbar-custom {
        height: auto; 
        min-height: 80px;
        background: white; 
        background-image: none; 
        border-top: none;
        border-bottom: 5px solid var(--primary-green); 
        padding: 10px 0; 
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Hilangkan segitiga kuning desktop */
    .navbar-custom::before { display: none; } 
    
    /* Logo Container Mobile: Set Transparan */
    .navbar-custom .navbar-brand { 
        position: relative; 
        width: auto; 
        height: auto; 
        padding: 5px 0 5px 15px;
        display: flex; align-items: center; flex-grow: 1;
        background: transparent !important; /* Pastikan transparan */
    }
    
    /* LOGO DI MOBILE */
    .navbar-custom .navbar-brand img { 
        height: auto; 
        max-height: 70px !important; 
        width: auto;
        max-width: 70vw; 
        object-fit: contain;
        padding: 0; filter: none; 
    }
    
    /* Link Menu */
    .navbar-custom .nav-link { 
        color: var(--primary-green) !important; 
        margin-left: 0; 
        padding: 12px 20px; 
        border-bottom: 1px solid #eee; 
        text-shadow: none; 
    }
    .navbar-custom .nav-link:hover { background-color: #f8f9fa; }
    
    /* Tombol Hamburger */
    .navbar-toggler { 
        border-color: var(--primary-green); 
        margin-right: 15px; 
    }
    .navbar-toggler-icon { 
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%230b4625' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E"); 
        width: 1.5em; height: 1.5em;
    }
    
    /* Lain-lain */
    .hero-img { height: 60vh; min-height: 400px; }
    .btn-whatsapp-floating { bottom: 20px; right: 20px; padding: 10px 20px; font-size: 14px; }
    body .nav-pills .nav-link { width: 100%; margin-bottom: 10px; } 
}

/* =========================================
   9. CUSTOM SCROLLBAR (HIJAU)
   ========================================= */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background-color: var(--primary-green); border-radius: 10px; border: 3px solid #f1f1f1; }
::-webkit-scrollbar-thumb:hover { background-color: #08361d; }

html {
    scrollbar-color: var(--primary-green) #f1f1f1;
    scrollbar-width: thin;
}

/* =========================================
   10. TAMBAHAN: LOGIKA SCROLL EFFECT
   (Hanya berlaku di Desktop agar Mobile aman)
   ========================================= */
@media (min-width: 992px) {
    /* 1. Navbar Hijau jadi sedikit transparan */
    .navbar-custom.scrolled {
        background-color: rgba(11, 70, 37, 0.95);
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }

    /* 2. Area Kuning menyusut tingginya (100% = 80px) */
    .navbar-custom.scrolled::before {
        height: 100%; 
    }

    /* 3. Wadah Logo menyusut */
    .navbar-custom.scrolled .navbar-brand {
        height: 100%;
    }

    /* 4. Logo mengecil agar muat di area 80px */
    .navbar-custom.scrolled .navbar-brand img {
        max-height: 60px; /* Mengecil dari 80px ke 60px */
    }
}
