/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
  /* Color Palette (Slate & Blue Modern) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark-fallback: #0c1f33;
  --bg-hover-menu: #243f63;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-light: #475569;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent: #dabc8d;
  --border-color: #e2e8f0;
  --pill-bg: #f1f5f9;
  
  /* Fonts & Transitions */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

/* Base Body Styling */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 40px 20px;
  line-height: 1.5;
  
  /* Gabungan background linear-gradient & Cover Image */
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.03) 0px, transparent 0px),
    linear-gradient(rgba(255,255,255,0.03) 0px, transparent 0px),
    url('/public/site/images/lina89/COVER_TI.png');
  background-size: 40px 40px, 40px 40px, cover;
  background-repeat: repeat, repeat, no-repeat;
  background-position: center;
  background-attachment: fixed;
}

/* ==========================================================================
   2. HEADER & LAYOUT STRUCTURE
   ========================================================================== */
#header,
.pkp_site_name,
.pkp_site_name > a {
  padding-block: 0;
}

.pkp_site_name .is_img img {
  max-height: 200px;
  object-fit: contain;
}

.pkp_site_name_wrapper {
  padding-inline: 0;
}

.pkp_navigation_user_wrapper {
  position: absolute;
  top: 0;
  right: 0;
  padding-right: 30px;
}

.pkp_structure_page {
  margin-block: 20px;
  padding-bottom: 20px;
}

/* ==========================================================================
   3. MODERNIZED MENU & SIDEBAR ANIMATION (Hover Effects)
   ========================================================================== */
/* Menggabungkan selector untuk efisiensi code */
:is(.pkp_block ul li, .menu-anim) {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

:is(.pkp_block ul li, .menu-anim):hover {
  background-color: var(--bg-hover-menu);
  border-radius: 6px;
}

/* Animasi Underline Slide-in */
:is(.pkp_block ul li, .menu-anim)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background-color: var(--accent);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

:is(.pkp_block ul li, .menu-anim):hover::after {
  left: 0;
}

/* Animasi Text Link */
:is(.pkp_block ul li, .menu-anim) a {
  display: block;
  transition: var(--transition-smooth);
}

:is(.pkp_block ul li, .menu-anim):hover a {
  transform: translateX(8px);
  color: #ffffff;
}

/* ==========================================================================
   4. ARTICLE CONTENT & CARDS (Main Dashboard/View)
   ========================================================================== */
.article-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 30px 40px;
  border-radius: 16px; /* Lebih rounded, modern */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

/* Header Section with flex gap line */
.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.section-header span {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

.section-header::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background-color: var(--border-color);
}

/* Layout Artikel */
.article-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.4;
  transition: var(--transition-fast);
}

.article-title:hover {
  color: var(--primary-hover);
}

.article-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.authors {
  flex: 1;
}

.pages {
  font-weight: 600;
  color: #94a3b8;
}

/* Actions & Buttons Area */
.article-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background-color: var(--bg-card);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-download:hover {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}

/* Stats Pill Component */
.article-stats {
  display: flex;
  gap: 12px;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--pill-bg);
  padding: 6px 14px;
  border-radius: 9999px; /* Pill design sempurna */
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-icon-blue { color: #0ea5e9; }
.stat-icon-red { color: #ef4444; }

/* ==========================================================================
   5. TEXT JUSTIFICATION (Abstract & References)
   ========================================================================== */
/* Mengelompokkan elemen abstrak dan referensi OJS untuk clean-code */
:where(
  .obj_article_details .item.abstract,
  .obj_article_details .item.abstract p,
  .obj_article_summary .abstract,
  .obj_article_summary .summary,
  .obj_article_details .item.references,
  .obj_article_details .item.references p,
  .obj_article_details .item.references .value,
  .csl-bib-body
) {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.75;
  color: var(--text-light);
}

/* Spacing antar item referensi/daftar pustaka */
:where(.csl-entry, .obj_article_details .item.references li, .obj_article_details .item.references p) {
  margin-bottom: 12px;
}


/* Pengaturan Dasar & Background */
body {
    background-color: #f8fafc; /* Latar belakang abu-abu sangat muda agar kartu terlihat menonjol */
    margin: 0;
    padding: 20px;
}

.modern-container {
    font-family: 'Inter', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #1e293b;
}

/* Header Section */
.modern-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.modern-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    padding-right: 20px;
}

.header-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

/* Desain Kartu Artikel */
.modern-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.card-content {
    padding: 24px;
}

/* Judul Artikel */
.modern-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    line-height: 1.5;
}

.modern-title a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.modern-title a:hover {
    color: #1d4ed8;
}

/* Meta Data (Penulis & Halaman) */
.modern-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.modern-authors {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-authors i {
    color: #94a3b8;
    font-size: 16px;
}

/* Badge untuk Halaman */
.modern-badge {
    background-color: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tombol PDF */
.modern-actions {
    margin-bottom: 8px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #eff6ff;
    color: #2563eb;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
    color: #ffffff;
}

/* Footer Kartu (Statistik) */
.modern-footer {
    background-color: #f8fafc;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item strong {
    color: #334155;
}

.doi-link a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
}

.doi-link a:hover {
    text-decoration: underline;
}

/* Warna Ikon di Footer */
.icon-blue {
    color: #3b82f6;
}

.icon-red {
    color: #ef4444;
}

/* Responsivitas untuk layar kecil */
@media (max-width: 600px) {
    .modern-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .modern-footer {
        flex-direction: column;
        gap: 12px;
    }
}