/* =============================================== */
/* == 1. VARIABLES & GLOBAL RESETS                == */
/* =============================================== */
:root {
  --primary-green: #19b01e;
  --primary-yellow: #faa935;
  --text-dark: #0b2727;
  --text-light: #ffffff;
  --text-gray: #6e7074;
  --placeholder-gray: #b8b8b8;
  --background-white: #ffffff;
  --background-light-gray: #fefefe;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--background-white); color: var(--text-dark); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; cursor: pointer; background: none; }
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 160px; transition: padding 0.3s ease-in-out; }

/* =============================================== */
/* == 2. HEADER & NAVIGATION                      == */
/* =============================================== */
.site-header { background-color: var(--primary-green); box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); padding: 8px 0; }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 69px; }
.logo { display: flex; align-items: center; gap: 9px; }
.logo-image { width: 68px; height: 70px; object-fit: contain; }
.logo-text { color: var(--text-light); display: flex; flex-direction: column; }
.repo-text { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 24px; }
.campus-text { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 20px; }
.main-nav { margin-left: auto; margin-right: 24px; }
.nav-links { display: flex; gap: 24px; }
.nav-link { font-family: 'Montserrat', sans-serif; font-size: 24px; color: var(--text-light); position: relative; padding-bottom: 10px; }
.nav-link.active { font-weight: 700; color: var(--primary-yellow); }
.nav-link.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 33px; height: 4px; background-color: var(--primary-yellow); border-radius: 5px 5px 0 0; }
.login-button { display: flex; justify-content: center; align-items: center; background-color: var(--text-light); color: var(--text-dark); font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 18px; padding: 10px 21px; border-radius: 50px; }

/* =============================================== */
/* == 3. HERO SECTION                             == */
/* =============================================== */
.hero-section { background-color: var(--background-white); padding-top: 40px; padding-bottom: 180px; position: relative; }
.hero-container { display: flex; align-items: center; gap: 30px; }
.hero-text-content { flex-basis: 50%; max-width: 542px; }
.hero-title { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 48px; color: var(--text-dark); margin-bottom: 30px; }
.hero-title .highlight { color: var(--primary-green); }
.hero-subtitle { font-weight: 400; font-size: 16px; color: var(--text-gray); }
.hero-image-gallery { flex-basis: 50%; display: flex; justify-content: center; align-items: center; gap: 23px; }
.image-card { width: 166px; height: 350px; border-radius: 20px; overflow: hidden; border: 1px solid var(--primary-green); }
.image-card img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================== */
/* == 4. SEARCH SECTION                           == */
/* =============================================== */
.search-section { background-color: var(--primary-green); padding: 37px 20px 53px; margin-top: -147px; position: relative; z-index: 10; }
.search-container { display: flex; flex-direction: column; align-items: center; gap: 31px; }
.search-title { font-weight: 500; font-size: 32px; color: var(--text-light); text-align: center; }
.search-form { display: flex; justify-content: center; align-items: center; gap: 16px; width: 100%; }
.search-inputs-wrapper { display: flex; gap: 16px; flex-wrap: nowrap; }
.search-input { background-color: var(--background-light-gray); border: none; border-radius: 16px; box-shadow: 0 4px 4px rgba(0,0,0,0.25); padding: 24px 37px; font-weight: 500; font-size: 24px; color: var(--text-dark); }
.search-input::placeholder { color: var(--placeholder-gray); opacity: 1; }
.search-input[name="judul"] { width: 313px; }
.search-input[name="penulis"] { width: 240px; }
.search-input[name="abstrak"] { width: 251px; }
.search-input[name="tahun"] { width: 158px; }
.search-button { display: flex; justify-content: center; align-items: center; width: 100px; height: 78px; background-color: var(--background-white); border-radius: 16px; box-shadow: 0 4px 4px rgba(0,0,0,0.25); transition: transform 0.2s ease-in-out; }
.search-button:hover { transform: scale(1.05); }
.search-button img { width: 48px; height: 48px; padding: 13px; background-color: var(--primary-yellow); border-radius: 10px 4px 10px 4px; border: 3px solid var(--text-light); }

/* =============================================== */
/* == 5. RESULTS SECTION (TABLE & MESSAGES)       == */
/* =============================================== */
.results-section { padding: 50px 0; background-color: #f8f9fa; }
.results-title { font-size: 28px; margin-bottom: 30px; text-align: center; }
.no-results-message { font-size: 18px; color: #6c757d; text-align: center; }
.table-wrapper { overflow-x: auto; } /* Membuat tabel bisa di-scroll horizontal di desktop jika perlu */
.responsive-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.responsive-table td, .responsive-table th { padding: 15px; overflow-wrap: break-word; word-break: break-word; vertical-align: top; }
.responsive-table thead { background-color: var(--primary-green); color: white; text-align: left; }
.responsive-table th.col-jenis, .responsive-table th.col-tahun { text-align: center; }
.responsive-table th a { display: inline-flex; align-items: center; gap: 0.5em; color: white; text-decoration: none; white-space: nowrap; }
.responsive-table th a .sort-icon { font-size: 0.8em; }
/* Style dasar untuk semua ikon sorting */
.sort-icon {
    font-size: 0.8em;
    line-height: 1;
    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out; /* Tambah transisi opacity */
    display: inline-block; /* Pastikan span bisa di-style */
}

/* Style untuk ikon yang TIDAK AKTIF (redup) */
.sort-icon.inactive {
    color: #fff; /* Warna dasar tetap putih */
    opacity: 0.4; /* Gunakan opacity untuk membuatnya redup */
}

/* Style untuk ikon yang AKTIF (jelas) */
.sort-icon.active {
    color: #fff; /* Warna dasar putih */
    opacity: 1;   /* Opacity penuh */
}

/* (Opsional) Efek hover pada ikon yang tidak aktif */
.responsive-table th a:hover .sort-icon.inactive {
    opacity: 0.8;
}
.responsive-table tbody tr { border-bottom: 1px solid #dee2e6; }
.responsive-table td.col-tahun, .responsive-table td.col-jenis { text-align: center; }
.responsive-table td.col-judul a { color: #19b01e; font-weight: bold; }

/* --- Pengaturan Lebar Kolom untuk Desktop --- */
.responsive-table .col-judul { width: 35%; }
.responsive-table .col-penulis { width: 15%; }
.responsive-table .col-abstrak { width: 20%; }
.responsive-table .col-jenis { width: 8%; }
.responsive-table .col-tahun { width: 8%; }
.responsive-table .col-prodi { width: 14%; }


/* =============================================== */
/* == 6. PAGINATION & FOOTER                      == */
/* =============================================== */
.pagination-wrapper { 
    margin-top: 2rem; 
}

/* Sembunyikan div "Showing... results" jika ada */
.pagination-wrapper nav > div:first-child {
    display: none;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: 0;
}

.page-item {
    margin: 0 4px;
}

.page-link {
    display: flex; /* Gunakan flex untuk menengahkan konten */
    justify-content: center;
    align-items: center;
    min-width: 45px; /* Lebar minimum */
    min-height: 42px; /* Tinggi minimum */
    padding: 8px 16px;
    border: 1px solid #ddd;
    color: var(--primary-green);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}

.page-link:hover {
    background-color: #f1f1f1;
    border-color: #ccc;
}

.page-item.active .page-link {
    background-color: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    cursor: default;
    font-weight: bold;
}

.page-item.disabled .page-link {
    color: #aaa;
    border-color: #ddd;
    cursor: not-allowed;
    background-color: #f9f9f9;
}



.site-footer-bottom { 
    background-color: #0b2727; 
    color: #ffffff; 
    padding: 20px 0; 
    text-align: center; 
    margin-top: 50px; 
}

/* =============================================== */
/* == 7. MEDIA QUERIES (RESPONSIVE STYLES)        == */
/* =============================================== */

/* --- Layar Tablet Besar & Laptop Kecil (max-width: 1200px) --- */
@media (max-width: 1200px) {
  .container { padding: 0 80px; }
  .main-nav { display: none; }
  .header-container { justify-content: space-between; }
  .logo { margin-right: auto; }
}

/* --- Layar Tablet Potret (max-width: 992px) --- */
@media (max-width: 992px) {
  .container { padding: 0 40px; }
  .hero-container { flex-direction: column; text-align: center; gap: 50px; }
  .hero-text-content { max-width: 100%; }
  .search-form { flex-direction: column; }
  .search-inputs-wrapper { flex-wrap: wrap; justify-content: center; }
  .search-input { width: calc(50% - 8px) !important; font-size: 18px; padding: 18px 24px; }
  .search-button { width: 100%; }
}

/* --- Layar Smartphone (max-width: 768px) --- */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .logo-text { display: none; }
  .header-container { padding: 5px 0; }
  .hero-section { padding-top: 40px; padding-bottom: 200px; }
  .hero-title { font-size: 36px; }
  .hero-image-gallery { flex-wrap: wrap; gap: 15px; }
  .image-card { width: calc(50% - 10px); height: 250px; }
  .search-section { margin-top: -160px; }
  .search-title { font-size: 24px; }
  .search-input { width: 100% !important; }
  
  /* Aturan Tabel Responsif menjadi Card Layout */
  .table-wrapper { overflow-x: visible; } /* Matikan scroll horizontal di mobile */
  .responsive-table { table-layout: auto; } /* Kembalikan ke auto agar bisa jadi block */
  .responsive-table thead { display: none; }
  .responsive-table tr { display: block; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); background-color: #fff; }
  .responsive-table td { display: block; text-align: right !important; /* Paksa rata kanan */ padding: 12px 15px; position: relative; border-bottom: 1px solid #eee; width: 100% !important; /* Paksa lebar penuh */ }
  .responsive-table td:last-child { border-bottom: none; }
  .responsive-table td::before { content: attr(data-label); position: absolute; left: 15px; font-weight: bold; text-align: left; color: #333; }
  .responsive-table td[data-label="Judul:"] { text-align: left !important; /* Kecuali judul, rata kiri */ padding-top: 20px; padding-bottom: 20px; }
  .responsive-table td[data-label="Judul:"]::before { display: none; }
  .responsive-table td[data-label="Judul:"] a { font-size: 1.1em; }
}