/* --- CUSTOM THEME: TEAL BLEND (Global Insights) --- */
/* Based on Kresna Template (Sidebar Animation Restored) */
/* Colors: Teal (#00505D), Light Green Blend, White */

@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap");

/* =================================================================
   1. GLOBAL LINK & BUTTON COLORS (TEAL THEME)
   ================================================================= */
body {
    font-family: "Nunito Sans", sans-serif;
    background-color: #f4fcfc;
}

a {
    color: #00505D !important; /* Teal Utama */
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover, a:focus {
    color: #003841 !important; /* Teal Lebih Gelap saat Hover */
}

/* Tombol Utama */
.btn-primary, .pkp_button_primary {
    background-color: #00505D !important;
    border-color: #00505D !important;
    color: #fff !important;
    border-radius: 4px;
}

.btn-primary:hover, .pkp_button_primary:hover {
    background-color: #003841 !important;
    border-color: #003841 !important;
}

/* =================================================================
   FIX: DROPDOWN MENU VISIBILITY (PERBAIKAN)
   ================================================================= */

/* Container Dropdown */
.pkp_navigation_primary > li > ul,
.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    padding: 10px 0 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    min-width: 200px;
    z-index: 9999;
}

/* Teks Menu Dropdown */
.pkp_navigation_primary > li > ul > li > a,
.dropdown-menu > li > a {
    color: #333333 !important;
    padding: 8px 20px !important;
    display: block;
    background-color: transparent !important;
    font-size: 14px;
    font-weight: 600;
}

/* Hover Dropdown Item */
.pkp_navigation_primary > li > ul > li > a:hover,
.pkp_navigation_primary > li > ul > li > a:focus,
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: #00505D !important;
    color: #ffffff !important;
    text-decoration: none;
}


/* =================================================================
   2. LAYOUT & STRUCTURE (FROM KRESNA)
   ================================================================= */

@media (min-width: 992px) {
  .pkp_navigation_primary_row {
    border-top: 3px solid #00505D !important;
    border-bottom: 2px solid #b2dfdb !important;
    background: #fff !important;
    padding-left: 2.143rem !important;
    padding-right: 2.143rem !important;
    position: relative;
  }

  body {
    height: 100% !important;
    background-image: url(https://i.imgur.com/uaryaKU.jpg) !important;
    background-color: #f4fcfc !important; 
  }

  .pkp_site_name .is_img img {
    max-height: 100% !important;
    margin-top: 0px !important;
    width: 1254px !important;
  }
}

/* =================================================================
   3. SIDEBAR BLOCKS (KRESNA STYLE + ANIMATION RESTORED)
   ================================================================= */

.pkp_block {
  overflow: hidden;
  border-radius: 2px !important; /* Gaya Kresna Asli */
  background: #fff !important;
  box-shadow: 0 0 0 1px #dfdfdf; /* Shadow Kresna Asli */
  padding: 0 !important;
  margin: 10px 10px 22px !important; /* Margin Kresna Asli */
}

.pkp_block .content {
  padding: 10px 20px;
}

/* --- ANIMASI LINK SIDEBAR (RESTORED) --- */
/* Menerapkan efek sliding underline ke semua link di sidebar */

.pkp_block .content a {
  display: block; /* Agar animasi garis penuh selebar kontainer */
  position: relative; /* Penting untuk animasi */
  overflow: hidden;
  text-decoration: none !important;
  color: #00505D !important; /* Teal */
  padding: 5px 0;
  transition: color 0.3s ease;
}

.pkp_block .content a:hover {
  color: #003841 !important; /* Darker Teal */
}

/* Elemen Garis Animasi */
.pkp_block .content a::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 100%; /* Awalnya tersembunyi (lebar 0 dari kanan) */
  bottom: 0;
  background: #4db6ac; /* Warna Garis: Hijau Muda Aksen */
  height: 2px; /* Ketebalan garis */
  transition: right 0.3s ease-out; /* Durasi animasi */
}

/* Trigger Animasi saat Hover */
.pkp_block .content a:hover::before {
  right: 0; /* Garis memanjang penuh */
}

/* Judul Sidebar */
.pkp_block .title {
  text-align: center;
  border-radius: 0 !important;
  padding: 10px 9px !important;
  background: #00505D !important;
  display: block !important;
  margin-bottom: 0.714rem !important;
  margin-top: 0 !important;
  font-family: Lato, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.43rem !important;
  color: #fff !important;
}

.pkp_block table {
  width: 100% !important;
}

/* =================================================================
   4. ADDITIONAL CONTENT (INDEXING & ABOUT)
   ================================================================= */

.additional_content {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.additional__header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .additional__header {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
    .additional__header .cover img {
        width: 100%;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        border-radius: 4px;
    }
}

.additional__header .about p {
    text-align: justify;
    line-height: 1.6;
    color: #444;
}

.additional__title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #00505D !important;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #b2dfdb;
    display: inline-block;
}

.additional_indexing_container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 40px;
}

.additional_indexing_container img {
    height: auto;
    width: auto;
    max-width: 150px;
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.additional_indexing_container img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* =================================================================
   5. GENERAL HOVER UTILITY (Backup)
   ================================================================= */

.side-menu_hover_effect {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
}

.side-menu_hover_effect:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 100%;
  bottom: 0;
  background: #4db6ac; 
  height: 2px;
  transition: right 0.3s ease-out;
}

.side-menu_hover_effect:active:before,
.side-menu_hover_effect:focus:before,
.side-menu_hover_effect:hover:before {
  right: 0;
}

.pkp_structure_main {
  text-align: justify;
}

.galley_info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  padding-left: 8px;
  border-left: 3px solid #00505D;
}

/* =================================================================
   6. HIDE ELEMENTS (Request)
   ================================================================= */

.homepage_about {
    display: none !important;
}

#navigationPrimary > li:last-child {
    display: none !important;
}

.pkp_navigation_search_wrapper {
    display: none !important;
}

/* =================================================================
   7. USER NAVIGATION BUTTONS (BOOTSTRAP STYLE RECREATION)
   ================================================================= */

#navigationUser {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute; 
    top: 10px;          
    right: 20px;        
    display: flex;
    gap: 10px;
    z-index: 1000;
}

#navigationUser > li > a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f8f9fa; 
    color: #00505D !important;
    border-radius: 50px; 
    font-weight: 700;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

#navigationUser > li > a:hover,
#navigationUser > li:focus-within > a {
    background-color: #00505D !important;
    color: #ffffff !important;
    border-color: #00505D;
    outline: none;
}

#navigationUser .badge {
    display: inline-block;
    min-width: 10px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    background-color: #d32f2f;
    border-radius: 10px;
    margin-left: 5px;
}

#navigationUser .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

/* --- LOGIKA DROPDOWN KLIK --- */

#navigationUser li {
    position: relative;
}

#navigationUser .dropdown-menu {
    display: none; 
    position: absolute;
    right: 0;
    top: 110%;
    margin-top: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
    min-width: 160px;
    padding: 5px 0;
    list-style: none;
    z-index: 1001;
}

#navigationUser li:focus-within .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

#navigationUser .dropdown-menu > li > a {
    display: block;
    padding: 8px 20px;
    font-weight: 600;
    color: #333 !important;
    background-color: transparent;
    border: none;
}

#navigationUser .dropdown-menu > li > a:hover {
    background-color: #00505D !important;
    color: #fff !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
    #navigationUser {
        position: static;
        display: block;
        text-align: center;
        margin: 10px auto;
    }
    #navigationUser > li {
        display: inline-block;
        margin: 0 5px;
    }
}
/* =================================================================
   8. MOBILE & TABLET MENU FIXES (RESPONSIVE)
   ================================================================= */

@media (max-width: 991px) {

    /* 1. RESET POSISI USER MENU (Search & Profile) */
    /* Menghilangkan posisi 'absolute' agar tidak terbang/acak-acakan */
    #navigationUser {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        display: flex !important;
        flex-direction: column; /* Susun vertikal ke bawah */
        align-items: center;
        width: 100%;
        margin: 20px 0 !important;
        padding: 0 !important;
        gap: 15px; /* Jarak antar tombol */
    }

    /* Agar tombol memanjang rapi di tengah */
    #navigationUser > li {
        width: 80%; /* Lebar tombol 80% dari layar */
        margin: 0 auto !important;
        display: block;
    }

    /* 2. PERBAIKI WARNA TOMBOL & TEKS (VISIBILITY) */
    /* Ubah warna tombol user agar kontras dengan background biru */
    #navigationUser > li > a {
        display: block !important;
        text-align: center;
        background-color: rgba(255, 255, 255, 0.2) !important; /* Putih transparan */
        color: #ffffff !important; /* Teks Putih Wajib */
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
    }

    #navigationUser > li > a:hover {
        background-color: #ffffff !important;
        color: #00505D !important; /* Teks Teal saat hover */
    }

    /* 3. PERBAIKI MENU UTAMA (About, Submission, dll) */
    /* Pastikan list utama terlihat rapi dan teksnya putih */
    .pkp_site_nav_menu--isOpen .pkp_navigation_primary_wrapper ul {
        display: block !important;
        text-align: left; /* Atau center jika ingin rata tengah */
        padding: 0 20px;
    }

    /* Warna Teks Menu Utama di Mobile */
    .pkp_site_nav_menu--isOpen a {
        color: #ffffff !important; /* Paksa teks jadi putih */
        font-size: 16px !important;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Garis pemisah tipis */
    }

    /* Hilangkan background hover aneh di mobile */
    .pkp_site_nav_menu--isOpen ul#navigationPrimary > li > a:hover {
        background-color: transparent !important;
        color: #b2dfdb !important; /* Warna aksen muda saat hover */
    }

    /* 4. PERBAIKI BADGE ANGKA (Notifikasi) */
    .task_count {
        background-color: #ffca28 !important; /* Kuning terang agar terlihat */
        color: #000 !important; /* Angka hitam */
        float: none !important;
        display: inline-block;
        margin-left: 10px;
    }
}