/* Merah Putih Theme - Clean White & Professional by Gemini */
:root {
    /* 1. New Color Palette for Merah Putih Theme */
    --primary-color: #FF0000; /* Merah */
    --secondary-color: #D32F2F; /* Merah Tua */
    --text-color: #333333; /* Abu-abu Tua untuk teks */
    --text-light: #FFFFFF;
    --bg-color: #F8F9F9; /* Off-white for a softer look */
    --border-color: #EAEDED;

    /* 2. Redefined Glassmorphism for a Light BG */
    --glass-bg: rgba(255, 255, 255, 0.6); /* Semi-transparent white */
    --glass-border: rgba(0, 0, 0, 0.05);
    --blur-effect: blur(8px);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.1); /* Stronger shadow for depth */

    --border-radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 3. Set the Clean White Background */
body { 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    color: var(--text-color); 
    animation: fadeInPage 0.5s ease-in-out forwards; 
    background-color: var(--bg-color);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 4. Apply the new Glass Header */
.header { 
    background: var(--glass-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    backdrop-filter: var(--blur-effect);
    -webkit-backdrop-filter: var(--blur-effect);
    border-bottom: 1px solid var(--glass-border);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 20px; /* MODIFIED: Added horizontal padding */
    max-width: 1240px; /* ADDED: To contain the elements */
    margin: 0 auto; /* ADDED: To center the navbar */
    min-height: 70px; 
}

/* MODIFICATION START */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px; /* This adds space between your logos */
}
.nav-logo img { 
    height: 40px; 
    /* The border-radius: 50% was removed to accommodate the non-circular kabupaten logo */
}
/* MODIFICATION END */

.nav-menu { display: flex; justify-content: center; align-items: center; list-style: none; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s ease; }
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--text-color); }

/* 5. Restyle Buttons for High Contrast */
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: 2px solid transparent; text-align: center; }
.btn-primary { background-color: var(--primary-color); color: var(--text-light); }
.btn-primary:hover { background-color: #B71C1C; transform: translateY(-2px); }
.btn-secondary { background-color: #FFFFFF; color: var(--primary-color); border-color: var(--border-color); }
.btn-secondary:hover { background-color: var(--border-color); transform: translateY(-2px); }
.btn-outline { background-color: transparent; color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: var(--text-light); transform: translateY(-2px); }

.section-padding { padding: 80px 0; }
.section-title, .page-title { color: #333333; } /* Darker title color */
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; font-weight: 700; }
.page-title { font-size: 3rem; margin-bottom: 30px; }
.section-header-center { text-align: center; margin-bottom: 50px; }
.text-white { color: var(--text-light); } /* Use only on dark backgrounds */
.text-center { text-align: center; }
.cta-buttons { margin-top: 30px; display: flex; justify-content: center; gap: 20px; }

/* Carousel Styles */
.carousel-container { position: relative; }
.carousel-track-container { overflow: hidden; }
.carousel-track { display: flex; gap: 30px; }
.carousel-slide { flex-shrink: 0; width: calc((100% - 3 * 30px) / 4); } 
.carousel-container .person-card.carousel-slide,
.carousel-container .product-card-large.carousel-slide,
.carousel-container .attraction-card.carousel-slide { width: calc((100% - 2 * 30px) / 3); }
.carousel-button { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(255, 255, 255, 0.9); border: 1px solid var(--border-color); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; z-index: 2; font-size: 1.5rem; color: var(--text-color); transition: all 0.3s ease; }
.carousel-button:hover { background-color: var(--primary-color); color: white; }
.carousel-button.prev { left: -22px; }
.carousel-button.next { right: -22px; }

/* 6. Update Cards with the new Glass Effect */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-effect);
    -webkit-backdrop-filter: var(--blur-effect);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card .card-content { padding: 20px; flex-grow: 1; }

.product-card-small .price, .product-card-large .price { font-weight: 600; color: var(--primary-color); margin: 10px 0; font-size: 1.2rem; }

/* Adjustments for specific cards */
.person-card { text-align: center; padding: 30px 20px; color: var(--text-color); background: transparent; }
.person-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 4px solid var(--secondary-color); margin-left: auto; margin-right: auto; }
.attraction-card { position: relative; height: 350px; background: #fff; }
.attraction-card img { height: 100%; }
.attraction-card-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: var(--text-light); }
.tag { background-color: var(--secondary-color); color: var(--text-light); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; display: inline-block; }

/* Hero Sections */
.hero-section { height: 90vh; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: var(--text-light); text-align: center; position: relative; overflow: hidden; }
.hero-section::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero-title { font-size: 4rem; font-weight: 700; }
.hero-subtitle { font-size: 1.5rem; margin-bottom: 30px; }

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

.page-hero-section { padding: 80px 0; background-size: cover; background-position: center; }
.page-hero-content {
    background: rgba(183, 28, 28, 0.85);
    padding: 40px;
    border-radius: var(--border-radius);
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.page-hero-title { font-size: 2.5rem; }

/* === NEW STYLES FOR PRODUCT/STORY PAGES === */
.story-grid, .product-detail-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.story-grid { align-items: center; }
.story-image img, .product-detail-image img { width: 100%; height: auto; object-fit: cover; border-radius: var(--border-radius); }
.product-detail-info ul { list-style-position: inside; padding-left: 0; margin-top: 20px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.testimonial-card { background-color: var(--bg-light); padding: 20px; border-radius: var(--border-radius); border-left: 4px solid var(--primary-color); }
.faq-accordion .faq-item { border-bottom: 1px solid var(--border-color); }
.faq-question { width: 100%; background: none; border: none; text-align: left; padding: 20px 0; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.story-content p {
    text-align: justify;
}
/* ========================================= */

/* Literature Section */
.literature-content {
    max-width: 800px;
    margin: 0 auto;
    background: #FFFFFF;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: justify;
    line-height: 1.8;
    box-shadow: var(--shadow);
}

.literature-content h2 {
    text-align: center;
    margin-bottom: 30px;
}

.literature-content p {
    margin-bottom: 1.5em;
}

/* Contact Page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.lets-talk-card, .contact-info-block {
    background: #FFFFFF;
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.contact-right { display: flex; flex-direction: column; gap: 20px; }
.contact-info-block h3 { margin-bottom: 10px; color: var(--primary-color); }
.contact-info-block p { display: flex; align-items: center; gap: 10px; }
.contact-info-block a { color: var(--primary-color); text-decoration: none; }

/* Footer */
.footer { background-color: #FFFFFF; color: var(--text-color); text-align: center; padding: 20px 0; margin-top: 50px; border-top: 1px solid var(--border-color); }

/* Animations */
@keyframes fadeInPage { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOutPage { from { opacity: 1; } to { opacity: 0; } }
body.page-is-leaving { animation: fadeOutPage 0.5s ease-in-out forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animation-fade-in { animation: fadeIn 1.5s ease-in-out; }
.anim-on-scroll { opacity: 0; transform: translateY(50px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.anim-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive Design */
@media (max-width: 992px) {
    .carousel-slide,
    .carousel-container .person-card.carousel-slide,
    .carousel-container .product-card-large.carousel-slide,
    .carousel-container .attraction-card.carousel-slide { width: calc((100% - 1 * 30px) / 2); }
    .hero-title { font-size: 3rem; }
}

@media (max-width: 768px) {
    .nav-menu { 
        position: fixed; 
        left: -100%; 
        top: 70px; 
        flex-direction: column; 
        background-color: #fff; 
        width: 100%; 
        text-align: center; 
        transition: 0.3s; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        height: calc(100vh - 70px);
        padding-top: 1rem;
    }
    .nav-menu.active { left: 0; }
    .nav-item { margin: 1.5rem 0; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .nav-contact { display: none; }
    .contact-grid { grid-template-columns: 1fr; }
    .carousel-slide,
    .carousel-container .person-card.carousel-slide,
    .carousel-container .product-card-large.carousel-slide,
    .carousel-container .attraction-card.carousel-slide { width: 85%; }
    .carousel-button.prev { left: -15px; }
    .carousel-button.next { right: -15px; }

    .story-grid, .product-detail-grid, .testimonial-grid { grid-template-columns: 1fr; }
}

/* Grid View */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.section-title-link {
    text-decoration: none;
}

.story-grid {
        grid-template-columns: 1fr; /* Stack menjadi 1 kolom */
        gap: 30px; /* Mengurangi jarak antar elemen */
    }

    /* Mengatur ulang urutan elemen agar gambar selalu di atas teks pada mobile */
    .story-grid .story-content {
        order: 2;
    }
    .story-grid .story-image {
        order: 1;
    }
}