/* ============================================================
   OJS Custom Theme - Elegant Green (Full Version)
   ------------------------------------------------------------
   Desain: hijau elegan, modern, menu tidak tertutup, 
   sidebar persisten, banner beranda responsif penuh,
   DOI dan PDF tampil di halaman depan & artikel.
   ============================================================ */

/* ======== VARIABEL WARNA DAN TEMA ======== */
:root {
  --green-900: #0b3d2e;
  --green-800: #0f5b3f;
  --green-700: #13855a;
  --green-600: #19a174;
  --green-500: #39c38f;
  --green-400: #8ee3bd;
  --bg: #f9fff9;
  --card: #ffffff;
  --shadow: 0 6px 18px rgba(11,45,30,0.10);
  --radius: 12px;
  --ease: cubic-bezier(.2,.9,.3,1);
  --max-width: 1200px;
}

/* ======== GLOBAL STYLE ======== */
body {
  background: linear-gradient(180deg, #f9fff9 0%, var(--bg) 100%);
  color: #0f1720;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

.site {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
}

/* ======== HEADER / NAVIGATION ======== */
.ojs-topbar,
.site-header {
  background: linear-gradient(90deg, rgba(19,133,90,0.06), rgba(15,91,63,0.03));
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 12px;
  z-index: 100;
}

.site-logo img {
  height: 44px;
  border-radius: 8px;
}

/* ======== LAYOUT: SIDEBAR & CONTENT ======== */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 18px;
}

/* SIDEBAR */
.sidebar {
  background: linear-gradient(180deg, rgba(19,133,90,0.04), rgba(15,91,63,0.02));
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  height: calc(100vh - 140px);
  overflow: auto;
  position: sticky;
  top: 82px;
  border-left: 3px solid rgba(19,133,90,0.08);
}

.sidebar .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .menu-item {
  margin-bottom: 8px;
}

.sidebar .menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-decoration: none;
  color: var(--green-900);
  font-weight: 600;
  background: transparent;
  border-radius: 10px;
  transition: transform .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
}

.sidebar .menu-link:hover {
  background: linear-gradient(90deg, rgba(25,161,116,0.06), rgba(57,195,143,0.03));
  transform: translateX(6px);
  box-shadow: 0 6px 18px rgba(17,95,66,0.06);
}

.sidebar .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(180deg,var(--green-600),var(--green-500));
  color: white;
  box-shadow: 0 4px 12px rgba(13,61,44,0.18);
}

/* SUBMENU (selalu terlihat) */
.submenu {
  margin-top: 6px;
  margin-left: 46px;
  display: block;
}

.submenu .submenu-item {
  padding: 8px 10px;
  border-radius: 8px;
  display: block;
  color: var(--green-900);
  text-decoration: none;
  font-weight: 500;
}

.submenu .submenu-item:hover {
  background: rgba(19,133,90,0.05);
  transform: translateX(4px);
}

/* ======== CONTENT AREA ======== */
.content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  min-height: 60vh;
}

/* ARTICLE CARD */
.article-card {
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 26px rgba(7,38,26,0.04);
  border-left: 4px solid var(--green-400);
}

.article-card h2 {
  color: var(--green-800);
  margin-bottom: 10px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  background: linear-gradient(90deg, var(--green-600), var(--green-500));
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(10,90,60,0.12);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(19,133,90,0.12);
  color: var(--green-900);
}

/* ======== NAV / MEGA MENU ======== */
.nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--green-900);
  text-decoration: none;
}

.mega-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 920px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), var(--card));
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(11,45,30,0.12);
  display: none;
  z-index: 60;
  border: 1px solid rgba(10,60,40,0.04);
}

.nav-item:hover > .mega-panel,
.nav-item:focus-within > .mega-panel {
  display: grid;
  grid-template-columns: 1fr 1fr 260px;
  gap: 16px;
  animation: pop .16s var(--ease) both;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-6px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-col h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--green-900);
  font-weight: 700;
}

.mega-col a {
  text-decoration: none;
  color: #0c2a1f;
  padding: 8px;
  border-radius: 8px;
  font-weight: 600;
}

.mega-col a:hover {
  background: rgba(19,133,90,0.04);
  transform: translateX(4px);
}

.mega-panel .aside {
  border-left: 1px dashed rgba(10,60,40,0.03);
  padding-left: 12px;
}

/* ======== BREADCRUMBS ======== */
.breadcrumbs {
  font-size: 13px;
  color: rgba(7,25,18,0.7);
  margin-bottom: 12px;
}

/* ======== BERANDA / HOMEPAGE BANNER ======== */
.home-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  height: clamp(280px, 50vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(19,133,90,0.05), rgba(25,161,116,0.10));
}

.home-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92) contrast(1.05) saturate(1.1);
  transition: transform .6s var(--ease), filter .4s var(--ease);
}

.home-banner:hover img {
  transform: scale(1.04);
  filter: brightness(1) contrast(1.08);
}

.home-banner .banner-text {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 32px;
  flex-direction: column;
  gap: 10px;
}

.home-banner .banner-text h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.home-banner .banner-text p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 720px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}

.home-banner .banner-btn {
  margin-top: 16px;
  background: linear-gradient(90deg, var(--green-600), var(--green-500));
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(13,61,44,0.20);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.home-banner .banner-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(19,133,90,0.25);
}

/* ======== DOI & PDF BUTTON STYLE ======== */
.article-doi {
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(25,161,116,0.05), rgba(57,195,143,0.04));
  border-left: 4px solid var(--green-600);
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(11,45,30,0.05);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-doi .doi-label {
  font-weight: 700;
  color: var(--green-800);
  text-transform: uppercase;
}

.article-doi a {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
  transition: color .2s var(--ease);
}

.article-doi a:hover {
  color: var(--green-900);
  text-decoration: underline;
}

/* DOI dan tombol PDF di daftar artikel */
.article-doi-summary {
  font-size: 0.85rem;
  margin-top: 4px;
  display: inline-block;
  margin-right: 8px;
}

.article-doi-summary a {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 500;
}

.article-doi-summary a:hover {
  text-decoration: underline;
  color: var(--green-900);
}

/* Tombol PDF */
.article-pdf-link,
.article-pdf-detail {
  margin-top: 6px;
  display: inline-block;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, var(--green-600), var(--green-500));
  color: #fff;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(10,90,60,0.1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.btn-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10,90,60,0.18);
}

.btn-pdf .icon {
  font-size: 1rem;
  display: inline-block;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    display: flex;
    overflow: visible;
  }

  .sidebar .menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .sidebar .menu-link {
    white-space: nowrap;
  }

  .mega-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 80px;
    width: auto;
    max-width: unset;
  }

  .home-banner {
    height: clamp(200px, 45vh, 360px);
  }

  .home-banner .banner-text {
    padding: 20px;
  }

  .home-banner .banner-text h1 {
    font-size: 1.6rem;
  }

  .home-banner .banner-text p {
    font-size: 0.95rem;
  }

  .article-doi,
  .article-pdf-link,
  .article-doi-summary {
    display: block;
    margin-bottom: 8px;
  }
}

/* ======== REDUCED MOTION ======== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
