@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
    font-family: "Inter", sans-serif;
}

/* Menu Link - for header */
.menu-link {
    position: relative;
    display: inline-block;
}

.menu-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -20px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease-in-out;
}

.menu-link:hover::after {
    width: 100%;
}

/* Submenu Link - for footer or other submenus */
.submenu-link {
    position: relative;
    display: inline-block;
}

.submenu-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #b91c1c;
    transition: width 0.3s ease-in-out;
}

.submenu-link:hover::after {
    width: 100%;
}

/* Header Scrolled State */
header {
    transition: none;
}

header.scrolled {
    animation: slideDown 0.3s ease-out;
    background-color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Menu link when header scrolled */
header.scrolled .menu-link {
    color: rgba(0, 0, 0, 0.8);
}

header.scrolled .menu-link:hover {
    color: #b91c1c;
}

header.scrolled .menu-link::after {
    background-color: #b91c1c;
}

/* Search input when scrolled */
header.scrolled .search-container {
    background-color: #f3f4f6 !important;
    transition: none;
}

header.scrolled .search-input {
    background-color: #f3f4f6 !important;
    color: rgba(0, 0, 0, 0.8) !important;
    transition: none;
}

header.scrolled .search-input::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
}

header.scrolled .search-btn {
    color: rgba(0, 0, 0, 0.8) !important;
    transition: none;
}

header.scrolled .search-btn:hover {
    color: #b91c1c !important;
}

/* Mobile menu button when scrolled */
header.scrolled #mobile-menu-btn {
    color: rgba(0, 0, 0, 0.8) !important;
}

header.scrolled #mobile-menu-btn:hover {
    color: #b91c1c !important;
}

/* ===================================
   PRELOADER STYLES
   =================================== */

/* Preloader Container */
.preloader-activate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: none; /* Hapus transisi warna */
}

/* Preloader Hidden State */
.preloader-activate.preloader-done {
    animation: fadeSlideUp 0.6s ease-out forwards;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Preloader Area Wrap */
.preloader-area-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Logo Animation */
.preloader-logo {
    margin-bottom: 40px;
    animation: logoFadeIn 0.8s ease-out;
}

.preloader-logo img {
    width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Spinner Container */
.spinner {
    display: flex;
    gap: 12px;
}

/* Bounce Animation */
.bounce1,
.bounce2,
.bounce3 {
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border-radius: 50%;
    animation: bouncedelay 1.4s infinite ease-in-out both;
}

.bounce1 {
    animation-delay: -0.32s;
}

.bounce2 {
    animation-delay: -0.16s;
}

@keyframes bouncedelay {
    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading Text */
.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin-top: 30px;
    letter-spacing: 2px;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Loading Progress Bar */
.loading-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: white;
    border-radius: 10px;
    animation: progressBar 2s ease-out forwards;
}

@keyframes progressBar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Logo Fade In */
@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alternative Spinner - Circle Rotation */
.spinner-circle {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Dots Pulse Loader */
.dots-pulse {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Percentage Counter */
.loading-percentage {
    color: white;
    font-size: 48px;
    font-weight: 700;
    margin-top: 20px;
    font-family: "Inter", sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-logo img {
        width: 150px;
    }

    .loading-progress {
        width: 250px;
    }

    .loading-percentage {
        font-size: 36px;
    }
}
