/**
 * Custom Navigation Styles
 * Plugin: Custom Navigasi
 * Version: 1.0.0
 */

/* ==============================================
   CUSTOM NAVIGATION - WordPress Plugin CSS
   ============================================== */

/* Wrapper utama - isolasi styling */
.custom-nav-wrapper {
    /* Reset local dalam wrapper */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
}

/* Header dengan scope yang aman */
.custom-nav-wrapper .custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 3px solid #FFC300;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    will-change: background-color, backdrop-filter;
}

.custom-nav-wrapper .custom-header.scrolled {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-nav-wrapper .custom-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

/* Logo dengan nama unik */
.custom-nav-wrapper .custom-brand-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    letter-spacing: 2px;
    transition: transform 0.2s ease, color 0.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.custom-nav-wrapper .custom-brand-logo:hover {
    transform: scale(1.05);
    color: #ff6b6b;
}

/* Hamburger dengan nama unik */
.custom-nav-wrapper .custom-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    will-change: transform, background-color;
}

.custom-nav-wrapper .custom-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.custom-nav-wrapper .custom-menu-toggle:active {
    transform: scale(0.95);
}

/* Hamburger lines dengan scope */
.custom-nav-wrapper .custom-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    position: relative;
    opacity: 1;
}

.custom-nav-wrapper .custom-menu-toggle span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    z-index: 1;
}

/* Active states */
.custom-nav-wrapper .custom-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #ff6b6b;
}

.custom-nav-wrapper .custom-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.custom-nav-wrapper .custom-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #ff6b6b;
}

/* Fullscreen menu dengan scope */
.custom-nav-wrapper .custom-fullscreen-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    will-change: transform, opacity;
}

.custom-nav-wrapper .custom-fullscreen-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu navigation dengan scope */
.custom-nav-wrapper .custom-menu-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.custom-nav-wrapper .custom-menu-nav .custom-nav-item {
    list-style: none;
    position: relative;
}

.custom-nav-wrapper .custom-menu-nav .custom-nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 2.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    will-change: transform, opacity;
}

.custom-nav-wrapper .custom-fullscreen-menu.active .custom-nav-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations */
.custom-nav-wrapper .custom-menu-nav .custom-nav-item:nth-child(1) .custom-nav-link { 
    transition-delay: 0.05s; 
}
.custom-nav-wrapper .custom-menu-nav .custom-nav-item:nth-child(2) .custom-nav-link { 
    transition-delay: 0.1s; 
}
.custom-nav-wrapper .custom-menu-nav .custom-nav-item:nth-child(3) .custom-nav-link { 
    transition-delay: 0.15s; 
}
.custom-nav-wrapper .custom-menu-nav .custom-nav-item:nth-child(4) .custom-nav-link { 
    transition-delay: 0.2s; 
}
.custom-nav-wrapper .custom-menu-nav .custom-nav-item:nth-child(5) .custom-nav-link { 
    transition-delay: 0.25s; 
}

.custom-nav-wrapper .custom-menu-nav .custom-nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    transition: width 0.3s ease;
}

.custom-nav-wrapper .custom-menu-nav .custom-nav-link:hover {
    color: #ff6b6b;
    transform: translateY(-3px);
}

.custom-nav-wrapper .custom-menu-nav .custom-nav-link:hover::after {
    width: 100%;
}

/* Dropdown dengan scope */
.custom-nav-wrapper .custom-dropdown {
    position: relative;
}

.custom-nav-wrapper .custom-dropdown-content {
    display: none;
    margin-top: 1rem;
    text-align: center;
    list-style: none;
}

.custom-nav-wrapper .custom-dropdown.active .custom-dropdown-content {
    display: block;
}

.custom-nav-wrapper .custom-dropdown-item {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 1px;
    margin: 0.6rem 0;
    padding: 0.3rem 0;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(15px);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
    will-change: transform, opacity;
}

.custom-nav-wrapper .custom-dropdown.active .custom-dropdown-item {
    opacity: 1;
    transform: translateY(0);
}

.custom-nav-wrapper .custom-dropdown.active .custom-dropdown-item:nth-child(1) { 
    transition-delay: 0.05s; 
}
.custom-nav-wrapper .custom-dropdown.active .custom-dropdown-item:nth-child(2) { 
    transition-delay: 0.1s; 
}
.custom-nav-wrapper .custom-dropdown.active .custom-dropdown-item:nth-child(3) { 
    transition-delay: 0.15s; 
}
.custom-nav-wrapper .custom-dropdown.active .custom-dropdown-item:nth-child(4) { 
    transition-delay: 0.2s; 
}

.custom-nav-wrapper .custom-dropdown-item:hover {
    color: #4ecdc4;
    transform: translateX(8px);
}

/* CTA Button dengan scope */
.custom-nav-wrapper .custom-menu-cta {
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    will-change: transform, opacity;
}

.custom-nav-wrapper .custom-fullscreen-menu.active .custom-menu-cta {
    opacity: 1;
    transform: translateY(0);
}

.custom-nav-wrapper .custom-cta-button {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

.custom-nav-wrapper .custom-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.custom-nav-wrapper .custom-cta-button:hover::before {
    left: 100%;
}

.custom-nav-wrapper .custom-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.custom-nav-wrapper .custom-cta-button:active {
    transform: translateY(0);
}

/* Responsive dengan scope */
@media (max-width: 768px) {
    .custom-nav-wrapper .custom-nav-container {
        padding: 0.8rem 1rem;
    }
    
    .custom-nav-wrapper .custom-brand-logo {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .custom-nav-wrapper .custom-menu-toggle {
        width: 46px;
        height: 46px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .custom-nav-wrapper .custom-menu-toggle span {
        width: 26px;
        height: 3px;
        margin: 3.5px 0;
        background: #ffffff !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    .custom-nav-wrapper .custom-menu-nav .custom-nav-link {
        font-size: 1.8rem;
    }
    
    .custom-nav-wrapper .custom-fullscreen-menu {
        top: 0;
        height: 100vh;
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }
}

@media (max-width: 480px) {
    .custom-nav-wrapper .custom-nav-container {
        padding: 0.6rem 0.8rem;
    }
    
    .custom-nav-wrapper .custom-brand-logo {
        font-size: 1.2rem;
    }
    
    .custom-nav-wrapper .custom-menu-toggle {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
    
    .custom-nav-wrapper .custom-menu-toggle span {
        width: 24px;
        height: 3px;
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    }
    
    .custom-nav-wrapper .custom-menu-nav .custom-nav-link {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .custom-nav-wrapper .custom-dropdown-item {
        font-size: 1rem;
    }
    
    .custom-nav-wrapper .custom-cta-button {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }
    
    .custom-nav-wrapper .custom-fullscreen-menu {
        top: 0;
        height: 100vh;
        padding-top: 60px;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.custom-nav-item {
    opacity: 0;
}
.custom-fullscreen-menu.active .custom-nav-item {
    opacity: 1;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .custom-nav-wrapper *,
    .custom-nav-wrapper *::before,
    .custom-nav-wrapper *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}