/* ==========================================================================
   BAGIAN 1: HEADER, USER MENU (KANAN ATAS) & NAVIGASI UTAMA
   ========================================================================== */

/* Jangkar kontainer header agar user menu terkunci di kanan atas */
.pkp_head_wrapper {
  position: relative;
}

.pkp_site_nav_menu {
  position: static;
  background-color: transparent;
  border: none;
}

/* ==========================================================================
   1A. USER MENU DI POJOK KANAN LAYAR (Register/Login & Profil)
   ========================================================================== */

/* Jadikan <header> utama (lebar 100% layar) sebagai titik acuan posisi */
header.pkp_structure_head {
  position: relative !important;
}

/* Lepaskan batasan posisi pada pembungkus dalam agar user menu bisa ke tepi layar */
header.pkp_structure_head .pkp_head_wrapper,
header.pkp_structure_head .pkp_site_nav_menu {
  position: static !important;
}

/* Kunci User Menu tepat di pojok kanan atas layar */
header.pkp_structure_head #navigationUserWrapper.pkp_navigation_user_wrapper {
  position: absolute !important;
  top: 10px !important;
  right: 24px !important;
  left: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  float: none !important;
  display: flex !important;
  justify-content: flex-end !important;
  z-index: 1005 !important;
}

#navigationUser.pkp_navigation_user {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#navigationUser > li {
  position: relative;
  margin: 0;
  padding: 0;
}

#navigationUser > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

#navigationUser > li > a:hover,
#navigationUser > li:hover > a {
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  text-decoration: none;
}

#navigationUser .task_count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

/* Dropdown saat sudah login (membuka ke arah kiri agar tidak terpotong tepi layar) */
#navigationUser > li > ul {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 205px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background-color: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1006;
}

#navigationUser > li:hover > ul,
#navigationUser > li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#navigationUser > li > ul li {
  margin: 0;
  padding: 0;
}

#navigationUser > li > ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#navigationUser > li > ul li a:hover {
  background-color: #fef2f2;
  color: #7a0909;
}

#navigationUser > li > ul .task_count {
  background-color: #fee2e2;
  color: #7a0909;
}

@media (max-width: 768px) {
  header.pkp_structure_head #navigationUserWrapper.pkp_navigation_user_wrapper {
    top: 8px !important;
    right: 12px !important;
  }
}

/* Dropdown User Menu (Membuka ke kiri agar tidak terpotong layar) */
#navigationUser > li > ul {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 205px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background-color: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1003;
}

#navigationUser > li:hover > ul,
#navigationUser > li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#navigationUser > li > ul li {
  margin: 0;
  padding: 0;
}

#navigationUser > li > ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#navigationUser > li > ul li a:hover {
  background-color: #fef2f2;
  color: #7a0909;
}

#navigationUser > li > ul .task_count {
  background-color: #fee2e2;
  color: #7a0909;
}

/* 1B. Baris Menu Utama Sejajar (#navigationPrimary & Search) */
.pkp_navigation_primary_row {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.pkp_navigation_primary_wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 6px 0 12px 0;
}

#navigationPrimary.pkp_navigation_primary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#navigationPrimary > li {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

#navigationPrimary > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#navigationPrimary > li > a:hover,
#navigationPrimary > li > a:focus,
#navigationPrimary > li:hover > a {
  background-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  text-decoration: none;
}

/* Dropdown Submenu (About & Submission) */
#navigationPrimary > li > ul {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 245px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background-color: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

#navigationPrimary > li:hover > ul,
#navigationPrimary > li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#navigationPrimary > li > ul li {
  margin: 0;
  padding: 0;
}

#navigationPrimary > li > ul li a {
  display: block;
  padding: 9px 14px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: #1e293b;
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

#navigationPrimary > li > ul li a:hover,
#navigationPrimary > li > ul li a:focus {
  background-color: #fef2f2;
  color: #7a0909;
  padding-left: 18px;
  text-decoration: none;
}

/* Tombol Search Sejajar di Kanan */
.pkp_navigation_search_wrapper {
  flex-shrink: 0;
  margin-left: auto;
}

.pkp_navigation_search_wrapper a.pkp_search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  background-color: transparent;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.pkp_navigation_search_wrapper a.pkp_search:hover,
.pkp_navigation_search_wrapper a.pkp_search:focus {
  background-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  text-decoration: none;
}


/* ==========================================================================
   BAGIAN 2: CAROUSEL HIGHLIGHTS HOMEPAGE (TANPA BORDER)
   ========================================================================== */
.page.page_homepage .highlights {
  position: relative;
  width: 100%;
  margin: 0 0 32px 0;
  padding: 0;
  border: none;
  background: transparent;
}

.page.page_homepage .highlights .swiper {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.page.page_homepage .highlights .swiper-slide.-has-image {
  display: grid;
  grid-template-columns: 44% 56%;
  align-items: stretch;
  min-height: 380px;
  background-color: #ffffff;
  border: none;
  box-sizing: border-box;
}

/* Gambar utuh tanpa terpotong */
.page.page_homepage .highlights .swiper-slide-image {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  background-color: #f8fafc;
  padding: 18px;
  border: none;
  box-sizing: border-box;
  display: block;
}

.page.page_homepage .highlights .swiper-slide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 46px 42px 24px;
  background: transparent;
  box-sizing: border-box;
}

.page.page_homepage .highlights .swiper-slide-title {
  margin: 0 0 12px 0;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.page.page_homepage .highlights .swiper-slide-desc {
  margin-bottom: 20px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page.page_homepage .highlights .swiper-slide-desc p {
  margin: 0 0 8px 0;
}

.page.page_homepage .highlights .swiper-slide-desc p:last-child {
  margin-bottom: 0;
}

.page.page_homepage .highlights .swiper-slide-button.pkp_button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #005b96;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.page.page_homepage .highlights .swiper-slide-button.pkp_button:hover {
  background-color: #004370;
  transform: translateY(-1px);
}

/* Tombol Panah Navigasi & Pagination Carousel */
.page.page_homepage .highlights .swiper-button-prev,
.page.page_homepage .highlights .swiper-button-next {
  width: 34px;
  height: 34px;
  background-color: rgba(255, 255, 255, 0.94);
  color: #1e293b;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  transition: all 0.2s ease;
}

.page.page_homepage .highlights .swiper-button-prev {
  left: 10px;
}

.page.page_homepage .highlights .swiper-button-next {
  right: 10px;
}

.page.page_homepage .highlights .swiper-button-prev svg {
  transform: rotate(180deg);
}

.page.page_homepage .highlights .swiper-button-prev svg,
.page.page_homepage .highlights .swiper-button-next svg {
  width: 11px;
  height: 11px;
}

.page.page_homepage .highlights .swiper-button-prev:hover,
.page.page_homepage .highlights .swiper-button-next:hover {
  background-color: #005b96;
  color: #ffffff;
}

.page.page_homepage .highlights .swiper-button-disabled {
  opacity: 0.35 !important;
  pointer-events: none;
}

.page.page_homepage .highlights .swiper-pagination {
  bottom: 12px !important;
}

.page.page_homepage .highlights .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  opacity: 0.6;
  transition: all 0.25s ease;
}

.page.page_homepage .highlights .swiper-pagination-bullet-active {
  width: 20px;
  border-radius: 4px;
  background: #005b96;
  opacity: 1;
}


/* ==========================================================================
   BAGIAN 3: NAVIGASI SERIES HALAMAN CATALOG (MODEL BUTTON PILL)
   ========================================================================== */
nav.pkp_series_nav_menu {
  display: block;
  margin: 20px 0 28px 0;
  padding: 0;
}

nav.pkp_series_nav_menu h2 {
  display: block;
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

nav.pkp_series_nav_menu ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav.pkp_series_nav_menu li {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

nav.pkp_series_nav_menu li span[aria-hidden="true"] {
  display: none;
}

nav.pkp_series_nav_menu li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  color: #1e293b;
  background-color: #f1f5f9;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

nav.pkp_series_nav_menu li a:hover,
nav.pkp_series_nav_menu li a:focus {
  color: #ffffff;
  background-color: #005b96;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 91, 150, 0.2);
}

nav.pkp_series_nav_menu li a:active {
  transform: translateY(0);
}


/* ==========================================================================
   BAGIAN 4: RESPONSIVE BREAKPOINTS (TERPUSAT & ANTI-BENTROK)
   ========================================================================== */

/* Tablet & Layar Menengah (<= 1024px) */
@media (max-width: 1024px) {
  #navigationUserWrapper.pkp_navigation_user_wrapper {
    top: 8px;
    right: 16px;
    left: auto;
  }

  .pkp_navigation_primary_wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 14px 0;
  }

  #navigationPrimary.pkp_navigation_primary {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  #navigationPrimary > li > a {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
  }

  #navigationPrimary > li > ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    margin: 4px 0 6px 12px;
    padding: 6px;
  }

  #navigationPrimary > li > ul li a {
    color: rgba(255, 255, 255, 0.92);
    padding: 8px 12px;
  }

  #navigationPrimary > li > ul li a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding-left: 14px;
  }

  .pkp_navigation_search_wrapper {
    margin: 8px 0 0 0;
  }

  .pkp_navigation_search_wrapper a.pkp_search {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 9px 16px;
    background-color: rgba(255, 255, 255, 0.14);
  }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
  .page.page_homepage .highlights .swiper-slide.-has-image {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .page.page_homepage .highlights .swiper-slide-image {
    max-height: 300px;
    padding: 16px;
  }

  .page.page_homepage .highlights .swiper-slide-content {
    padding: 22px 22px 42px 22px;
  }

  .page.page_homepage .highlights .swiper-slide-title {
    font-size: 1.15rem;
  }

  .page.page_homepage .highlights .swiper-button-prev,
  .page.page_homepage .highlights .swiper-button-next {
    top: 150px;
  }
}

/* Mobile Kecil (<= 640px) */
@media (max-width: 640px) {
  nav.pkp_series_nav_menu {
    margin: 16px 0 22px 0;
  }

  nav.pkp_series_nav_menu ul {
    gap: 6px 8px;
  }

  nav.pkp_series_nav_menu li a {
    padding: 7px 13px;
    font-size: 1rem;
  }
}
/* ==========================================================================
   BAGIAN 5: FOOTER
   ========================================================================== */
.pkp_structure_footer_wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

/* Menyembunyikan logo/teks bawaan OMP/PKP di bagian bawah */
  .pkp_brand_footer {
    display: none !important;
  }

  .omp-custom-footer {
    background-color: #ddd; 
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Mengurangi padding atas dari 50px menjadi 20px */
    padding: 20px 20px 20px; 
    line-height: 1.6;
    /* Menghilangkan margin atas agar lebih mepet ke konten utama */
    margin-top: 0; 
  }
  .omp-custom-footer .footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
  }
  .omp-custom-footer h4 {
    color: #111111;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #555555; 
    padding-bottom: 10px;
    display: inline-block;
  }
  .omp-custom-footer p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #333333;
  }
  .omp-custom-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .omp-custom-footer ul li {
    margin-bottom: 12px;
  }
  .omp-custom-footer ul li a {
    color: #333333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
  }
  .omp-custom-footer ul li a:hover {
    color: #00599c; 
    text-decoration: underline;
  }
  .omp-custom-footer .pkp-attribution {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .omp-custom-footer .pkp-attribution .pkp-text {
    font-size: 0.85rem;
    color: #333333; 
    margin-bottom: 5px;
  }
  .omp-custom-footer .pkp-attribution .pkp-logo {
    font-family: "Times New Roman", Times, serif;
    font-size: 1.8rem;
    color: #000000; 
    letter-spacing: 1px;
    text-decoration: none;
  }
  .omp-custom-footer .footer-copyright {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #cccccc; 
    text-align: center;
    font-size: 0.85rem;
    color: #555555;
  }

  @media (max-width: 768px) {
    .omp-custom-footer .footer-grid {
      gap: 25px;
    }
  }

 /* ========================================================
   KUSTOMISASI SIDEBAR BROWSE SERIES (BENTUK TAGS/LABEL)
   ======================================================== */

/* 1. Membungkus blok sidebar menjadi bentuk kartu modern */
.pkp_block.block_browse {
    background-color: #ffffff;
   /* border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);*/
    margin-bottom: 2px;
}

/* 2. Gaya untuk Judul "Browse" */
.pkp_block.block_browse .title {
    font-size: 1rem;
    font-weight: 600;
    color: #222831;
    margin-bottom: 2px;
    display: block;
    border-bottom: 1px solid #00599c; 
    padding-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 3. Menghilangkan titik list bawaan */
.pkp_block.block_browse .content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 4. Gaya untuk teks "Series" disembunyikan agar lebih bersih (opsional) 
      Hapus "display: none;" jika teks "Series" masih ingin dimunculkan */
.pkp_block.block_browse .has_submenu {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444444;
}

/* 5. Mengubah list agar menyamping dan turun ke bawah jika penuh (Wrap) */
.pkp_block.block_browse .has_submenu ul {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap; /* Kunci agar elemen berjejer ke samping */
    gap: 5px; /* Jarak antar tag */
}

/* 6. Mengubah link seri menjadi bentuk kapsul/pil (Tag Cloud) */
.pkp_block.block_browse .has_submenu ul li a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f4f6f9;
    color: #00599c;
    text-decoration: none;
    border-radius: 20px; /* Membuat ujung melengkung seperti pil */
    font-size: 0.85rem; /* Ukuran font disesuaikan agar rapi */
    font-weight: 500;
    border: 1px solid #dcdcdc; /* Garis tepi tipis */
    transition: all 0.3s ease;
}

/* 7. Efek saat kursor diarahkan (Hover) */
.pkp_block.block_browse .has_submenu ul li a:hover {
    background-color: #00599c;
    color: #ffffff;
    border-color: #00599c;
    transform: translateY(-2px); /* Efek tag terangkat sedikit ke atas */
    box-shadow: 0 4px 8px rgba(0, 89, 156, 0.2);
}

/* ========================================================
   GAYA UNTUK CUSTOM SIDEBAR (Templates, Indexed by, dll)
   ======================================================== */

.custom-sidebar-widget {
    background-color: #ffffff;
   /* border: 1px solid #e0e4e8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);*/
    margin-bottom: 2px;
}

/* 1. Gaya khusus untuk judul (Templates, Indexed by, dsb) */
.custom-sidebar-widget .sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #222831;
    margin-top: 20px; /* Memberi jarak antara gambar blok sebelumnya dengan judul baru */
    margin-bottom: 15px;
    display: block;
    border-bottom: 1px solid #00599c; /* Garis bawah biru BRIN */
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 2. Menghilangkan margin atas pada judul paling pertama ("Templates") */
.custom-sidebar-widget .sidebar-title:first-of-type {
    margin-top: 0;
}

/* 3. Memastikan gambar menyesuaikan ruang sidebar dan terlihat rapi */
.custom-sidebar-widget img {
    max-width: 100%;
    height: auto;
    margin-bottom: 8px;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

/* 4. Sedikit efek hover ketika gambar disentuh kursor */
.custom-sidebar-widget a:hover img {
    transform: scale(1.03); 
}