/* =========================================================
   OJS 3.5 - Halaman awal situs (daftar jurnal) - Tema INISNU
   Pasang di: Administrasi > Pengaturan Situs > Tampilan >
   Lanjutan > Stylesheet Situs  (GANTI CSS situs sebelumnya)
   Palet mengikuti inisnu.ac.id: hijau #007509, biru #1e73be, emas #eab420
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --green:      #007509;
  --green-dark: #005406;
  --green-soft: #eaf6eb;
  --blue:       #1e73be;
  --gold:       #eab420;
  --gold-dark:  #c9970f;
  --text:       #1f2937;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --bg:         #f4f7f5;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0, 84, 6, .10);

  /* Ukuran area gambar - sama untuk SEMUA kartu */
  --thumb-height: 220px;
}

/* ---------- Dasar ---------- */
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--green); transition: color .2s; }
a:hover, a:focus { color: var(--blue); text-decoration: none; }

/* ---------- Header hijau (gaya INISNU) ---------- */
.pkp_structure_head {
  background: var(--green);
  border-bottom: 4px solid var(--gold);
}
.pkp_site_name .is_img img,
.pkp_site_name img {
  max-height: 70px;
  width: auto;
}
.pkp_navigation_user > li > a,
.pkp_navigation_primary > li > a {
  color: #fff;
  font-weight: 500;
}
.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus,
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Footer ---------- */
.pkp_structure_footer_wrapper {
  background: var(--green);
  border-top: 4px solid var(--gold);
  margin-top: 2rem;
}
.pkp_structure_footer_wrapper a { color: var(--gold); }

/* ---------- Lebarkan konten & hilangkan garis sidebar ---------- */
.pkp_structure_main:has(.page_index_site) {
  width: 100%;
  float: none;
  padding-left: 15px;
  padding-right: 15px;
}
.pkp_structure_main:has(.page_index_site)::before,
.pkp_structure_main:has(.page_index_site)::after {
  display: none;
}

/* ---------- Judul "Journals" (tengah) ---------- */
.page_index_site .journals > h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 0 0 1.5rem;
}
.page_index_site .journals > h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  margin: .5rem auto 0;
  background: var(--gold);
  border-radius: 2px;
}

.page_index_site .about_site {
  background: #fff;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

/* ---------- GRID 3 KOLOM ---------- */
.page_index_site .journals > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

/* ---------- KARTU ---------- */
.page_index_site .journals > ul > li {
  display: flex;
  flex-direction: column;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff;
  border: 1px solid var(--border) !important;
  border-top: 4px solid var(--green) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-top-color .2s;
}
.page_index_site .journals > ul > li::after { display: none; }

.page_index_site .journals > ul > li:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 84, 6, .18);
  border-top-color: var(--gold) !important;
}

/* ---------- GAMBAR: ukuran sama, TIDAK terpotong ---------- */
.page_index_site .journals .thumb {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  height: var(--thumb-height);
  margin: 0 !important;
  padding: 0 !important;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.page_index_site .journals .thumb a {
  display: block;
  width: 100%;
  height: 100%;
}
.page_index_site .journals .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
}

/* ---------- GAMBAR DEFAULT untuk jurnal tanpa thumbnail ---------- */
.page_index_site .journals > ul > li:not(.has_thumb)::before {
  content: '';
  display: block;
  flex: none;
  width: 100%;
  height: var(--thumb-height);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eab420' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E")
      center / 84px no-repeat,
    linear-gradient(135deg, var(--green-dark), var(--green));
  border-bottom: 1px solid var(--border);
}
/* Ingin gambar sendiri? Ganti seluruh properti background di atas, mis.:
   background: #f8fafc url('https://domain-anda/public/site/default-journal.png') center / contain no-repeat; */

/* ---------- ISI KARTU ---------- */
.page_index_site .journals > ul > li .body {
  display: flex;
  flex-direction: column;
  flex: 1;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 1.1rem 1.25rem 1.25rem !important;
}

/* Judul jurnal: RATA TENGAH, tinggi seragam (2 baris) */
.page_index_site .journals h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9em;
  margin: 0 0 .75rem;
  text-align: center;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
}
.page_index_site .journals h3 a { color: var(--green-dark); }
.page_index_site .journals h3 a:hover { color: var(--blue); }

/* Deskripsi dipotong 4 baris, abaikan style Word yang tertempel */
.page_index_site .journals .description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}
.page_index_site .journals .description p { margin: 0; }
.page_index_site .journals .description p,
.page_index_site .journals .description span {
  font-family: inherit !important;
  font-size: .88rem !important;
  line-height: 1.6 !important;
  color: var(--muted) !important;
}

/* Tombol: tengah & menempel di dasar kartu */
.page_index_site .journals .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}
.page_index_site .journals .links li { margin: 0; padding: 0; }
.page_index_site .journals .links a {
  display: inline-block;
  padding: 6px 16px;
  border: 2px solid var(--green);
  border-radius: 10px;
  background: transparent;
  color: var(--green);
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
}
.page_index_site .journals .links .view a {
  background: var(--green);
  color: #fff;
}
.page_index_site .journals .links .current a {
  border-color: var(--gold);
  color: var(--green-dark);
  background: var(--gold);
}
.page_index_site .journals .links a:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
  .page_index_site .journals > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));   /* tablet: 2 kolom */
  }
}

@media (max-width: 575px) {
  :root { --thumb-height: 190px; }

  .page_index_site .journals > ul {
    grid-template-columns: 1fr;                          /* HP: 1 kolom */
    gap: 1rem;
  }
  .pkp_structure_main:has(.page_index_site) {
    padding-left: 10px;
    padding-right: 10px;
  }
}
