/* == Variabel Warna Berdasarkan UNPAM PMB == */
:root {
    --color-primary: #0B0344;     /* Biru Tua UNPAM */
    --color-secondary: #D4AF37;   /* Kuning Emas/Krem untuk Aksen */
    --color-text-dark: #333333;   /* Abu-abu Gelap */
    --color-text-light: #FFFFFF;
    --color-bg-light: #F8F8F8;   /* Abu-abu Sangat Muda */
    --color-bg-white: #FFFFFF;
    --color-footer: #222222;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    --border-radius: 10px;
}

/* == Pengaturan Dasar & Tipografi == */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Gunakan font lokal */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/vendor/google-fonts/poppins-v20-latin-regular.woff2) format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/vendor/google-fonts/poppins-v20-latin-600.woff2) format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/vendor/google-fonts/poppins-v20-latin-700.woff2) format('woff2');
}

body { font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.7; color: var(--color-text-dark); background-color: var(--color-bg-white); }
h1, h2, h3, h4 { margin-bottom: 1rem; line-height: 1.3; color: var(--color-primary); }
h1 { font-size: 3.8rem; color: var(--color-text-light); }
h2 { font-size: 2.8rem; text-align: center; margin-bottom: 3.5rem; color: var(--color-primary); }
h3 { font-size: 1.8rem; color: var(--color-primary); }
p { margin-bottom: 1.2rem; font-size: 1.1rem; }
section { padding: 6rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* == Tombol (Call to Action) == */
.btn { display: inline-block; padding: 1rem 2.2rem; border-radius: 5px; text-decoration: none; font-weight: bold; transition: all 0.3s ease; cursor: pointer; border: none; margin: 0.8rem 0; font-size: 1.1rem; text-transform: uppercase; }
.btn-primary { background-color: var(--color-secondary); color: var(--color-text-dark); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-primary:hover { background-color: #C2A02E; transform: translateY(-3px); }
.btn-secondary { background-color: transparent; color: var(--color-text-light); border: 2px solid var(--color-text-light); margin-left: 1.5rem; }
.btn-secondary:hover { background-color: var(--color-text-light); color: var(--color-primary); border: 2px solid var(--color-text-light); }

/* == Header / Navigasi == */
/* [PERBAIKAN] Padding horizontal dikurangi menjadi 1.25rem (20px) */
.navbar { background: var(--color-bg-white); padding: 0.8rem 1.20rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.navbar .logo { font-size: 1.5rem; font-weight: bold; color: var(--color-primary); display: flex; align-items: center; }
/* [PERBAIKAN] Ukuran logo diperkecil */
.navbar .logo img { height: 40px; margin-right: 10px; } 
.navbar nav ul { list-style: none; display: flex; }
.navbar nav ul li { margin-left: 2rem; }
.navbar nav ul li a { text-decoration: none; color: var(--color-text-dark); font-weight: 600; transition: color 0.3s ease; }
.navbar nav ul li a:hover { color: var(--color-primary); }

/* Tombol Toggler Hamburger */
.navbar-toggler {
    display: none; /* Sembunyikan di desktop */
    background: none;
    border: 2px solid var(--color-primary);
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* == 1. Hero Section == */
.hero { background: var(--color-primary); color: var(--color-text-light); text-align: center; padding: 8rem 2rem; background-size: cover; background-position: center; }
.hero h1 { margin-bottom: 1.5rem; font-size: 4.5rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); }
.hero p { font-size: 1.4rem; max-width: 700px; margin: 0 auto 2.5rem auto; opacity: 0.95; color: #f0f0f0; }

/* == Bagian Lainnya (Features, Steps, dll.) == */
.features { background-color: var(--color-bg-light); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.feature-item { background: var(--color-bg-white); padding: 3rem 2.5rem; border-radius: 10px; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.feature-item:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.12); }
.feature-item .icon { font-size: 3.5rem; color: var(--color-primary); margin-bottom: 1.5rem; }
.feature-item h3 { color: var(--color-text-dark); }
.how-it-works { background-color: var(--color-bg-white); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; text-align: center; }
.step-item .step-number { font-size: 2.8rem; font-weight: bold; color: var(--color-secondary); background: #fff; border: 3px solid var(--color-secondary); border-radius: 50%; width: 80px; height: 80px; line-height: 74px; margin: 0 auto 1.8rem auto; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.step-item h3 { color: var(--color-text-dark); }
.testimonials { background-color: var(--color-bg-light); }
.testimonial-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.testimonial-item { background: var(--color-bg-white); padding: 2.5rem; border-radius: 10px; border-left: 6px solid var(--color-primary); box-shadow: 0 6px 15px rgba(0,0,0,0.08); }
.testimonial-item p { font-style: italic; font-size: 1.15rem; margin-bottom: 1.5rem; color: var(--color-text-dark); }
.testimonial-item h4 { text-align: right; color: var(--color-primary); font-weight: 700; font-size: 1.2rem; }
.cta-final { background: var(--color-primary); color: var(--color-text-light); text-align: center; padding: 7rem 2rem; }
.cta-final h2 { color: var(--color-text-light); margin-bottom: 2rem; font-size: 3.2rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); }
.cta-final p { font-size: 1.3rem; max-width: 600px; margin: 0 auto 2.5rem auto; color: #f0f0f0; }
.cta-final .btn-primary { background-color: var(--color-secondary); color: var(--color-text-dark); }
.cta-final .btn-primary:hover { background-color: #C2A02E; }
.footer { background-color: var(--color-footer); color: var(--color-text-light); text-align: center; padding: 3.5rem 2rem; font-size: 0.95rem; }
.footer p { margin: 0; opacity: 0.8; color: #ccc; }

/* --- GAYA WIDGET CHAT (Tema UNPAM Biru) --- */
.hidden { display: none !important; }
.chat-widget-opener { position: fixed; bottom: 2rem; right: 2rem; background: var(--color-primary); color: white; border: none; padding: 1rem 1.5rem; border-radius: 50px; font-size: 1rem; cursor: pointer; box-shadow: 0 5px 20px rgba(0,0,0,0.2); transition: all 0.3s ease; z-index: 998; }
.chat-widget-opener:hover { transform: scale(1.05); }
.chat-widget-container { position: fixed; bottom: 6rem; right: 2rem; width: 370px; max-width: 90vw; height: 70vh; max-height: 600px; background: var(--color-bg-white); border-radius: var(--border-radius); border: 1px solid #ddd; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; 
    z-index: 1001; /* [PERBAIKAN] Pastikan widget di atas navbar (1000) */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: bottom right; 
}
.chat-widget-container.hidden { transform: scale(0); }
.chat-widget-header { background: var(--color-primary); padding: 1rem 1.2rem; color: var(--color-text-light); display: flex; justify-content: space-between; align-items: center; border-bottom: 4px solid var(--color-secondary); }
.header-content { display: flex; align-items: center; gap: 12px; }

/* [PERBAIKAN] Sembunyikan avatar lama (diganti dengan logo) */
.header-avatar {
    display: none;
}
/* [BARU] Gaya untuk logo PIMBI di header widget */
.chat-widget-header .widget-header-logo {
    height: 80px; /* Ukuran yang pas */
    margin-right: 1px;
    /* Hapus border-radius jika logo Anda kotak */
    /* border-radius: 50%; */ 
}
.chat-widget-header h3 { margin: 0; font-weight: 600; font-size: 1.1rem; color: var(--color-text-light); }
.chat-widget-closer { background: none; border: none; color: var(--color-text-light); font-size: 1.5rem; cursor: pointer; opacity: 0.8; transition: opacity 0.2s; }
.chat-widget-closer:hover { opacity: 1; }
.chat-widget-body { padding: 1rem; overflow-y: auto; flex-grow: 1; color: var(--color-text-dark); background-color: var(--color-bg-light); }
.chat-widget-body p { font-size: 0.95rem; text-align: center; padding: 0 1rem; color: #666;}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; color: #555; }
.form-group input, .form-group select { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 5px; background: #fff; color: var(--color-text-dark); font-family: 'Poppins', sans-serif; transition: all 0.2s ease; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(11, 3, 68, 0.1); }
.form-group input::placeholder { color: #aaa; }
.btn-submit { width: 100%; padding: 0.9rem; border: none; border-radius: 5px; background: var(--color-primary); color: var(--color-text-light); font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; font-size: 1rem; }
.btn-submit:hover { background: #080231; }
.chat-messages { height: 100%; display: flex; flex-direction: column; overflow-y: auto; padding: 0.5rem; }
.message { margin-bottom: 0.7rem; max-width: 80%; word-wrap: break-word; font-size: 0.95rem; display: flex; }
.message p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.message.user { align-self: flex-end; }
.message.admin { align-self: flex-start; }
.message-content { padding: 0.7rem 1.1rem; border-radius: 18px; box-shadow: 0 2px 5px rgba(0,0,0,0.08); }
.message.user .message-content { 
    background-color: var(--color-primary); 
    color: var(--color-text-light); 
    border-bottom-right-radius: 4px; 
}
.message.admin .message-content { 
    background: #E9ECEF; 
    color: var(--color-text-dark); 
    border-bottom-left-radius: 4px; 
}
.chat-input-area { padding: 0.75rem; border-top: 1px solid #ddd; background: var(--color-bg-white); }
#message-form { display: flex; align-items: center; }
.attachment-button { background: transparent; border: none; color: #6c757d; font-size: 1.2rem; cursor: pointer; padding: 0.5rem; margin-right: 0.5rem; transition: color 0.2s; }
.attachment-button:hover { color: var(--color-primary); }
#message-input { flex-grow: 1; border: 1px solid #ccc; padding: 0.8rem 1rem; border-radius: 50px; background: #fff; color: var(--color-text-dark); transition: border-color 0.2s; }
#message-input:focus { outline: none; border-color: var(--color-primary); }
.send-button { background: var(--color-primary); border: none; color: var(--color-text-light); width: 45px; height: 45px; border-radius: 50%; margin-left: 0.5rem; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; }
.send-button:hover { background: #080231; transform: scale(1.1); }
.attachment-preview-area { font-size: 0.8rem; color: #555; padding: 0.5rem 1rem; background-color: #e9ecef; border-radius: 5px; margin-top: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.attachment-preview-area .remove-attachment { color: #dc3545; cursor: pointer; font-weight: bold; }
.message-content a { color: inherit !important; text-decoration: underline; font-weight: 600; }
.message.admin .message-content a { color: var(--color-primary) !important; font-weight: bold; } /* Link di bubble admin/bot */
.message-content a:hover { opacity: 0.8; }
.message-content img.chat-attachment-img { max-width: 100%; border-radius: 10px; margin-top: 5px; }

/* Tombol Kategori & Tombol di dalam Pesan Chat */
.category-buttons, .message-buttons { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-self: flex-start; width: 100%; }
.category-button, .message-button { background-color: #fff; border: 1px solid var(--color-primary); color: var(--color-primary); padding: 8px 12px; border-radius: 20px; cursor: pointer; text-align: center; font-size: 0.9rem; transition: all 0.2s ease; width: 100%; }
.category-button:hover, .message-button:hover { background-color: var(--color-primary); color: #fff; }
.category-button.disabled, .message-button.disabled, .category-button:disabled, .message-button:disabled { background-color: #e9ecef; border-color: #ced4da; color: #6c757d; cursor: not-allowed; opacity: 0.7; }

/* Tombol Konfirmasi (YA/TIDAK) */
.confirm-buttons { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.confirm-button { padding: 8px 12px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.2s ease; border: none; }
.confirm-button.ya { background-color: #1cc88a; color: white; }
.confirm-button.ya:hover { background-color: #17a673; }
.confirm-button.tidak { background-color: #e74a3b; color: white; }
.confirm-button.tidak:hover { background-color: #c13c2e; }
.confirm-button.disabled { background-color: #e9ecef; border-color: #ced4da; color: #6c757d; cursor: not-allowed; opacity: 0.7; }

/* Fitur Penilaian */
.rating-stars { display: flex; justify-content: center; margin: 1rem 0; font-size: 2rem; color: #e4e5e9; }
.rating-stars i { cursor: pointer; transition: color 0.2s, transform 0.2s; }
.rating-stars i.selected, .rating-stars:hover i { color: #f6c23e; }
.rating-stars i:hover ~ i { color: #e4e5e9; }
#feedback-form textarea { width: 100%; height: 80px; padding: 0.5rem; border-radius: 5px; border: 1px solid #ccc; margin-bottom: 1rem; }

/* Gaya untuk Tampilan Antrian di Widget Pengguna */
.queue-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}
.queue-status .spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid #e9ecef;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}
.queue-status h4 {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.queue-status p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.queue-status h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-secondary); /* Warna Emas/Krem */
    background: var(--color-bg-white);
    border: 3px solid var(--color-secondary);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 74px; /* Sesuaikan agar pas di tengah */
    margin: 0.5rem auto 1rem auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsif */
@media (max-width: 768px) {
    h1 { font-size: 3rem; } h2 { font-size: 2.2rem; } h3 { font-size: 1.5rem; } p { font-size: 1rem; }
    
    /* [PERBAIKAN] Navbar container di mobile */
    .navbar .container { 
        flex-direction: row; /* Balikkan ke baris */
        justify-content: space-between; /* Jaga logo di kiri, tombol di kanan */
        flex-wrap: wrap; /* Izinkan menu untuk "wrap" ke bawah */
    }
    .navbar .logo { margin-bottom: 0; } /* Hapus margin bawah logo */
    
    /* Tampilkan tombol toggler */
    .navbar-toggler {
        display: block;
    }
    
    /* Sembunyikan menu by default di mobile */
    .navbar nav {
        width: 100%;
    }
    .navbar nav ul {
        display: none; /* Sembunyikan menu */
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        align-items: flex-start; /* Ratakan ke kiri */
    }
    
    /* Tampilkan menu saat di-klik */
    .navbar nav ul.active {
        display: flex;
    }

    .navbar nav ul li { 
        margin: 0.5rem 0; 
        width: 100%; 
        text-align: left; /* Ubah dari 'center' */
        margin-left: 0; /* Hapus margin kiri */
    }

    .hero { padding: 5rem 1rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .btn { display: block; width: 90%; margin: 0.8rem auto; }
    .btn-secondary { margin-left: auto; margin-right: auto; }
    .features-grid, .steps-grid, .testimonial-grid { grid-template-columns: 1fr; }
    section { padding: 4rem 1rem; }
    .feature-item, .testimonial-item { padding: 2rem; }
    .cta-final h2 { font-size: 2.5rem; }
    .cta-final p { font-size: 1.1rem; }
    .chat-widget-container {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        max-height: 100%;
    }
    .chat-widget-opener { display: none; } /* Sembunyikan tombol buka di mobile, karena CTA yang akan buka */
    .chat-widget-container.hidden {
        transform: translateY(100%); /* Geser ke bawah saat tersembunyi */
    }
    
    /* Penyesuaian font di form widget saat mobile */
    .chat-widget-container .form-group label {
        font-size: 0.95rem; 
        margin-bottom: 0.5rem; 
    }
    .chat-widget-container .form-group {
        margin-bottom: 0.75rem; /* Kurangi jarak antar grup form */
    }
    .chat-widget-container .form-group input, 
    .chat-widget-container .form-group select {
        padding: 0.7rem; /* Kecilkan padding input */
        font-size: 0.9rem; /* Pastikan font input tetap terbaca */
    }
    .chat-widget-body {
        padding: 0.75rem; /* Kurangi padding utama body widget */
    }
}

