/* css/layout.css - FINAL FIXED VERSION */

/* --- HEADER & NAV --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    /* Pastikan tinggi header konsisten untuk perhitungan scroll */
    height: 80px; 
    display: flex;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo Styling */
.logo {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1001; /* Agar logo tetap di atas overlay menu mobile */
}

.logo-icon {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
    position: relative;
    animation: logo-rotate 10s linear infinite;
}

@keyframes logo-rotate {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

/* Desktop Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    display: block;
}

.nav-links a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.nav-links a:hover::before {
    width: 100%;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none; /* Hidden on Desktop */
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 1002; /* Di atas overlay menu */
}

/* --- BUTTONS --- */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.7);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* --- SECTIONS GENERAL --- */
section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    width: 100%;
}

/* --- FOOTER --- */
footer {
    background: rgba(10, 10, 15, 0.9);
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.footer-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* =========================================
   MOBILE RESPONSIVE NAVIGATION (THE FIX)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar Toggle Visible */
    .menu-toggle {
        display: block;
    }

    /* Styling Mobile Menu Overlay */
    .nav-links {
        position: fixed;
        /* Mulai tepat di bawah header (80px) */
        top: 80px; 
        left: -100%; /* Sembunyi di kiri */
        width: 100%;
        height: calc(100vh - 80px); /* Penuhi sisa layar */
        
        /* Background Solid Gelap agar teks terbaca jelas */
        background: rgba(5, 5, 8, 0.98); 
        backdrop-filter: blur(15px);
        
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        gap: 1.5rem;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Class active ditambahkan oleh JS saat diklik */
    .nav-links.active {
        left: 0;
    }

    /* Styling Link di Mobile */
    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0; /* Animasi fade in */
        transform: translateY(20px);
        animation: slideIn 0.5s forwards;
        animation-delay: 0.2s; /* Delay biar smooth */
    }
    
    /* Animasi Link Muncul satu per satu (manual delay sederhana) */
    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { animation-delay: 0.35s; }
    .nav-links.active li:nth-child(7) { animation-delay: 0.4s; }

    @keyframes slideIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links a {
        font-size: 1.4rem; /* Ukuran lebih besar untuk jari */
        padding: 1rem 0;
        display: block;
        width: 80%;
        margin: 0 auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
    }

    /* Section Title Mobile */
    .section-title {
        font-size: 2rem;
    }
}