/* -------------------------------------------------------------------------- */
/* GLOBAL SCROLLBAR & BASE UTILITIES                                          */
/* -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #0f172a; }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Gradient Text Utility */
.text-gradient-green { background: linear-gradient(to right, #47b76b, #86efac); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient-orange { background: linear-gradient(to right, #e87525, #fdba74); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient-yellow { background: linear-gradient(to right, #e9bf1f, #fde047); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* -------------------------------------------------------------------------- */
/* MOBILE NAVIGATION & STICKY HEADER                                          */
/* -------------------------------------------------------------------------- */
.mobile-sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
}

/* ScrollSpy Chip Navigation */
.mobile-chip-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.mobile-chip-nav::-webkit-scrollbar { display: none; }

/* The "Active Glow" state for ScrollSpy */
.mobile-chip-nav a.active-chip {
    background-color: #E31E24 !important; /* Forces Klik Red */
    color: #ffffff !important;           /* Forces White Text */
    transform: scale(1.05);              /* Slight pop effect */
    box-shadow: 0 4px 10px rgba(227, 30, 36, 0.3);
    border: none;
}
/* Desktop Sidebar Link - Active State */
.desktop-link.text-klik-red {
    border-left: 2px solid #E31E24;
    padding-left: 12px;
    margin-left: -14px; /* Pulls the border back to align with the list */
    transition: all 0.3s ease;
}
/* Inline Links with Suffix Arrow Detail */
.inline-link {
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.inline-link:hover {
    color: #E31E24;
}

/* -------------------------------------------------------------------------- */
/* DESKTOP SIDEBAR & ACCORDION                                               */
/* -------------------------------------------------------------------------- */
.nav-square.active {
    background-color: #0f172a;
    color: white;
    border-left: 4px solid #e7342f;
}
.nav-square.active .icon-chevron {
    color: #e7342f;
    transform: rotate(180deg);
}
.nav-square:not(.active):hover {
    background-color: #f1f5f9;
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.sub-menu.open {
    max-height: 800px;
    transition: max-height 0.5s ease-in;
}

/* Offset for Anchor Links (Prevents header from covering titles) */
.scroll-mt-32 { scroll-margin-top: 8rem; } 

/* -------------------------------------------------------------------------- */
/* PRELOADER (Fixes FOUC)                                                     */
/* -------------------------------------------------------------------------- */
#preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader-logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    animation: pulse 2s infinite; 
}

.preloader-text {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.loading-bar {
    width: 0%;
    height: 2px;
    background-color: #e7342f;
    margin: 0 auto;
    animation: loadProgress 2s ease-in-out infinite;
    border-radius: 2px;
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes loadProgress {
    0% { width: 0%; opacity: 1; }
    50% { width: 100%; opacity: 1; }
    100% { width: 0%; opacity: 0; }
}

/* Default: Mobile Background */
.hero-bg {
    background-image: url('assets/mobile.png');
    background-size: cover;
    background-position: center;
}

/* Desktop: Switch to wide background at 768px width */
@media (min-width: 768px) {
    .hero-bg {
        background-image: url('assets/hero4.png');
    }
}
