:root {
    --primary-color: #D4AF37;
    --primary-dark: #B4941F;
    --secondary-color: #2C3E50;
    --bg-light: #F9F9F9;
    --text-color: #333333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Lato', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--secondary-color); }
a { text-decoration: none; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.btn:hover { background-color: var(--primary-dark); }
.btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: var(--white); }
.btn-danger { background-color: #e74c3c; }
.btn-edit { background-color: #3498db; }

/* --- HEADER & NAV --- */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed; /* Membuat Header Mengambang di atas */
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; width: 100%; }
nav { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.8rem; font-weight: 700; font-family: 'Playfair Display', serif; color: var(--primary-color); }

/* Menu Desktop */
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 600; color: var(--secondary-color); font-size: 1rem; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active-page { color: var(--primary-color); }

/* Hamburger Button (Untuk HP) */
.mobile-menu-btn { display: none; font-size: 1.8rem; cursor: pointer; color: var(--secondary-color); }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        display: none; /* Sembunyikan menu di HP */
        flex-direction: column;
        position: absolute;
        top: 80px; /* Muncul tepat di bawah header */
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px;
        text-align: center;
    }
    
    .nav-links.active { display: flex; } /* Tampilkan menu jika tombol diklik */
    
    /* Adjust Font Size */
    .hero h1 { font-size: 2rem; }
    .section-title h2 { font-size: 1.8rem; }
    
    /* Grids menjadi 1 kolom di HP */
    .menu-grid, .blog-grid, .services-grid, .contact-wrapper, .about-content {
        grid-template-columns: 1fr !important;
        display: block !important; /* Fallback */
    }
    .menu-item, .blog-card, .service-card {
        margin-bottom: 20px;
    }
}

/* --- MAIN CONTENT --- */
main { margin-top: 80px; min-height: 80vh; } /* Margin agar konten tidak tertutup header */
.padding-section { padding: 80px 20px; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title span { display: block; width: 60px; height: 3px; background-color: var(--primary-color); margin: 0 auto; }

/* --- COMPONENTS --- */
/* Hero Slider */
.hero { height: 90vh; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); overflow: hidden; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s; z-index: -1; }
.slide.active { opacity: 1; }
.hero-content { background: rgba(0,0,0,0.5); padding: 40px; border-radius: 10px; max-width: 800px; }

/* Grids */
.menu-grid, .blog-grid, .services-grid, .contact-wrapper, .about-content {
    display: grid;
    gap: 30px;
}
.menu-grid, .blog-grid, .services-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.contact-wrapper, .about-content { grid-template-columns: 1fr 1fr; }

/* Cards */
.menu-item, .blog-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.menu-img, .blog-thumb { height: 200px; width: 100%; object-fit: cover; }
.menu-info, .blog-content { padding: 20px; }
.menu-price { color: var(--primary-color); font-weight: bold; }
.service-card { background: var(--white); padding: 30px; border-radius: 10px; text-align: center; box-shadow: var(--shadow); }
.service-icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }

/* Footer */
footer { margin-top: auto; background-color: var(--secondary-color); color: var(--white); padding: 50px 20px; text-align: center; }

/* --- ADMIN STYLES --- */
.admin-wrapper { padding: 20px; }
.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.admin-tabs a { 
    padding: 10px 20px; 
    background: #eee; 
    border-radius: 4px; 
    color: #333;
    font-weight: bold;
}
.admin-tabs a.active { background: var(--primary-color); color: white; }
.admin-tabs a:hover { text-decoration: none; opacity: 0.8; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; box-shadow: var(--shadow); }
th, td { padding: 12px; border-bottom: 1px solid #ddd; text-align: left; }
th { background: var(--secondary-color); color: white; }

/* --- GALLERY STYLES --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Gambar terpotong rapi */
    display: block;
}

.gallery-caption {
    padding: 15px;
    text-align: center;
}

.gallery-caption h4 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.gallery-caption p {
    font-size: 0.9rem;
    color: #666;
}

/* Responsif untuk Galeri di HP */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di tablet kecil/HP besar */
        gap: 10px;
    }
    .gallery-item img {
        height: 180px;
    }
}
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 kolom di HP kecil */
    }
}

/* --- PAGE LOADER (PRELOADER) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 99999; /* Pastikan di atas semua elemen */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* Animasi Spinner Lingkaran Emas */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D4AF37; /* Warna Emas */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Animasi Putar */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Teks Loading */
.loader-text {
    font-family: 'Playfair Display', serif;
    color: #D4AF37;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

/* Animasi Detak Jantung (Pulse) */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Class untuk menyembunyikan Loader saat loading selesai */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

/* Opsional: Efek Fade In pada Body saat masuk halaman */
body {
    animation: fadeInPage 0.8s ease-out;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}