/* RESET & VARIABLES */
:root {
    --primary-orange: #ff6600;
    --primary-blue: #000033;
    --text-grey: #666;
    --light-grey: #f4f4f4;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white);
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* NAVBAR */
header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 600;
    color: #444;
    font-size: 14px;
    text-transform: uppercase;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-orange);
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* --- UPDATE BAGIAN LOGO --- */
.logo-section {
    background-color: var(--white);
    height: 100%;
    display: flex;
    align-items: center;
    
    /* KURANGI PADDING INI */
    padding-left: 3%;      /* Sebelumnya 5% */
    padding-right: 40px;   /* Sebelumnya 60px (Cukup untuk efek miring) */
    
    /* Gunakan auto agar lebar menyesuaikan gambar logo, tidak memakan tempat kosong */
    min-width: 200px;       /* Sebelumnya 250px */
    width: auto;
    
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
    position: relative;
    z-index: 2;
}

/* --- UPDATE BAGIAN MENU SECTION --- */
.menu-section {
    display: flex;
    align-items: center;
    height: 100%;
    
    /* Padding kanan agar search tidak terlalu mepet layar */
    padding-right: 3%; 
    padding-left: 0;
    
    /* Pastikan lebar penuh mengisi sisa ruang sebelah logo */
    flex-grow: 1; 
}

/* --- TAMBAHAN BARU: AGAR MENU DI TENGAH & SEARCH KE KANAN --- */
.menu-section nav {
    flex-grow: 1;           /* Menu mengambil semua ruang kosong yang ada */
    display: flex;
    justify-content: center; /* Membuat tombol HOME, PROFIL, dll berada di TENGAH */
}

.nav-links {
    display: flex;
    gap: 30px;
    justify-content: center; /* Memastikan isi list juga di tengah */
}

/* HERO SECTION */
.hero {
    /* GANTI URL GAMBAR BACKGROUND DI SINI */
    background-image: url('images/BackgroundTitle.jpeg'); 
    background-size: cover;
    background-position: center;
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    background: rgba(0, 0, 50, 0.6); /* Overlay biru transparan agar tulisan terbaca */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero h1 {
    color: var(--white);
    font-size: 36px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* INTRO SECTION */
.intro {
    text-align: center;
    padding: 50px 0;
}

.section-title {
    color: var(--primary-orange);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 800;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    color: #555;
}

/* PRINCIPLES SECTION (ORANGE GRID) */
.principles {
    background-color: var(--primary-orange);
    padding: 50px 0;
    color: var(--white);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.principle-title-card h2 {
    font-size: 32px;
    font-weight: 800;
    border-left: 5px solid var(--white);
    padding-left: 20px;
    line-height: 1.2;
}

.principle-card {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.principle-card:hover {
    background: rgba(255,255,255,0.1);
}

.principle-card i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.principle-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.principle-card p {
    font-size: 13px;
    line-height: 1.4;
}

/* NEWS SECTION */
.news {
    padding: 50px 0;
}

.section-heading {
    margin-bottom: 30px;
    font-size: 24px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.news-main img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.news-content {
    margin-top: 15px;
}

.news-tag {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 12px;
}

.news-main h3 {
    font-size: 24px;
    margin: 10px 0;
    color: var(--primary-blue);
}

.news-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    gap: 15px;
}

.news-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.news-info h4 {
    font-size: 14px;
    color: #333;
}

.news-date {
    font-size: 11px;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.news-grid-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-card img {
    width: 100%;
    border-radius: 4px;
}

.news-more {
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-more a {
    font-weight: bold;
    color: #333;
}

/* GALLERY SECTION */
.gallery {
    background-color: var(--primary-blue);
    padding: 40px 0;
    color: var(--white);
}

.gallery-title {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.gallery-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.gallery-images {
    display: flex;
    gap: 20px;
    overflow-x: auto;    /* <--- Ini yang bikin scroll function aktif */
    padding-bottom: 10px; 
    
    /* --- TAMBAHKAN KODE DI BAWAH INI --- */
    
    /* Hilangkan scrollbar untuk Firefox */
    scrollbar-width: none; 
    
    /* Hilangkan scrollbar untuk IE dan Edge lama */
    -ms-overflow-style: none; 
}

/* TAMBAHKAN KODE INI DI BAWAHNYA (Untuk Chrome/Safari) */
.gallery-images::-webkit-scrollbar {
    display: none;
}

.gallery-images img {
    height: 250px;
    border-radius: 5px;
}

.gallery-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* PROFILE POLBAN SECTION */
.profile-polban {
    background-color: var(--primary-orange);
    color: white;
    padding: 0; /* Full width background */
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0; /* Remove container padding for full image */
    align-items: center;
}

.profile-text {
    padding: 50px;
}

.profile-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.profile-text p {
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- UPDATE BAGIAN DEPARTEMEN (GRID 3 KOLOM) --- */

.departments {
    text-align: center;
    padding: 60px 0;
    background-color: transparent;
}

.departments h3 {
    margin-bottom: 40px;
    color: #000033;
    font-size: 24px;
    font-weight: 800;
}

/* Container Grid */
.dept-grid {
    display: grid;
    /* KUNCI: Membuat 3 Kolom dengan lebar sama */
    grid-template-columns: repeat(3, 1fr); 
    
    gap: 30px; /* Jarak antar kotak (atas-bawah-kiri-kanan) */
    max-width: 900px; /* Membatasi lebar agar tidak terlalu melebar */
    margin: 0 auto; /* Posisi di tengah layar */

    /* --- PINDAHKAN WARNA ABU-ABU KE SINI (JADI BLOCK) --- */
    background-color:transparent; /* Warna abu-abu */
    padding: 40px;             /* Memberi jarak dalam agar lega */
}

/* Kotak Item Jurusan */
.dept-grid {
    display: grid;
    /* Grid 3 Kolom */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* Jarak antar gambar */
    
    /* Lebar dimaksimalkan agar muat 3 gambar x 294px */
    width: fit-content; 
    max-width: 100%;
    margin: 0 auto;
    
    /* Style Block Abu-abu */
    background-color: transparent;
    padding: 30px;
}

/* Kotak Item (Card) */
.dept-item {
    /* Hapus padding agar gambar mentok ke pinggir card */
    padding: 0; 
    
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden; /* Memastikan sudut gambar ikut melengkung */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    
    /* Flex agar tidak ada celah di bawah gambar */
    display: flex; 
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

.dept-item:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 5px 15px rgba(0,0,0,0.2); */
}

/* Pengaturan Gambar Spesifik 294x145 */
.dept-item img {
    width: 294px;
    height: 145px;
    
    /* Cover: Memastikan gambar memenuhi kotak tanpa gepeng */
    /* Contain: Gunakan 'contain' jika ingin seluruh logo terlihat utuh meski ada sisa ruang */
    object-fit: cover; 
    
    display: block;
}
/* --- RESPONSIVE MOBILE --- */
/* Di HP, ubah jadi 2 kolom atau 1 kolom agar tidak gepeng */
@media (min-width: 769px) {
    /* Menargetkan item terakhir (ke-10) */
    .dept-item:last-child {
        grid-column: 2; /* Memindahkan item ke kolom ke-2 (Tengah) */
    }
}

@media (max-width: 768px) {
    .dept-grid {
        grid-template-columns: repeat(2, 1fr); /* HP Tablet: 2 Kolom */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .dept-grid {
        grid-template-columns: 1fr; /* HP Kecil: 1 Kolom ke bawah */
    }
}

/* FOOTER */
footer {
    background-color: #222;
    color: #ddd;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    /* Ubah minmax dari 200px menjadi 250px agar kolom lebih lega */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 50px;
    padding-bottom: 40px;
}

.footer-info h4, .footer-links h4 {
    white-space: nowrap; /* Judul kolom juga wajib 1 baris */
    margin-bottom: 20px;
    font-size: 16px;
    border-bottom: 2px solid var(--primary-orange);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-links ul li {
    display: block;
    color: #ddd;
    font-size: 13px;
    margin-bottom: 8px;
    
    /* --- KUNCI AGAR RAPI 1 BARIS --- */
    white-space: nowrap;       /* Mencegah teks turun baris */
    text-transform: uppercase; /* Membuat huruf besar semua sesuai gambar */
    
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px; /* Efek geser sedikit saat di-hover */
}

.footer-bottom {
    background-color: #111;
    text-align: center;
    padding: 15px;
    font-size: 12px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide nav on mobile initially */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 5px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 24px;
    }

    .news-grid, .profile-grid, .news-grid-bottom {
        grid-template-columns: 1fr;
    }
    
    .profile-image {
        order: -1; /* Image on top in mobile */
    }
}

/* =========================================
   DROPDOWN MENU STYLE
   ========================================= */

/* 1. Set Parent agar Relative */
.nav-links li.dropdown {
    position: relative;
}

/* 2. Kotak Dropdown (Sembunyi dulu) */
.dropdown-menu {
    display: none; /* Hilang default */
    position: absolute;
    top: 100%; /* Muncul persis di bawah navbar */
    left: 0;
    background-color: #1a237e; /* Biru Tua (Sama dengan Navbar) */
    min-width: 280px; /* Lebar dropdown */
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    padding: 10px 0;
    z-index: 9999;
    flex-direction: column;
    border-top: 3px solid #ff6600; /* Aksen oranye di bagian atas */
}

/* 3. Munculkan saat Hover */
.nav-links li.dropdown:hover .dropdown-menu {
    display: flex; /* Gunakan Flex agar item tersusun rapi */
}

/* 4. Reset Style untuk Item Dropdown */
.dropdown-menu li {
    height: auto; /* Reset tinggi full navbar */
    display: block;
    width: 100%;
}

.dropdown-menu a {
    justify-content: flex-start;
    height: auto;
    padding: 10px 25px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    color: #ffffff;
    display: block; 
    width: 100%;
}

/* 5. Efek Hover pada Item Dropdown */
.dropdown-menu a:hover {
    background-color: #283593; /* Biru sedikit lebih terang */
    color: #ff6600; /* Teks jadi oranye */
    padding-left: 30px; /* Efek geser sedikit ke kanan saat hover */
    transition: all 0.2s ease;
}

/* 6. Mencegah Style "Jajar Genjang" Masuk ke Dropdown */
.dropdown-menu a::before {
    display: none; 
}

/* Update bagian ini di style.css */
/* Menghilangkan garis pada menu paling terakhir agar rapi */
.dropdown-menu li:last-child a {
    border-bottom: none;
}

/* --- CSS KHUSUS UNTUK GAMBAR MAKLUMAT --- */
.maklumat-image {
    width: 100%;       /* Gambar memenuhi lebar konten */
    max-width: 800px;  /* Batas maksimal agar tidak terlalu besar di layar lebar */
    height: auto;      /* Tinggi menyesuaikan otomatis */
    display: block;
    margin: 0 auto;    /* Posisi di tengah */
    border-radius: 8px;
}

/* --- STYLE TABEL INFORMASI PUBLIK --- */
.table-responsive {
    overflow-x: auto; /* Agar tabel bisa di-scroll menyamping di HP */
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 14px;
    min-width: 800px; /* Lebar minimum agar kolom tidak gepeng */
}

.info-table thead {
    background-color: #000033; /* Biru Tua Polban */
    color: #ffffff;
}

.info-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #0a0a44;
    text-transform: uppercase;
    font-size: 13px;
    white-space: nowrap; /* Judul kolom 1 baris */
}

.info-table td {
    padding: 12px 15px;
    border: 1px solid #eee;
    vertical-align: top; /* Teks selalu rata atas */
    color: #444;
    line-height: 1.5;
}

/* Warna selang-seling (Zebra Striping) agar mudah dibaca */
.info-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.info-table tbody tr:hover {
    background-color: #eef2f5; /* Efek highlight saat kursor lewat */
}

/* Kolom Nomor kecil saja */
.info-table td:first-child {
    text-align: center;
    width: 50px;
    font-weight: bold;
}

/* --- TAMBAHAN STYLE TOMBOL LAMAN --- */
.btn-action {
    display: inline-block;
    padding: 6px 12px;
    background-color: #ff6600; /* Warna Oranye Polban */
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s;
    white-space: nowrap; /* Agar teks tombol tidak turun baris */
}

.btn-action:hover {
    background-color: #e65c00; /* Warna lebih gelap saat hover */
    color: #ffffff;
}

.btn-action i {
    margin-right: 4px; /* Jarak antara icon dan teks */
}

.page-container { display: flex; max-width: 1200px; margin: 40px auto; padding: 0 20px; gap: 40px; min-height: 60vh; }
.sidebar { width: 300px; flex-shrink: 0; }
.sidebar-menu { list-style: none; background: #f9f9f9; border-radius: 8px; border: 1px solid #eee; }
.sidebar-menu a { display: block; padding: 15px 20px; color: #333; font-weight: 600; text-decoration: none; border-bottom: 1px solid #eee; }
.sidebar-menu a:hover { background: #ff6600; color: white; }
.sidebar-menu a.active { background: #000033; color: white; border-left: 5px solid #ff6600; }
.content-area { flex-grow: 1; overflow: hidden; } /* Overflow hidden agar tabel tidak merusak layout */
.page-header h1 { color: #000033; border-bottom: 3px solid #ff6600; display: inline-block; padding-bottom: 5px; margin-bottom: 20px;}
@media (max-width: 768px) { .page-container { flex-direction: column; } .sidebar { width: 100%; } }

/* --- STYLE HALAMAN TUGAS & WEWENANG --- */
.tugas-header {
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary-orange);
    padding-bottom: 10px;
    color: var(--primary-blue);
}

.intro-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-left: 5px solid var(--primary-blue);
    margin-bottom: 40px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.6;
}

.role-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.role-header {
    background-color: var(--primary-blue);
    color: #fff;
    padding: 15px 25px;
}

.role-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-body {
    padding: 25px;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}

/* Icon check oranye di samping setiap list */
.task-list li::before {
    content: "\f00c"; /* Kode FontAwesome untuk Check */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-orange);
}

/* Responsif untuk HP */
@media (max-width: 768px) {
    .role-header h3 {
        font-size: 16px;
    }
}

/* --- STYLE UNTUK LIST DI DALAM KONTEN --- */
.content-text ol {
    list-style-type: decimal;
    margin-left: 25px;
    margin-bottom: 20px;
}

.content-text ol li {
    padding-left: 10px;
    margin-bottom: 15px;
    /* KUNCI: Membuat nomor menjadi Bold */
    font-weight: bold; 
    color: var(--primary-blue); /* Opsional: Agar nomor berwarna biru sama dengan judul */
}

/* Agar isi paragraf di bawah judul poin kembali normal (tidak ikut bold) */
.content-text ol li p {
    font-weight: normal;
    color: #444; /* Warna teks isi kembali abu-abu gelap */
    margin-top: 5px;
}

.content-text ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-top: 10px;
}

.content-text ul li {
    margin-bottom: 8px;
    /* Sub-poin tetap normal, tidak bold */
    font-weight: normal; 
    color: #444;
}

/* --- STYLE UNTUK TAGLINE --- */
.tagline-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #fcfcfc;
    border-top: 2px solid var(--primary-orange);
    border-bottom: 2px solid var(--primary-orange);
    text-align: center;
}

.tagline-box p {
    font-style: italic;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 16px;
    line-height: 1.5;
}


/* Hapus class .divider dari CSS jika Anda menggunakan cara ini */