/* === GLOBAL RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a0a0a;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden; /* Mencegah scroll horizontal di HP */
}

a { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* === NAVBAR (Consolidated) === */
header {
    background-color: #000;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #ff3c3c;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%; /* Gunakan persen agar aman di semua layar */
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px; /* Ukuran konsisten */
    width: auto;
}

/* Navigasi Desktop */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links li a {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #ff3c3c;
}

/* Tombol Hamburger (Mobile) */
.menu-toggle {
    display: none; /* Sembunyi di desktop */
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

/* === HERO SECTION (Index) === */
.hero {
    height: 90vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('../img/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3rem); /* Ukuran font responsif */
    color: #ff3c3c;
    margin-bottom: 15px;
}

.btn-secondary {
    background-color: #ff3c3c;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 15px;
}

/* === CONTENT GENERAL (About, Program) === */
.content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.content h1 {
    color: #ff3c3c;
    border-left: 4px solid #ff3c3c;
    padding-left: 15px;
    margin-bottom: 20px;
}

/* Team & Program Grid */
.team, .program-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.member {
    background: #141414;
    padding: 20px;
    border-radius: 10px;
    width: 250px; /* Lebar kartu fix tapi fleksibel di grid */
    text-align: center;
}

/* === GALLERY GRID === */
.galeri-header { text-align: center; margin: 40px 0; color: #ff3c3c; }

.filter-buttons { text-align: center; margin-bottom: 30px; }
.filter-buttons button {
    background: none;
    border: 1px solid #ff3c3c;
    color: #ff3c3c;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 20px;
    cursor: pointer;
}
.filter-buttons button.active { background: #ff3c3c; color: #fff; }

.galeri-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Auto Responsive Grid */
    gap: 15px;
    padding: 0 5%;
}

.galeri-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.galeri-item:hover img { transform: scale(1.05); }

/* === FORM (Register) === */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background: #111;
    border: 1px solid #ff3c3c;
    border-radius: 10px;
}
.form-container input, .form-container button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
}
.form-container button {
    background: #ff3c3c; border: none; color: white; font-weight: bold; cursor: pointer;
}

/* === FOOTER === */
footer {
    background: #000;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #888;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE KHUSUS MOBILE)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar Mobile */
    .menu-toggle {
        display: block; /* Munculkan hamburger */
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #000;
        flex-direction: column; /* Menu jadi vertikal */
        align-items: center;
        padding: 20px 0;
        border-top: 1px solid #333;
        
        /* Animasi Slide */
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    /* Class untuk menampilkan menu via JS */
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Penyesuaian Program Item */
    .program-item, .program-item.reverse {
        flex-direction: column; /* Gambar di atas, teks di bawah */
    }
    
    .program-item img, .program-info {
        width: 100%;
    }

    /* Penyesuaian Galeri */
    .galeri-container {
        grid-template-columns: repeat(2, 1fr); /* 2 Kolom di Tablet/HP besar */
    }
}

@media (max-width: 480px) {
    .galeri-container {
        grid-template-columns: 1fr; /* 1 Kolom di HP kecil */
    }
    
    .logo h1 { font-size: 1rem; } /* Kecilkan font logo */
}

/* === TAMBAHKAN/TIMPA INI DI style.css ANDA === */

/* Reset Dasar */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background-color: #0a0a0a; color: #fff; }

/* Navbar Styling */
header {
    background-color: #000;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #ff3c3c;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img { height: 40px; width: auto; }

.nav-links { list-style: none; display: flex; gap: 20px; align-items: center; }
.nav-links a { text-decoration: none; color: #fff; font-size: 16px; transition: 0.3s; }
.nav-links a:hover { color: #ff3c3c; }

/* Tombol Gabung Spesial */
.active-btn {
    background-color: #ff3c3c;
    padding: 8px 20px;
    border-radius: 5px;
    color: #fff !important;
    font-weight: bold;
}

/* Hamburger Menu (Default Hidden di Desktop) */
.menu-toggle { display: none; font-size: 28px; cursor: pointer; color: #ff3c3c; }

/* === STYLE KHUSUS HALAMAN REGISTER === */
.container-register {
    padding: 20px;
    min-height: 80vh; /* Agar footer tidak naik ke tengah */
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-wrapper {
    background-color: #111;
    border: 1px solid #ff3c3c;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 0 15px rgba(255, 60, 60, 0.2);
}

.form-wrapper h2 {
    color: #ff3c3c;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; color: #ddd; }
.input-group input {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    outline: none;
}
.input-group input:focus { border-color: #ff3c3c; }

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #ff3c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}
.submit-btn:hover { background-color: #d12c2c; }

/* Footer */
footer { text-align: center; padding: 20px; color: #666; font-size: 14px; }

/* === MOBILE RESPONSIVE (FIX UNTUK SCREENSHOT ANDA) === */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Tampilkan tombol hamburger */
    }

    .nav-links {
        position: absolute;
        top: 100%; /* Turun persis di bawah header */
        right: 0;
        width: 100%;
        background-color: #000;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        border-bottom: 2px solid #ff3c3c;
        
        /* Sembunyikan menu secara default */
        display: none; 
    }

    /* Class ini dipanggil oleh Javascript saat diklik */
    .nav-links.active {
        display: flex; 
    }

    .nav-links li { margin: 10px 0; }
    
    .form-wrapper {
        padding: 20px;
        margin-top: 20px;
    }
}

/* =========================================
   FLOATING ACTION BUTTON (FAB) & CHAT AI
   ========================================= */

/* Container FAB di pojok kanan bawah */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 15px;
}

/* Tombol Utama (Main FAB) */
.fab-main {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff3c3c, #b30000);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 60, 60, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.2);
}

.fab-main:hover {
    transform: scale(1.1);
}

.fab-main.active {
    transform: rotate(45deg); /* Efek putar saat diklik */
    background: #333;
}

/* Sub Tombol (Chat AI) */
.fab-sub {
    width: 50px;
    height: 50px;
    background-color: #1a1a1a;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ff3c3c;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(0);
    transition: all 0.3s ease;
    pointer-events: none; /* Tidak bisa diklik kalau sembunyi */
    border: 1px solid #ff3c3c;
    position: relative;
}

/* Tooltip untuk Sub FAB */
.fab-sub::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.fab-sub:hover::after {
    opacity: 1;
}

/* Tampilkan Sub FAB saat Main FAB aktif */
.fab-container.open .fab-sub {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ============================
   TAMPILAN JENDELA CHAT AI
   ============================ */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px); /* Efek kaca */
    border: 1px solid #ff3c3c;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    /* Animasi Masuk */
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Header Chat */
.chat-header {
    background: linear-gradient(90deg, #ff3c3c, #b30000);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chat-close {
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s;
}
.chat-close:hover { transform: scale(1.2); }

/* Body Chat (Tempat Pesan) */
.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ff3c3c #111;
}

/* Gaya Pesan */
.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.message.ai {
    background: #333;
    color: #eee;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #444;
}

.message.user {
    background: #ff3c3c;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(255, 60, 60, 0.3);
}

/* Footer Chat (Input) */
.chat-footer {
    padding: 10px;
    background: #111;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: #222;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 20px;
    color: white;
    outline: none;
}
.chat-input:focus { border-color: #ff3c3c; }

.chat-send {
    background: #ff3c3c;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.chat-send:hover { background: #ff5555; transform: scale(1.1); }
.chat-send:disabled { background: #555; cursor: not-allowed; }

/* Typing Indicator */
.typing {
    font-style: italic;
    font-size: 12px;
    color: #888;
    margin-left: 10px;
    margin-bottom: 5px;
    display: none;
}

/* Responsive Mobile */
@media (max-width: 480px) {
    .chat-window {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 80vh; /* Full screen agak bawah */
        border-radius: 20px 20px 0 0;
    }
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
