/* =========================================================
   IJITC - Custom stylesheet untuk OJS 3 (Default Theme)
   Upload: Settings > Website > Appearance > Advanced >
           Journal style sheet
   Tukar warna di bahagian :root sahaja.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

/* ---------- 0. FONT (Montserrat) ---------- */
body,
.pkp_structure_page,
.pkp_structure_page h1,
.pkp_structure_page h2,
.pkp_structure_page h3,
.pkp_structure_page h4,
.pkp_structure_page h5,
.pkp_structure_page h6,
.pkp_structure_page p,
.pkp_structure_page li,
.pkp_structure_page a,
.pkp_structure_page button,
.pkp_structure_page input,
.pkp_structure_page select,
.pkp_structure_page textarea {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

:root {
  --ijitc-primary: #0f6b4f;   /* hijau utama (bar menu atas) */
  --ijitc-dark:    #003d28;   /* hijau gelap (tajuk menu sisi, hover) */
  --ijitc-accent:  #c8a55a;   /* emas (garis bawah tajuk, jalur) */
  --ijitc-soft:    #cbd1b4;   /* hijau pucat (butang menu sisi) */
  --ijitc-soft-2:  #e6ece9;   /* kelabu kotak maklumat */
}

/* ---------- 1. HEADER ---------- */
.pkp_structure_head {
  background: #0b5a3e;   /* hijau header (lebih cerah) */
  border-bottom: 5px solid var(--ijitc-accent);
}
/* Tulisan header jadi putih supaya jelas */
.pkp_site_name .is_text,
.pkp_site_name .is_text:hover,
.pkp_site_name .is_text:focus,
.pkp_navigation_user > li > a,
.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus {
  color: #fff;
}

/* ---------- 2. BAR MENU UTAMA ---------- */
.pkp_navigation_primary_row {
  background: #178a66;   /* hijau bar menu (lebih cerah) */
}
.pkp_navigation_primary > li > a {
  color: #fff;
  font-weight: 700;
  padding-top: 14px;
  padding-bottom: 14px;
}
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
  background: var(--ijitc-dark);
  color: #fff;
  border-color: transparent;
}

/* Butang Search bulat putih */
.pkp_navigation_search_wrapper a {
  background: #fff;
  color: var(--ijitc-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 20px;
  margin: 6px 0;
}
.pkp_navigation_search_wrapper a:hover,
.pkp_navigation_search_wrapper a:focus {
  background: var(--ijitc-accent);
  color: #fff;
}

/* ---------- 3. KOTAK MAKLUMAT JURNAL + COVER ---------- */
.ijitc-about {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.ijitc-about .ijitc-info {
  flex: 1 1 380px;
  background: var(--ijitc-soft-2);
  border: 3px solid var(--ijitc-primary);
  padding: 18px 24px;
}
.ijitc-about .ijitc-info ol {
  margin: 0;
  padding-left: 22px;
}
.ijitc-about .ijitc-info li {
  margin-bottom: 6px;
  line-height: 1.5;
}
.ijitc-about .ijitc-cover {
  flex: 0 0 230px;
}
.ijitc-about .ijitc-cover img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ---------- 4. MENU SISI (Custom Block) ---------- */
/* sorok tajuk asal block, guna tajuk dalam HTML sendiri */
.pkp_block:has(.ijitc-menu) > .title {
  display: none;
}
.ijitc-menu-title {
  background: var(--ijitc-dark);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  padding: 18px 16px;
}
.ijitc-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ijitc-menu li {
  margin: 0;
  padding: 0;
  border-top: 2px solid #fff;   /* garis putih nipis antara butang */
}
.ijitc-menu li a {
  display: block;
  background: var(--ijitc-soft);
  color: #111;
  padding: 16px 16px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.ijitc-menu li a:hover,
.ijitc-menu li a:focus {
  background: var(--ijitc-dark);
  color: #fff;
}

/* ---------- 5. TAJUK BLOCK SISI (cth: VISITORS) ---------- */
.pkp_block .title {
  display: inline-block;
  color: #6b6b6b;
  font-weight: 700;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 3px solid var(--ijitc-accent);
}

/* Kaunter pelawat muat dalam sidebar */
.pkp_block img[src*="flagcounter"] {
  max-width: 100%;
  height: auto;
}

/* ---------- 5a. BUTANG DOWNLOAD TEMPLATE (sama gaya Make a Submission) ---------- */
.pkp_block:has(.ijitc-template) > .title {
  display: none;
}
.ijitc-template a {
  display: inline-block;
  padding: 0 1em;
  background: #eee;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-top-color: #bbb;
  border-radius: 3px;
  box-shadow: inset 0 -1em 1em rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  font-weight: 700;
  line-height: calc(2.143rem - 2px);
  color: var(--ijitc-primary);
  text-decoration: none;
}
.ijitc-template a:hover,
.ijitc-template a:focus {
  background: var(--ijitc-primary);
  color: #fff;
}

/* ---------- 5b. LOGO INDEKS DI SIDEBAR (dikecilkan) ---------- */
.pkp_structure_sidebar .pkp_block img[src*="/public/site/images/"] {
  max-width: 130px !important;
  height: auto !important;
}

/* ---------- 5c. HOMEPAGE: COVER KIRI + MAKLUMAT JURNAL KANAN ---------- */
/* Naikkan Additional Content ke atas homepage */
.pkp_page_index .page_index_journal {
  display: flex;
  flex-direction: column;
}
.pkp_page_index .page_index_journal .homepage_image {
  order: -2;
}
.pkp_page_index .page_index_journal .additional_content {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  border-top: 0;
  border-bottom: 1px solid #ddd;
}
/* Gambar cover di kiri */
.pkp_page_index .additional_content > p:has(img),
.pkp_page_index .additional_content > img {
  flex: 0 0 260px;
  max-width: 260px;
  margin: 0;
}
.pkp_page_index .additional_content img {
  display: block;
  width: 100% !important;
  height: auto !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
/* Maklumat jurnal di kanan */
.ijitc-home-info {
  flex: 1 1 300px;
}
.ijitc-home-info h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ijitc-dark);
}
.ijitc-home-info p {
  margin: 0 0 6px;
  line-height: 1.6;
}
/* Buang perenggan kosong yang editor tambah */
.pkp_page_index .additional_content > p:empty {
  display: none;
}

/* ---------- 6. KEMASAN UMUM ---------- */
.pkp_structure_footer_wrapper {
  border-top: 5px solid var(--ijitc-accent);
}

/* ---------- 7. TELEFON ---------- */
@media (max-width: 767px) {
  .ijitc-about .ijitc-cover {
    flex: 1 1 100%;
    max-width: 230px;
    margin: 0 auto;
  }
}
