/* Enhanced Navbar Styles with #00baff Main Color - Scroll Animations */

/* Scroll-to-section offset: kompensasi navbar fixed (±70px) */
[id] {
    scroll-margin-top: 80px;
}

/* Global Body Styles */
body {
    font-size: 1rem;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Modern Navbar Container with Scroll Effects */
.navbar-custom {
    background: linear-gradient(135deg, 
        rgba(0, 186, 255, 0.95) 0%, 
        rgba(0, 156, 255, 0.90) 30%, 
        rgba(0, 136, 255, 0.92) 70%, 
        rgba(0, 116, 255, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    height: 70px;
    padding: 8px 0;
    transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                backdrop-filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transform: translateY(0);
}

/* Scrolled State - More Opaque */
.navbar-custom.scrolled {
    background: linear-gradient(135deg, 
        rgba(0, 186, 255, 0.98) 0%, 
        rgba(0, 156, 255, 0.95) 30%, 
        rgba(0, 136, 255, 0.97) 70%, 
        rgba(0, 116, 255, 0.98) 100%);
    backdrop-filter: blur(25px) saturate(2);
    height: 65px;
    transform: translateY(0);
}

/* Hidden State - Slide Up */
.navbar-custom.hidden {
    transform: translateY(-100%);
}

/* Visible State - Slide Down */
.navbar-custom.visible {
    transform: translateY(0);
    background: linear-gradient(135deg, 
        rgba(0, 186, 255, 0.98) 0%, 
        rgba(0, 156, 255, 0.96) 30%, 
        rgba(0, 136, 255, 0.97) 70%, 
        rgba(0, 116, 255, 0.98) 100%);
    backdrop-filter: blur(30px) saturate(2.2);
}

/* Carousel Block State - Full Opacity */
.navbar-custom.blocking {
    background: linear-gradient(135deg, 
        rgba(0, 186, 255, 1) 0%, 
        rgba(0, 156, 255, 0.98) 30%, 
        rgba(0, 136, 255, 0.99) 70%, 
        rgba(0, 116, 255, 1) 100%);
    backdrop-filter: blur(15px);
}

/* Brand Styling */
.navbar-custom .navbar-brand {
    color: #ffffff !important;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.navbar-custom .navbar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.navbar-custom .navbar-brand:hover::before {
    left: 100%;
}

.navbar-custom .navbar-brand:hover {
    color: #00e6ff !important;
    transform: translateY(-1px);
    text-shadow: 0 4px 12px rgba(0, 230, 255, 0.4);
}

.navbar-custom .navbar-brand img {
    height: 38px;
    width: auto;
    margin-right: 12px;
    border-radius: 8px;
    box-shadow: 
        0 4px 12px rgba(0, 186, 255, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.navbar-custom .navbar-brand:hover img {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 6px 20px rgba(0, 230, 255, 0.3),
        0 3px 8px rgba(0, 186, 255, 0.2);
    border-color: rgba(0, 230, 255, 0.5);
}

/* Navigation Links */
.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 18px !important;
    margin: 0 4px;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    letter-spacing: 0.02em;
    overflow: hidden;
}

.navbar-custom .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12), 
        rgba(0, 230, 255, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #00e6ff, #00baff, #00e6ff);
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 230, 255, 0.3);
}

.navbar-custom .nav-link:hover {
    color: #ffffff !important;
    background: rgba(0, 230, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 186, 255, 0.2),
        0 3px 10px rgba(0, 230, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 8px rgba(0, 186, 255, 0.3);
}

.navbar-custom .nav-link:hover::before {
    opacity: 1;
}

.navbar-custom .nav-link:hover::after {
    width: 80%;
}

/* Active State */
.navbar-custom .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, 
        rgba(0, 230, 255, 0.2), 
        rgba(0, 186, 255, 0.15));
    font-weight: 600;
    box-shadow: 
        0 4px 15px rgba(0, 230, 255, 0.25),
        0 2px 8px rgba(0, 186, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 8px rgba(0, 230, 255, 0.4);
}

.navbar-custom .nav-link.active::after {
    width: 90%;
    background: linear-gradient(90deg, #00e6ff, #00baff, #00e6ff);
    box-shadow: 0 2px 12px rgba(0, 230, 255, 0.4);
}

/* Sign In Button */
.navbar-custom .nav-link:has(.fa-user-circle) {
    background: linear-gradient(135deg, #00d4aa, #00b894);
    color: #ffffff !important;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.25);
    margin-left: 8px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:has(.fa-user-circle):hover {
    background: linear-gradient(135deg, #00b894, #00a085);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 212, 170, 0.3),
        0 4px 12px rgba(0, 184, 148, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Mobile Toggler */
.navbar-toggler {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-toggler::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 230, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.navbar-toggler:hover::before {
    left: 100%;
}

.navbar-toggler:hover {
    background: rgba(0, 230, 255, 0.2);
    border-color: rgba(0, 230, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 186, 255, 0.2);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 230, 255, 0.3);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transition: transform 0.3s ease;
}

/* Mobile Menu Styles */
.navbar-collapse {
    background: linear-gradient(135deg, 
        rgba(0, 186, 255, 0.98), 
        rgba(0, 156, 255, 0.95));
    backdrop-filter: blur(25px);
    border-radius: 16px;
    margin-top: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 20px 40px rgba(0, 186, 255, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Carousel Specific Adjustments */
#carousel {
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
}

#carousel .carousel-inner {
    position: relative;
}

#carousel .carousel-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, 
        rgba(0, 186, 255, 0.1) 0%, 
        transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* Desktop Responsive Styles */
@media (min-width: 992px) {
    body {
        padding-top: 75px;
    }
    
    .navbar-custom {
        padding: 10px 24px;
        height: 70px;
    }
    
    .navbar-custom.scrolled {
        height: 65px;
        padding: 8px 24px;
    }

    .navbar-custom .navbar-brand {
        font-size: 1.5rem;
        padding: 8px 20px;
    }

    .navbar-custom .navbar-brand img {
        height: 42px;
        margin-right: 14px;
    }

    .navbar-custom .nav-link {
        font-size: 1rem;
        padding: 14px 20px !important;
        margin: 0 6px;
    }

    .navbar-collapse {
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        border-radius: 0;
    }

    .navbar-nav {
        display: flex;
    align-items: center;
}

    .navbar-toggler {
        display: none !important;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) and (max-width: 991px) {
    body {
        padding-top: 65px;
    }
    
    .navbar-custom {
        padding: 8px 0;
        height: 65px;
    }
    
    .navbar-custom.scrolled {
        height: 60px;
        padding: 6px 0;
    }

    .navbar-custom .container {
        padding: 0;
        margin: 0;
        max-width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .navbar-custom .navbar-brand {
        font-size: 1.2rem;
        padding: 6px 0;
        margin-left: 15px;
    }
    
    .navbar-custom .navbar-brand img {
        height: 34px;
        margin-right: 8px;
    }
    
    .navbar-custom .nav-link {
        font-size: 0.9rem;
        padding: 10px 12px !important;
        margin: 2px;
    }

    .navbar-toggler {
        margin-right: 15px;
        order: 3;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, 
            rgba(0, 186, 255, 0.98), 
            rgba(0, 156, 255, 0.95));
        padding: 15px;
        border-radius: 0 0 15px 15px;
        margin: 0;
    }

    .navbar-nav {
        padding: 10px 0;
        gap: 5px;
    }

    .nav-item {
        margin: 5px 0;
    }

    .nav-link {
        padding-left: 15px !important;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    body {
        padding-top: 60px;
    }
    
    .navbar-custom {
        padding: 6px 12px;
        height: 60px;
    }
    
    .navbar-custom.scrolled {
        height: 55px;
        padding: 4px 12px;
    }

    .navbar-custom .navbar-brand {
        font-size: 1.1rem;
        padding: 5px 8px;
    }

    .navbar-custom .navbar-brand img {
        height: 30px;
        margin-right: 8px;
    }

    .navbar-custom .nav-link {
        font-size: 0.95rem;
        padding: 12px !important;
        margin: 3px 0;
        text-align: left;
        border-radius: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-custom .nav-link:last-child {
        border-bottom: none;
    }

    .navbar-collapse {
        background: linear-gradient(135deg, 
            rgba(0, 186, 255, 0.98), 
            rgba(0, 156, 255, 0.95));
        padding: 12px;
        border-radius: 10px;
        margin-top: 5px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .navbar-nav {
        padding: 5px 0;
    }

    .navbar-toggler {
        padding: 6px 10px;
        margin-right: 5px;
    }

    /* Enhanced Mobile Navigation Links */
    .navbar-custom .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(5px);
    }

    .navbar-custom .nav-link.active {
        background: rgba(255, 255, 255, 0.15);
        border-left: 3px solid #00e6ff;
    }

    /* Sign In Button Mobile Optimization */
    .navbar-custom .nav-link:has(.fa-user-circle) {
        margin: 8px 0;
        text-align: center;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .navbar-custom .navbar-brand {
        font-size: 1rem;
    }

    .navbar-custom .navbar-brand img {
        height: 28px;
        margin-right: 6px;
    }

    .navbar-custom {
        padding: 4px 8px;
    }
}

/* Smooth Scroll Enhancement */
html {
    scroll-behavior: smooth;
}



/* Enhanced Focus States for Accessibility */
.navbar-custom .nav-link:focus {
    outline: 2px solid #00e6ff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 230, 255, 0.2);
}

.navbar-custom .navbar-brand:focus {
    outline: 2px solid #00e6ff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 230, 255, 0.2);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .navbar-custom,
    .navbar-custom .nav-link,
    .navbar-custom .navbar-brand,
    .navbar-toggler {
        transition: none;
        animation: none;
    }
    
    .navbar-custom .nav-link:hover {
        transform: none;
    }
    
    .navbar-custom .navbar-brand:hover {
        transform: none;
    }
    
    .navbar-custom.hidden,
    .navbar-custom.visible {
        transform: none;
    }
}

/* ===== ADDITIONAL ENHANCEMENTS ===== */

/* Skip Link for Accessibility */
.skip-link {
    position: absolute !important;
    top: -100px !important;
    left: 0 !important;
    background: #000 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    text-decoration: none !important;
    z-index: 9999 !important;
    font-weight: 600 !important;
    border-radius: 0 0 4px 0 !important;
    transition: top 0.3s ease !important;
}

.skip-link:focus {
    top: 0 !important;
    outline: 2px solid #00e6ff !important;
    outline-offset: 2px !important;
}

/* Improved Toggler Animation */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%) rotate(90deg);
    border-radius: 1px;
}


/* Enhanced Active Link Indicator */
.navbar-custom .nav-link.active::before {
    opacity: 1;
    background: linear-gradient(135deg, 
        rgba(0, 230, 255, 0.25), 
        rgba(0, 186, 255, 0.15));
}

/* Improved Hover States for Better UX */
.navbar-custom .nav-link:not(.active):hover {
    background: rgba(0, 230, 255, 0.12);
}

.navbar-custom .nav-link:not(.active):hover::after {
    width: 60%;
    background: linear-gradient(90deg, 
        rgba(0, 230, 255, 0.8), 
        rgba(255, 255, 255, 0.9), 
        rgba(0, 230, 255, 0.8));
}

/* Performance Optimization: GPU Acceleration */
.navbar-custom .nav-link,
.navbar-custom .navbar-brand {
    will-change: transform;
}

/* Enhanced Glow Effects for #00baff Theme */
.navbar-custom .nav-link.active {
    position: relative;
}

.navbar-custom .nav-link.active::after {
    box-shadow: 
        0 0 10px rgba(0, 230, 255, 0.6),
        0 0 20px rgba(0, 186, 255, 0.4),
        0 0 30px rgba(0, 186, 255, 0.2);
}

.navbar-custom .navbar-brand:hover {
    filter: drop-shadow(0 0 8px rgba(0, 230, 255, 0.4));
}

/* Enhanced Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .navbar-custom {
        background: linear-gradient(135deg, 
            rgba(0, 186, 255, 0.9) 0%, 
            rgba(0, 156, 255, 0.85) 30%, 
            rgba(0, 136, 255, 0.87) 70%, 
            rgba(0, 116, 255, 0.9) 100%);
        border-bottom: 1px solid rgba(0, 230, 255, 0.3);
    }
    
    .navbar-custom.scrolled {
        background: linear-gradient(135deg, 
            rgba(0, 186, 255, 0.95) 0%, 
            rgba(0, 156, 255, 0.92) 30%, 
            rgba(0, 136, 255, 0.94) 70%, 
            rgba(0, 116, 255, 0.95) 100%);
    }
}

/* Additional Visual Enhancements */
.navbar-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 230, 255, 0.6), 
        transparent);
    z-index: 1;
}

.navbar-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 230, 255, 0.4),
        transparent);
    z-index: 1;
}

/* ===== SCROLL-TO-TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #00baff, #0066cc);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 17px;
    cursor: pointer;
    z-index: 1040;
    box-shadow: 0 4px 15px rgba(0, 186, 255, 0.35);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 186, 255, 0.45);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}