/* ==========================================================
   STYLE.CSS - PORTAL WARGA (PREMIUM DESIGN SYSTEM)
   ========================================================== */

/* Import Google Font - Inter & Outfit */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Deklarasi Variabel Warna & Desain System */
:root {
    --primary-color: #6366f1;       /* Vibrant Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #10b981;     /* Energetic Emerald Green */
    --secondary-hover: #059669;
    --accent-color: #f97316;        /* Energetic Orange */
    --accent-hover: #ea580c;
    --dark-color: #0b0f19;          /* Sleek Deep Dark */
    --light-color: #f8fafc;         /* Slate Light */
    --text-color: #334155;          /* Slate Text */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 20px 25px -5px rgba(99, 102, 241, 0.1), 0 10px 10px -5px rgba(99, 102, 241, 0.05);
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

/* Pengaturan Dasar Halaman */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: #f1f5f9;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark-color);
    font-weight: 700;
}

/* Override Tombol Bootstrap agar memiliki Warna Kustom Premium */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}
.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #ffffff !important;
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-hover) !important;
    border-color: var(--secondary-hover) !important;
}

/* ==========================================================
   HEADER & NAVBAR (GLASSMORPHISM)
   ========================================================== */
.navbar-custom {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition-normal);
    z-index: 1050;
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--dark-color) !important;
}

.navbar-brand span {
    color: var(--primary-color);
}

.navbar-custom .nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.navbar-custom .nav-link:hover, 
.navbar-custom .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.06) !important;
}

/* Custom Nav Pills & Tabs (Kontras & Legibilitas Tinggi) */
.nav-pills .nav-link {
    color: var(--text-color) !important;
    font-weight: 600;
    transition: var(--transition-fast);
    background: transparent;
    padding: 0.6rem 1.5rem;
}

.nav-pills .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.04);
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}


.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ==========================================================
   HERO / WELCOME SECTION (GRADIENT & OVERLAY)
   ========================================================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #ffffff;
    padding: 120px 0 100px 0;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #f1f5f9;
    clip-path: ellipse(60% 40px at 50% 40px);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-btn {
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-normal);
}

/* ==========================================================
   COMPONENTS: CARDS & BADGES
   ========================================================== */
.card-premium {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    overflow: hidden;
    height: 100%;
}

.card-premium:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(79, 70, 229, 0.2);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-premium:hover .card-img-wrapper img {
    transform: scale(1.08);
}

/* Custom Badges */
.badge-category {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary-color);
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.badge-status-kegiatan {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.badge-akan-datang {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.badge-sedang-berlangsung {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.badge-selesai {
    background-color: rgba(100, 116, 139, 0.12);
    color: #475569;
}

/* ==========================================================
   GALERI GRID & LIGHTBOX VISUALS
   ========================================================== */
.gallery-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

@media (max-width: 992px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-caption {
    padding: 0.8rem 1rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Lightbox Modal CSS */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #f8fafc;
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: #cbd5e1;
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    color: #ffffff;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 2.8rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    padding: 1rem;
    transition: var(--transition-fast);
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

.lightbox-prev:hover, .lightbox-next:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .lightbox-prev { left: -10px; font-size: 2rem; }
    .lightbox-next { right: -10px; font-size: 2rem; }
    .lightbox-close { top: -40px; right: 10px; }
}

/* ==========================================================
   BACKOFFICE / ADMIN PANEL LAYOUT
   ========================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--dark-color);
    color: #cbd5e1;
    flex-shrink: 0;
    transition: var(--transition-normal);
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-header h5 {
    color: #ffffff;
    margin: 0;
    font-weight: 700;
}

.admin-nav {
    padding: 1rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.35rem;
    transition: var(--transition-fast);
    font-weight: 500;
}

.admin-nav-link i {
    width: 24px;
    font-size: 1.1rem;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.admin-content {
    flex-grow: 1;
    background-color: #f8fafc;
    padding: 2rem;
}

.admin-header {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .admin-wrapper {
        position: relative;
        overflow-x: hidden;
        width: 100%;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1100;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    .admin-sidebar.show-sidebar {
        transform: translateX(0);
    }
    .admin-content {
        padding: 1rem;
        width: 100%;
    }
    .admin-header {
        padding: 0.8rem 1rem;
        margin-bottom: 1.5rem;
    }
}


/* Admin Dashboard Stats Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-right: 1rem;
}

.stat-icon.primary { background-color: rgba(79, 70, 229, 0.1); color: var(--primary-color); }
.stat-icon.secondary { background-color: rgba(13, 148, 136, 0.1); color: var(--secondary-color); }
.stat-icon.warning { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-color); }
.stat-icon.info { background-color: rgba(6, 182, 212, 0.1); color: #06b6d4; }

/* Admin Table Design */
.table-responsive-custom {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-custom {
    margin: 0;
}

.table-custom th {
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.table-custom td {
    padding: 1rem;
    vertical-align: middle;
}

/* ==========================================================
   FOOTER (CLEAN & METADATA WIDGETS)
   ========================================================== */
.footer-section {
    background-color: var(--dark-color);
    color: #e2e8f0;
    padding: 5rem 0 2rem 0;
}

.footer-section h5 {
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-section .text-primary {
    color: var(--accent-color) !important;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}
