/* ==========================================================================
   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;
  }
}