/* =========================================
   1. VARIABLES & RESET (Nusa Theme)
   ========================================= */
:root {
    /* Brand Colors */
    --nusa-red: #d71920;      /* Your Brand Color */
    --nusa-dark: #0f0f10;     /* Deep Black/Grey (Main BG) */
    --nusa-grey: #1a1a1d;     /* Card Background */
    --text-main: #e0e0e0;     /* Main Text Color */
    --text-muted: #888888;    /* Secondary Text */
    
    /* Effects */
    --neon-glow: 0 0 10px rgba(215, 25, 32, 0.5);
    
    /* Layout Dimensions */
    --sidebar-width: 280px;
    --nav-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--nusa-dark);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* =========================================
   2. PUBLIC NAVIGATION & HEADER (UPDATED)
   ========================================= */

/* --- A. TOP BAR (Info Kontak di Atas) --- */
.top-bar {
    background-color: #050505;
    height: 40px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #222;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    transition: margin-top 0.4s ease; /* Animasi Hide */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
}

.top-bar.hide {
    margin-top: -40px; /* Menyembunyikan topbar ke atas saat scroll */
}

.container-fluid {
    width: 100%;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
}

.tb-contact a { color: #888; margin-right: 15px; text-decoration: none; transition: 0.3s; }
.tb-contact a:hover { color: var(--nusa-red); }
.tb-social a { color: #888; margin-left: 15px; }
.tb-social a:hover { color: white; }
.separator { color: #333; margin-right: 15px; }

/* --- B. MAIN NAVIGATION BAR (Glassmorphism) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--nav-height);
    
    /* Konsep Glassmorphism */
    background: rgba(15, 15, 16, 0.85); /* Semi transparan */
    backdrop-filter: blur(12px); /* Efek Blur di belakang */
    -webkit-backdrop-filter: blur(12px);
    
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 40px; /* Di bawah Top Bar */
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
}

/* Tekstur Grid Halus (Carbon Effect) */
.nav-texture {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Pola titik-titik halus */
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1; 
    z-index: -1;
    pointer-events: none;
}

/* State saat di-Scroll (Header Mengecil & Rapi) */
nav.scrolled {
    top: 0; /* Naik ke paling atas karena TopBar hilang */
    height: 70px; /* Sedikit lebih pendek */
    background: rgba(10, 10, 12, 0.95); /* Lebih gelap/solid */
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid var(--nusa-red); /* Aksen Merah muncul */
}

/* Spacer agar konten tidak tertutup header fixed */
.nav-spacer { height: 120px; background: #0f0f10; }

/* --- C. BRAND / LOGO STYLING --- */
.brand {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}

.brand a {
    color: white;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(0,0,0,0.5); 
}

.brand span { color: var(--nusa-red); }

/* Efek "Spotlight" di belakang Logo */
.brand::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(215, 25, 32, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(10px);
}

/* --- D. NAVIGATION LINKS --- */
.nav-links { display: flex; align-items: center; height: 100%; }

.nav-links > a, .dropbtn {
    text-decoration: none;
    color: #ccc; 
    margin-left: 35px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center; 
    cursor: pointer;
    height: 100%;
}

/* Hover Effect: Text turns white, small red line appears below */
.nav-links > a:hover, .nav-links > a.active, .dropbtn:hover, .dropbtn.active {
    color: white;
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.nav-links > a::after, .dropbtn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--nusa-red);
    transition: width 0.3s;
}

.nav-links > a:hover::after, .nav-links > a.active::after, .dropbtn:hover::after {
    width: 100%;
}

/* --- E. DROPDOWN MENU --- */
.dropdown { position: relative; height: 100%; display: flex; align-items: center; }

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #151518;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.8);
    z-index: 1000;
    top: 70px; /* Disesuaikan dengan tinggi header baru */
    left: 20px;
    border-top: 3px solid var(--nusa-red);
    border-radius: 0 0 4px 4px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: #b0b0b0;
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid #222;
    transition: 0.2s;
    height: auto; /* Reset height for dropdown items */
}

.dropdown-content a:hover {
    background-color: #202024;
    color: var(--nusa-red);
    padding-left: 25px;
}
.dropdown:hover .dropdown-content { display: block; }

/* Hamburger Menu (Mobile) */
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 3px; background-color: white; margin: 5px; transition: 0.3s; }

/* =========================================
   3. HOMEPAGE & PUBLIC SECTIONS
   ========================================= */
/* Split Screen */
.split-container {
    display: flex;
    width: 100%;
    height: calc(100vh - var(--nav-height)); /* Adjusted calculation slightly */
    min-height: 600px;
    overflow: hidden;
    background: #000;
}

.split {
    position: relative;
    width: 50%;
    height: 100%;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
}

.split::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.4);
    transition: 0.6s;
    z-index: 0;
}

.split:hover { width: 75%; }
.split:hover::before { filter: grayscale(0%) brightness(0.8); transform: scale(1.05); }
.split-container:hover .split:not(:hover) { width: 25%; }

.split-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 80%;
    transition: 0.4s;
}

.split h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
    white-space: nowrap;
}

.split p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s 0.1s;
}

.split:hover p { opacity: 1; transform: translateY(0); }

.btn-ghost {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    border: 2px solid var(--nusa-red);
    color: white;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s 0.2s;
}

.split:hover .btn-ghost { opacity: 1; transform: translateY(0); background: var(--nusa-red); }

/* General Layout Helpers */
.container { padding: 80px 5%; flex: 1; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}
.section-header h2 { font-family: 'Oswald'; font-size: 2.5rem; text-transform: uppercase; color: white; }
.section-header a { color: var(--nusa-red); text-decoration: none; font-family: 'Rajdhani'; font-weight: bold; }

/* Cards & Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--nusa-grey);
    padding: 30px;
    border: 1px solid #333;
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--nusa-red); }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.testi-card {
    background: #151518;
    padding: 30px;
    border-left: 3px solid #333;
    position: relative;
    transition: 0.3s;
}
.testi-card:hover {
    border-left-color: var(--nusa-red);
    background: #1a1a1d;
    transform: translateX(5px);
}

.quote-icon { font-size: 2rem; color: var(--nusa-red); opacity: 0.3; margin-bottom: 15px; }
.client-info { display: flex; align-items: center; margin-top: 20px; border-top: 1px solid #333; padding-top: 15px; }
.client-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-right: 15px; border: 2px solid #555; }

/* Articles */
.article-card {
    background: var(--nusa-grey);
    border: 1px solid #2a2a2d;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.article-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    transition: 0.3s;
}
.article-card:hover .article-img { filter: grayscale(0%); }
.article-content { padding: 20px; }
.article-date { font-size: 0.8rem; color: var(--nusa-red); font-family: 'Rajdhani'; }
.article-title { margin: 10px 0; font-family: 'Oswald'; font-size: 1.2rem; color: white; }

/* Instagram Feed */
.insta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.insta-card { background: #000; border: 1px solid #333; border-radius: 8px; overflow: hidden; }
.insta-header { padding: 10px; display: flex; align-items: center; font-size: 0.9rem; font-weight: bold; color: white; }
.insta-img { width: 100%; height: 250px; object-fit: cover; }
.insta-footer { padding: 10px; color: #ccc; }
.insta-actions i { margin-right: 15px; font-size: 1.2rem; cursor: pointer; transition: 0.2s; }
.insta-actions i:hover { color: var(--nusa-red); }

/* Footer */
footer {
    background: #050505;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #222;
    margin-top: auto;
    font-family: 'Rajdhani', sans-serif;
    color: #555;
}

/* =========================================
   4. ADMIN DASHBOARD & LOGIN
   ========================================= */

/* --- ADMIN LOGIN PAGE --- */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--nusa-dark);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 4px;
    background: var(--nusa-grey); 
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-card h3 {
    font-family: 'Oswald', sans-serif;
    color: white;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--nusa-red);
    display: inline-block;
    padding-bottom: 5px;
}

.login-card label {
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
}

.login-card .form-control {
    background-color: #0f0f10;
    border: 1px solid #333;
    color: white;
}

.login-card .form-control:focus {
    background-color: #0f0f10;
    border-color: var(--nusa-red);
    box-shadow: 0 0 5px rgba(215, 25, 32, 0.3);
    color: white;
}

.login-card .btn-primary {
    background-color: var(--nusa-red);
    border: none;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 10px;
    transition: 0.3s;
}

.login-card .btn-primary:hover {
    background-color: #b01217;
    box-shadow: var(--neon-glow);
}

/* --- ADMIN DASHBOARD LAYOUT --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Admin Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #050505; 
    border-right: 1px solid #222;
    min-height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar .brand {
    text-align: center;
    margin-bottom: 40px;
    display: block;
}

.sidebar hr { border-color: #333; }

.sidebar .nav-link {
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i { margin-right: 10px; }

.sidebar .nav-link:hover {
    background-color: #1a1a1d;
    color: white;
    border-left: 3px solid var(--nusa-red);
}

.sidebar .nav-link.active {
    background-color: var(--nusa-red);
    color: white;
    box-shadow: var(--neon-glow);
}

/* Admin Main Content */
.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: var(--nusa-dark);
    overflow-y: auto;
}

.main-content h1 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: white;
    border-left: 5px solid var(--nusa-red);
    padding-left: 20px;
}

/* Admin Stat Cards */
.stat-card {
    background: var(--nusa-grey);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--nusa-red);
}

.stat-card h5 {
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.stat-card h2 {
    font-family: 'Oswald', sans-serif;
    color: white;
    font-size: 2.5rem;
    margin-top: 10px;
}

/* Dropdown User Menu in Sidebar */
.dropdown-menu-dark {
    background-color: var(--nusa-grey);
    border: 1px solid #333;
}
.dropdown-menu-dark .dropdown-item { color: var(--text-main); }
.dropdown-menu-dark .dropdown-item:hover { background-color: var(--nusa-red); color: white; }
.dropdown-divider { border-color: #333; }

/* =========================================
   5. MOBILE RESPONSIVE
   ========================================= */
@media(max-width: 768px) {
    /* Hide Top Bar on Mobile */
    .top-bar { display: none; }
    
    /* Reset Nav Position for Mobile */
    nav { top: 0; height: 70px; }
    
    /* Homepage */
    .split-container { flex-direction: column; height: auto; }
    .split { width: 100% !important; height: 50vh; }
    
    /* Hide desktop nav links, show burger */
    .nav-links { display: none; } 
    .burger { display: block; }

    /* Admin Panel */
    .admin-wrapper { flex-direction: column; }
    .sidebar { width: 100%; min-height: auto; height: auto; border-right: none; border-bottom: 1px solid #333; }
    .main-content { padding: 15px; }
}