/* =========================================
   1. GLOBAL & VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --primary-color: #8D7B68; /* Coklat Hangat */
    --secondary-color: #C8B6A6; /* Krem Beige */
    --bg-light: #F9F8F6; /* Putih Gading */
    --text-dark: #333333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
}

/* =========================================
   2. NAVBAR FRONTEND (WEBSITE UTAMA)
   ========================================= */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    color: #333333 !important;
    font-weight: 600;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
    color: var(--primary-color) !important;
    background-color: transparent !important;
    transform: translateY(-2px);
}

/* MENU AKTIF */
.navbar-custom .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 700;
    background-color: transparent !important;
    box-shadow: none;
    border-bottom: 2px solid var(--primary-color);
    padding-left: 0;
    padding-right: 0;
    margin: 0 1rem;
}

.navbar-custom .btn-outline-dark {
    color: #333333;
    border-color: #333333;
}
.navbar-custom .btn-outline-dark:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* =========================================
   3. HERO & GENERAL
   ========================================= */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.font-heading { font-family: var(--font-heading); }

.page-header {
    height: 400px; 
    background-size: cover; 
    background-position: center; 
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading {
    font-family: var(--font-heading);
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* =========================================
   4. EVENTS & NEWS LISTING (FIXED LAYOUT)
   ========================================= */
/* Container Kartu */
.event-item-card, .news-item-card {
    border: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%; /* Pastikan tinggi kartu sama */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.event-item-card:hover, .news-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* FIX GAMBAR: Paksa Tinggi Sama */
.event-thumb-container, .news-thumb-container {
    position: relative;
    width: 100%;
    height: 250px !important; /* Tinggi Gambar FIX */
    overflow: hidden;
    flex-shrink: 0;
}

.event-thumb, .news-thumb {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important; /* Gambar tidak gepeng */
    transition: transform 0.5s ease;
}

.event-item-card:hover .event-thumb,
.news-item-card:hover .news-thumb {
    transform: scale(1.1); /* Efek Zoom */
}

/* Badge Tanggal (Events) */
.date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    min-width: 60px;
}

.date-badge .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.date-badge .month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #555;
    font-weight: 600;
    letter-spacing: 1px;
}

/* =========================================
   5. GALLERY STYLES (MASONRY & HOVER)
   ========================================= */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}
@media (max-width: 992px) { .masonry-grid { column-count: 2; } }
@media (max-width: 576px) { .masonry-grid { column-count: 1; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative; /* Penting untuk overlay */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Overlay Hitam (Default Hidden) */
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Hitam Transparan */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Tersembunyi */
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
}

/* Teks Caption di dalam Overlay */
.gallery-overlay h5 {
    color: white;
    font-family: var(--font-heading);
    margin-top: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

/* Efek Saat Hover */
.gallery-item:hover .gallery-overlay {
    opacity: 1; /* Muncul */
}
.gallery-item:hover img {
    transform: scale(1.05); /* Zoom Gambar */
}
.gallery-item:hover .gallery-overlay h5 {
    transform: translateY(0); /* Teks naik */
}

/* Filter Tombol */
.gallery-filters .btn {
    border-radius: 50px;
    padding: 8px 25px;
    margin: 0 5px 10px;
    font-weight: 500;
    border: 1px solid #ddd;
    color: #555;
}
.gallery-filters .btn.active, .gallery-filters .btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* =========================================
   6. FLOATING SOCIAL MEDIA (RIGHT)
   ========================================= */
.social-floating-right {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.social-float-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    text-decoration: none;
    font-size: 1.5rem;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.2);
}

.social-float-item:hover {
    width: 65px;
    padding-right: 15px;
}

.bg-wa { background-color: #25D366; }
.bg-ig { background-color: #C13584; }
.bg-fb { background-color: #1877F2; }
.bg-yt { background-color: #FF0000; }

@media (max-width: 576px) { .social-floating-right { display: none; } }


/* =========================================
   7. ADMIN PANEL STYLES
   ========================================= */
.login-card {
    max-width: 400px; margin: 100px auto; padding: 2rem;
    border-radius: 15px; background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); border-top: 5px solid #8D7B68;
}
.btn-primary-custom {
    background-color: #8D7B68; border-color: #8D7B68; color: white;
}
.btn-primary-custom:hover { background-color: #6d5e4f; }

.sidebar {
    background-color: #1a1a1a; min-height: 100vh;
    box-shadow: 4px 0 15px rgba(0,0,0,0.2); z-index: 1000;
    border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar-brand {
    padding: 2.5rem 1.5rem; background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 1rem;
}
.sidebar-brand h5 { letter-spacing: 1px; color: #fff; }
.sidebar-heading {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4); margin: 1.5rem 1.5rem 0.5rem;
}

/* LINK SIDEBAR */
.sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important; padding: 0.8rem 1.5rem;
    font-weight: 500; transition: all 0.3s ease; display: flex; align-items: center;
}
.sidebar .nav-link:hover {
    color: #fff !important; background-color: rgba(141, 123, 104, 0.1);
}
.sidebar .nav-link.active {
    color: #fff !important; background-color: #8D7B68 !important;
}
.submenu-list .nav-link { padding-left: 3.5rem; font-size: 0.9rem; }

.btn-logout {
    margin: 2rem 1rem; border-radius: 10px;
    border: 1px solid rgba(220, 53, 69, 0.2); transition: all 0.3s;
}
.btn-logout:hover { background-color: #dc3545; color: white !important; }