:root {
    --bg-color: #1a202c;
    --text-color: #edf2f7; 
    --card-bg: #2d3748; 
    --primary-color: #4299e1; 
    --secondary-color: #00eaff;
}

body {
    background: #0E1A24;
    font-family: Arial, sans-serif;
    color: white;
    margin: 0;
}

/* ===== NAVBAR ===== */
nav {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(4, 21, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
}

nav .img {
    position: absolute;
    left: 40px;
}

.lang-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 12px 18px;
    border-radius: 14px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    width: fit-content;
    transition: all 0.3s ease;
}

.lang-box:hover {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 10px rgba(237, 233, 233, 0.829);
    transform: translateY(-5px);
}

.lang-box img {
    width: auto;
    height: 20px;
    object-fit: contain;
    border-radius: 3px; 
}

#langLabel {
    font-weight: 500;
}

/* Select disembunyikan, tapi tetap berfungsi */
#langSwitcher {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Panah dropdown */
.lang-box::after {
    content: "▼";
    position: static;
    right: 15px;
    color: white;
    font-size: 14px;
    pointer-events: none;
}

.menu-nav {
    font-size: 24px;
    padding: 20px 12px;
}

nav a {
    color: #cfd9e8;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    position: relative;
    transition: 0.3s;
}

.menu-nav a.highlight {
    background: rgba(88, 166, 255, 0.12);
    color: var(--primary-color);
    border-radius: 8px;
    outline: none;
}

.menu-nav a:focus {
    outline: none;
}

nav a:hover {
    color: #58a6ff;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #58a6ff;
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
}

nav a:hover::after {
    width: 100%;
    opacity: 1;
    visibility: visible;
}

.portfolio-header {
    text-align: center;
    padding: 100px 20px 40px;
    margin-top: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.controls-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.controls-container:hover {
    transform: translateY(-2px);
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 30px;
    border: 2px solid var(--card-bg);
    border-radius: 50px;
    background-color: rgba(45, 55, 72, 0.8);
    color: var(--text-color);
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18, 50, 77, 0.2);
    transform: translateY(-2px);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    opacity: 1;
    position: relative;
    overflow: hidden;
}

.filter-btn:nth-child(1) { animation: fadeIn 0.5s ease 0.3s forwards; }
.filter-btn:nth-child(2) { animation: fadeIn 0.5s ease 0.4s forwards; }
.filter-btn:nth-child(3) { animation: fadeIn 0.5s ease 0.5s forwards; }

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.filter-btn.active::after {
    width: 80%;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(88, 166, 255, 0.2);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.portfolio-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: fadeInUp 0.8s ease forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.3s; }
.portfolio-item:nth-child(2) { animation-delay: 0.4s; }
.portfolio-item:nth-child(3) { animation-delay: 0.5s; }
.portfolio-item:nth-child(4) { animation-delay: 0.6s; }
.portfolio-item:nth-child(5) { animation-delay: 0.7s; }
.portfolio-item:nth-child(6) { animation-delay: 0.8s; }

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(88, 166, 255, 0.3);
}

.item-image {
    width: auto;
    height: auto;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .item-image {
    transform: scale(1.05);
}

.item-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title {
    font-size: 1.4em;
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.item-category {
    display: inline-block;
    font-size: 0.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    background: rgba(66, 153, 225, 0.1);
    border-radius: 20px;
}

.item-content p {
    color: #cbd5e0;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.item-actions {
    margin-top: auto;
}

.item-actions a {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-view {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 10px 15px 10px 15px;
    border-radius: 20px;
    text-decoration: none;
}

.btn-view:hover {
    background-color: var(--primary-color);
    color: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(66, 153, 225, 0.3);
    transform: translateY(-2px);
}

.btn-visit-video {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 10px 15px 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-color)
}

.btn-visit-video:hover {
    background-color: var(--primary-color);
    color: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(66, 153, 225, 0.3);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 60px 20px;
    background: #081c31;
    font-size: 14px;
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

.container-footer {
    max-width: 1200px;
    margin: 0 auto;
}

.footer a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #00eaff;
    text-decoration: underline;
}

.socialmedia {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
}

.socialmedia a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(88, 166, 255, 0.1);
    transition: all 0.3s ease;
}

.socialmedia a:hover {
    background: rgba(88, 166, 255, 0.3);
    transform: translateY(-5px) scale(1.1);
}

.socialmedia svg {
    width: 20px;
    height: 20px;
    fill: #58a6ff;
    transition: fill 0.3s ease;
}

.socialmedia a:hover svg {
    fill: #00eaff;
}

.copyright {
    margin-top: 20px;
    opacity: 0.7;
    font-size: 13px;
    text-align: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    padding: 10px;
    background: none;
    border: none;
}

.hamburger span {
    width: 30px;
    height: 3.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
   position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 3s ease, visibility 2s ease;
}

.loading-content {
text-align: center;
color: white;
}
        
        .loader {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            margin: 0 auto 20px;
        }
        
        .loading-text {
            font-size: 1.5rem;
            opacity: 0.8;
            animation: pulse 1.5s ease-in-out infinite;
        }


/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
   .hamburger {
    display: flex;
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
  }

    .menu {
        position: fixed;
        top: 70px; 
        right: 20px;
        width: 100%;
        background: rgba(17, 17, 17, 0.95);


    .menu a.highlight {
      background: rgba(88, 166, 255, 0.12);
      color: var(--secondary-color);
      border-radius: 8px;
      outline: none;
    }

    .menu a:focus {
      outline: none;
    }
        backdrop-filter: blur(10px);
        flex-direction: column;
        text-align: center;
        padding: 0;
        gap: 18px;
        box-sizing: border-box;
        z-index: 998;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.5s ease;
        display: flex; 
    }
    
 
    .menu.active {
        max-height: 500px;
        padding: 20px 0;
        opacity: 1;
        text-align: center;
    }
    

    .menu a {
        font-size: 16px;
        padding: 12px 0;
        display: block;
        width: 100%;
        text-align: center;
        color: #cfd9e8;
    }
    
    .menu a:hover {
        background: rgba(88, 166, 255, 0.1);
    }
    

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    .menu-overlay {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100% - 70px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 997;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Portfolio Header */
    .portfolio-header {
        padding: 90px 15px 30px;
    }
    
    /* Controls */
    .controls-container {
        padding: 0 15px;
        margin-bottom: 30px;
    }
    
    /* Filter Buttons */
    .filter-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .item-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}
    
    /* Portfolio Grid */
    .portfolio-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 15px;
    }
    
    .socialmedia {
        gap: 15px;
    }
    
    .copyright {
        font-size: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .item-image {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    body {
    overflow-x: hidden;
  }

  section {
    padding: 60px 14px;
  }

  /* ===== NAVBAR ===== */
  nav {
    height: 64px;
    padding: 0 12px;
  }

  nav a {
    margin-left: 0;
    font-size: 15px;
  }

  /* ===== LANGUAGE SWITCH ===== */
  .lang-box {
    padding: 8px 12px;
    gap: 8px;
    font-size: 13px;
  }

  .lang-box img {
    height: 16px;
  }
}
