/* ================================================
   Custom CSS - E-Journal STKIP Budidaya Binjai
   ================================================ */

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

/* Background global */
body {
  background-color: #f4f7fb !important;
}

.pkp_structure_main {
  background: #edf3fa !important;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(10,61,107,0.08);
}

.is_site_index .journals > ul > li {
  border: 1px solid #dce8f5 !important;
  background: #f0f5fc !important;
}

/* ══════════════════════════════════════
   HOMEPAGE ONLY
   ══════════════════════════════════════ */

body:has(.is_site_index) .pkp_structure_head {
  background: linear-gradient(135deg, #1565a8 0%, #1e8ab4 50%, #29b6d8 100%) !important;
  border-bottom: 3px solid #c9a84c !important;
}

@media (min-width: 992px) {
  body:has(.is_site_index) .pkp_head_wrapper {
    padding-top: 0.5rem !important;
    padding-bottom: 0.4rem !important;
    overflow: visible !important;
  }
  body:has(.is_site_index).has_site_logo .pkp_head_wrapper {
    padding-top: 0.3rem !important;
  }
}

body:has(.is_site_index) .pkp_site_name .is_img img {
  max-height: 52px !important;
}

/* Nama & tagline di samping logo */
body:has(.is_site_index) .pkp_site_name {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body:has(.is_site_index) .site_header_text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body:has(.is_site_index) .site_header_title {
  color: #ffffff;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  line-height: 1.3;
  display: block;
}

body:has(.is_site_index) .site_header_tagline {
  color: rgba(255,255,255,0.72);
  font-size: 0.67rem;
  font-weight: 400;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

/* Navigasi */
body:has(.is_site_index) .pkp_navigation_primary_row {
  background: rgba(0,0,0,0.15) !important;
  border-top: 1px solid rgba(255,255,255,0.15) !important;
}

body:has(.is_site_index) .pkp_navigation_primary > li > a {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 0.84rem !important;
  border-bottom-color: transparent !important;
}

body:has(.is_site_index) .pkp_navigation_primary > li > a:hover,
body:has(.is_site_index) .pkp_nav_list > li:hover > a {
  color: #ffffff !important;
  background: rgba(0,0,0,0.15) !important;
  border-bottom-color: #c9a84c !important;
}

/* Dropdown */
body:has(.is_site_index) .pkp_nav_list ul {
  z-index: 99999 !important;
  background: #1565a8 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25) !important;
  border-radius: 4px !important;
}

body:has(.is_site_index) .pkp_nav_list ul a {
  color: rgba(255,255,255,0.90) !important;
  border-left-color: transparent !important;
}

body:has(.is_site_index) .pkp_nav_list ul a:hover,
body:has(.is_site_index) .pkp_nav_list ul a:focus {
  background: rgba(0,0,0,0.15) !important;
  border-left-color: #c9a84c !important;
  color: #ffffff !important;
}

body:has(.is_site_index) .pkp_navigation_user_wrapper {
  background: rgba(0,0,0,0.12) !important;
}

body:has(.is_site_index) .pkp_navigation_user a {
  color: rgba(255,255,255,0.85) !important;
}

/* Kartu jurnal */
.is_site_index .journals > ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.is_site_index .journals > ul > li {
  border: 1px solid #d0e6f5 !important;
  border-radius: 6px !important;
  padding: 16px !important;
  margin-bottom: 14px !important;
  background: #ffffff;
  transition: box-shadow 0.2s, transform 0.2s;
}

.is_site_index .journals > ul > li:hover {
  box-shadow: 0 4px 16px rgba(10,61,107,0.11) !important;
  transform: translateY(-2px);
}

.is_site_index .journals h3 a {
  color: #0a3d6b !important;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 1.0rem;
}

.is_site_index .journals h3 a:hover {
  color: #1e8ab4 !important;
}

.is_site_index .journals .links {
  list-style: none !important;
  padding: 0 !important;
  margin-top: 10px !important;
  display: flex;
  gap: 8px;
}

.is_site_index .journals .links li {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.is_site_index .journals .links li:hover {
  box-shadow: none !important;
  transform: none !important;
}

.is_site_index .journals .links a {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 0.80rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}

.is_site_index .journals .links .view a {
  background: #1e8ab4;
  color: #ffffff !important;
}

.is_site_index .journals .links .view a:hover {
  background: #1565a8;
}

.is_site_index .journals .links .current a {
  border: 1px solid #1e8ab4;
  color: #1e8ab4 !important;
  background: transparent;
}

.is_site_index .journals .links .current a:hover {
  background: #e8f4fb;
}

/* ══════════════════════════════════════
   SIDEBAR — homepage
   ══════════════════════════════════════ */

/* Menuturun hover */
#customblock-menuturun div {
  transition: background 0.2s !important;
}

#customblock-menuturun div:hover {
  background: #29b6d8 !important;
}

/* Language block — sembunyikan kalau hanya 1 item */
.block_language ul:not(:has(li:nth-child(2))) ~ * { display: none; }
.block_language:has(ul li:only-child) {
  display: none !important;
}

/* Language block */
.block_language {
  border: 1px solid #d0e6f5 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

.block_language .title {
  background: linear-gradient(90deg, #1565a8, #1e8ab4) !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 8px 12px !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.block_language .content {
  padding: 6px 0 !important;
  background: #f4f7fb;
}

.block_language ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.block_language ul li a {
  display: block;
  padding: 7px 14px !important;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1565a8 !important;
  text-decoration: none !important;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.block_language ul li a:hover {
  background: #dce8f5 !important;
  border-left-color: #1e8ab4;
  color: #0a3d6b !important;
}

.block_language ul li.current a {
  border-left-color: #c9a84c;
  color: #0a3d6b !important;
  background: #edf3fa;
  font-weight: 700;
}

/* ══════════════════════════════════════
   FOOTER HOMEPAGE
   ══════════════════════════════════════ */

.pkp_structure_footer_wrapper {
  background: #eef2f7 !important;
  border-top: 3px solid #c9a84c !important;
}

.pkp_footer_homepage {
  padding: 24px 28px !important;
}

.footer_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.footer_info {
  flex: 1;
  min-width: 240px;
}

.footer_map {
  flex: 1.3;
  min-width: 280px;
}

.footer_brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer_logo {
  height: 52px;
  width: auto;
}

.footer_brand_text {
  display: flex;
  flex-direction: column;
}

.footer_title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0a3d6b;
  line-height: 1.3;
}

.footer_subtitle {
  font-size: 0.70rem;
  color: #6a7a8a;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.footer_divider {
  height: 1px;
  background: linear-gradient(90deg, #c9a84c, transparent);
  margin-bottom: 14px;
}

.footer_contact_list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 14px 0 !important;
}

.footer_contact_list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: #3a4a5a;
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer_icon {
  flex-shrink: 0;
  width: 20px;
}

.footer_contact_list a {
  color: #1565a8 !important;
  text-decoration: none;
}

.footer_contact_list a:hover {
  color: #0a3d6b !important;
  text-decoration: underline;
}

.footer_copyright {
  font-size: 0.74rem;
  color: #8a9aaa;
  margin: 0 !important;
  padding-top: 10px;
  border-top: 1px solid #d8e4ee;
}

.footer_map_label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a3d6b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0 0 10px 0 !important;
}

.footer_maps_link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.76rem;
  color: #1565a8 !important;
  text-decoration: none;
}

.footer_maps_link:hover {
  color: #0a3d6b !important;
  text-decoration: underline;
}

/* Footer jurnal lain */
.pkp_footer_content {
  color: #2a3a4a !important;
  padding: 18px 24px !important;
  font-size: 0.84rem;
  line-height: 1.9;
}

.pkp_footer_content a {
  color: #1565a8 !important;
}

.pkp_brand_footer {
  padding: 10px 24px !important;
  border-top: 1px solid #d0dde8;
  background: #eef2f7 !important;
}

/* ══════════════════════════════════════
   RESPONSIVE MOBILE
   ══════════════════════════════════════ */

@media (max-width: 767px) {
  /* Fix mobile nav kosong */
  body:has(.is_site_index) .pkp_site_nav_menu {
    padding: 0 !important;
  }

  body:has(.is_site_index) .pkp_navigation_primary_row {
    padding: 4px 0 !important;
  }

body:has(.is_site_index) .pkp_navigation_user_wrapper {
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  /* Header mobile */
  body:has(.is_site_index) .site_header_title {
    font-size: 0.90rem !important;
  }
  body:has(.is_site_index) .site_header_tagline {
    font-size: 0.60rem !important;
  }
  body:has(.is_site_index) .pkp_site_name .is_img img {
    max-height: 42px !important;
  }

  /* Footer mobile */
  .footer_grid {
    flex-direction: column;
    gap: 20px;
  }
  .footer_map iframe {
    height: 160px !important;
  }
  .pkp_footer_homepage {
    padding: 18px 16px !important;
  }

  /* Kartu jurnal mobile */
  .is_site_index .journals > ul > li {
    padding: 12px !important;
  }
}
