/* --- GOOGLE FONTS IMPORT (LORA & LATO) --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Lora:wght@600;700&display=swap');

:root {
    --primary-color: #5d4037; /* Warna kayu gelap */
    --secondary-color: #8d6e63; /* Warna kayu terang */
    --accent-color: #2e7d32; /* Hijau daun/Eco-friendly */
    --text-dark: #333;
    --light-bg: #f2efe9; /* Warm Ivory */
}

/* --- GLOBAL STYLES --- */
body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #fdfbf7; 
}

/* Menggunakan Font Lora untuk semua Heading & Judul */
h1, h2, h3, h4, h5, h6, .navbar-brand, .category-text {
    font-family: 'Lora', serif;
}

p, a, li, span, div {
    font-family: 'Lato', sans-serif;
}

/* --- NAVBAR STYLES --- */
.bg-dark-brown {
    background-color: #3e2723 !important;
    color: #f1f1f1;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    margin-right: 15px;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #4caf50 !important;
    font-weight: 700;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.3) !important;
}

/* --- FIX NAVBAR MOBILE (Responsive) --- */
/* Kode ini mengecilkan logo & teks HANYA saat di HP */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem; /* Ukuran font lebih kecil di HP */
    }
    
    /* Target gambar logo di dalam navbar-brand */
    .navbar-brand img {
        height: 30px !important; /* Logo lebih kecil (aslinya 40px) */
        width: auto;
    }
}

/* --- HEADER / HERO SECTION --- */
.page-header {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    padding: 150px 0;
    color: white;
    text-align: center;
    position: relative;
    margin-bottom: 50px;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.hero-home {
    background-image: url("assets/images/index1.png");
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed; 
    background-size: cover;
    background-position: center;
}

/* --- SECTION STYLES --- */
.bg-light {
    background-color: var(--light-bg) !important; 
}

/* --- NAVIGATION BOXES (Home) --- */
.category-box {
    position: relative;
    display: block;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.category-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-box::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 1;
}

.category-text {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Lora', serif; /* Pastikan pakai Lora */
    z-index: 2;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.category-box:hover img {
    transform: scale(1.1);
}

/* --- TIMELINE (About Us) --- */
.timeline {
    border-left: 3px solid var(--primary-color);
    margin-left: 20px;
    padding-left: 30px;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: "";
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    left: -41px;
    top: 5px;
    border: 3px solid #fff;
}

/* --- PRODUCT CARDS --- */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-img {
    height: 250px;
    object-fit: cover;
    background-color: #eee;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

/* --- FOOTER STYLES --- */
footer {
    padding-top: 3rem;
    padding-bottom: 1.5rem;
    margin-top: auto;
}

.footer-map iframe {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.footer-link {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #4caf50;
}

.social-icon {
    font-size: 1.5rem;
    margin: 0 10px;
    color: white;
    transition: transform 0.3s;
    display: inline-block;
}

.social-icon:hover {
    color: #ffc107;
    transform: scale(1.2);
}

.text-custom-green {
    color: #4caf50 !important;
}

/* --- FLOATING WHATSAPP BUTTON --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #fff;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* --- FIX TAMPILAN HEADER DI MOBILE (HP) --- */
@media (max-width: 768px) {
    
    /* 1. Matikan efek Parallax di HP (Penyebab gambar terlihat nge-zoom/pecah) */
    .page-header, .hero-home {
        background-attachment: scroll !important; /* Gambar ikut scroll biasa */
        background-position: center center !important; /* Posisikan gambar di tengah */
        background-size: cover !important;
    }

    /* 2. Kurangi tinggi Header Halaman Lain (About, Product, Contact) */
    .page-header {
        padding: 80px 0 !important; /* Aslinya 150px, kita kurangi biar tidak terlalu tinggi */
        margin-bottom: 30px !important;
    }

    /* 3. Kurangi tinggi Hero Section (Home) */
    .hero-home {
        height: 60vh !important; /* Aslinya 85vh. Kita kurangi agar konten di bawahnya mulai terlihat */
        min-height: 400px; /* Jaga-jaga agar tidak terlalu pendek di HP kecil */
    }

    /* 4. Kecilkan Ukuran Judul Besar (H1) di HP */
    .display-3, .display-4 {
        font-size: 2.5rem !important; /* Kecilkan font judul agar tidak makan tempat */
    }
    
    /* 5. Kecilkan teks sub-judul (Lead) */
    .lead {
        font-size: 1rem !important;
    }
}

/* --- FIX NAVBAR MOBILE (Responsive) --- */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem !important; /* Tambah !important */
        margin-right: 0; /* Hapus jarak kanan berlebih */
    }
    
    /* Target gambar logo di dalam navbar-brand */
    .navbar-brand img {
        height: 30px !important; /* Paksa tinggi 30px */
        width: auto !important;   /* Lebar otomatis proporsional */
        max-width: 100%;          /* Mencegah logo melebar keluar layar */
        object-fit: contain;      /* Menjaga rasio gambar */
    }
}