/* ==========================================================================
   BUMDes Makmur - Style Sheet
   ========================================================================== */

/* CRITICAL CSS: Native styling untuk mencegah FOUC (Flash of Unstyled Content) & PageSpeed Optimization */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
    color: #102a43;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Poppins', sans-serif;
}

/* Native Loader Styling (Berjalan instan 0ms sebelum Tailwind termuat) */
#global-loader {
    display: none !important;
}

.native-spinner {
    width: 3.5rem;
    height: 3.5rem;
    border: 4px solid #e5e7eb;
    border-top-color: #102a43;
    border-radius: 50%;
    animation: nativeSpin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes nativeSpin {
    to { transform: rotate(360deg); }
}

.native-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #102a43;
    margin: 0;
}

.native-title span {
    color: #d4af37;
}

.native-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* App Wrapper Hider (Mencegah patah-patah UI tampil sebelum siap) */
#app-wrapper {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

#app-wrapper.ready {
    opacity: 1;
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#lightbox {
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

#lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

#lightbox:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334e68;
    border-radius: 4px;
}

.view-hidden {
    display: none !important;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #374151;
}

/* ====== EFEK KILAUAN (SHIMMER LOADING) ====== */
.shimmer-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #e5e7eb;
}

.shimmer-wrapper-dark {
    background-color: #102a43;
}

.shimmer-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.3) 80%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmerSweep 1.5s infinite ease-in-out;
    pointer-events: none;
    z-index: 5;
}

.shimmer-wrapper-dark::after {
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 80%,
        rgba(255, 255, 255, 0) 100%
    );
}

@keyframes shimmerSweep {
    100% {
        transform: translateX(100%);
    }
}
