/* ==========================================================================
   LABIQA Journal of Health Sciences - Custom Modern Stylesheet
   Kombinasi Warna: Royal Medical Purple & Health Emerald Green
   ========================================================================== */

:root {
  /* Nuansa Palette: Clean Academic & Health Accent */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #2e1f47;         /* Ungu sangat gelap untuk keterbacaan tinggi */
  --text-muted: #64748b;
  --text-light: #475569;
  
  /* Brand Colors LABIQA (Purple & Green Combination) */
  --primary-color: #4a2874;     /* Royal Medical Purple */
  --primary-gradient: linear-gradient(135deg, #4a2874 0%, #2a114a 100%);
  --accent-color: #10b981;      /* Health Emerald Green */
  --accent-hover: #059669;      /* Darker Emerald Green */
  --sidebar-header-bg: linear-gradient(135deg, #4a2874 0%, #311452 100%);
  
  /* Borders, Pills, & Shadows */
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --pill-bg: #f8fafc;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Easing & Performance Animations */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition-bounce: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(74, 40, 116, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(74, 40, 116, 0.08), 0 8px 10px -6px rgba(74, 40, 116, 0.08);
}

/* ==========================================================================
   MODERN MEDICAL BACKGROUND STYLING
   ========================================================================== */
body {
  font-family: var(--font-sans);
  color: var(--text-main);
  margin: 0;
  padding: 40px 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  /* Latar belakang cerah dengan tone abu-abu medis yang sangat bersih */
  background-color: #f6f8fa; 

  /* Kombinasi pola Grid Lab & Heksagonal Kimia menggunakan CSS Efek Transparan */
  background-image: 
    /* Pola 1: Grid Laboratorium Halus */
    linear-gradient(rgba(74, 40, 116, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 40, 116, 0.015) 1px, transparent 1px),
    /* Pola 2: Aksen Heksagonal Medis / Rumus Kimia Transparan */
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.01) 20%, transparent 20%),
    radial-gradient(circle at 0 0, rgba(74, 40, 116, 0.01) 40%, transparent 40%);
  
  /* Ukuran presisi untuk pola latar belakang */
  background-size: 40px 40px, 40px 40px, 80px 80px, 120px 120px;
  background-attachment: fixed;
  position: relative;
}

/* Efek Soft Glow Kesehatan di Sudut Halaman (Aksen Tambahan Modern) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.03) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(74, 40, 116, 0.02) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   2. OJS CORE HEADER COMPONENT CLEANUP (REFINE & PRECISION)
   ========================================================================== */
#header,
.pkp_structure_head {
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 100% !important;
}

.pkp_site_name_wrapper {
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 100%;
  display: flex;
  justify-content: center; /* Membuat header berada tepat di tengah */
  border-bottom: 4px solid var(--accent-color); /* Aksen garis hijau di bawah header */
  background-color: #ffffff;
}

.pkp_site_name,
.pkp_site_name > a {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center;
}

.pkp_site_name .is_img img {
  width: 100% !important;
  max-width: 1200px; /* Batas lebar maksimal mengikuti kontainer OJS agar presisi dengan menu */
  height: auto !important;
  max-height: none !important;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* Mengatur posisi menu profil user (kanan atas) agar tidak menabrak gambar header */
.pkp_navigation_user_wrapper {
  position: absolute;
  top: 10px;
  right: 20px;
  z-index: 999;
}

.pkp_structure_page {
  margin-block: 20px !important;
}

/* ==========================================================================
   3. SIDEBAR COMPONENT (Bento-Grid Inspired Style)
   ========================================================================== */
.custom-sidebar {
  font-family: var(--font-sans);
}

.sidebar-section {
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.sidebar-section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(74, 40, 116, 0.2);
}

.sidebar-header {
  background: var(--sidebar-header-bg);
  color: #ffffff;
  padding: 16px 20px;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 12px;
  position: relative;
}

/* Aksen dekoratif garis hijau di bawah judul sidebar ungu */
.sidebar-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 30px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.sidebar-content {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

/* Base style untuk item menu sidebar */
.sidebar-anim {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.sidebar-anim a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: 13.5px;
  border-bottom: 1px solid var(--pill-bg);
  position: relative;
  z-index: 2;
  transition: var(--transition-smooth);
}

.sidebar-anim:last-child a {
  border-bottom: none;
}

/* Icon style */
.sidebar-anim em {
  color: var(--text-muted);
  font-size: 16px;
  width: 20px;
  text-align: center;
  transition: var(--transition-smooth);
}

/* ===== SIDEBAR HOVER ANIMATION (Glow & Slide Interaction) ===== */
.sidebar-anim:hover {
  background-color: var(--primary-color) !important; /* Latar belakang berubah menjadi Ungu */
}

/* Efek garis indikator vertikal hijau di kiri saat di-hover */
.sidebar-anim::after {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-color), #34d399);
  transition: left 0.3s ease;
}

.sidebar-anim:hover::after {
  left: 0;
}

.sidebar-anim:hover a {
  transform: translateX(6px);
  color: #ffffff !important;
}

.sidebar-anim:hover em {
  color: var(--accent-color); /* Icon berubah warna menjadi hijau kesehatan */
  transform: scale(1.1);
}

/* ==========================================================================
   4. ARTICLE CARDS (Clean Dashboard Grid & Clean Typo)
   ========================================================================== */
.obj_article_summary {
  background: var(--bg-card);
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  
  will-change: transform, box-shadow;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease;
  
  animation: modernFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Efek Elevasi Card & Border Accent Modern saat Hover */
.obj_article_summary:hover {
  transform: translateY(-5px); 
  box-shadow: var(--shadow-md);
  border-color: rgba(74, 40, 116, 0.2);
}

/* Indikator aksen garis tipis hijau medis di sisi kiri card saat di-hover */
.obj_article_summary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--accent-hover);
  transition: height 0.3s ease;
}
.obj_article_summary:hover::before {
  height: 100%;
}

/* Typography Judul Artikel */
.obj_article_summary .title a {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease;
}

.obj_article_summary:hover .title a {
  color: var(--primary-color); /* Judul berubah menjadi ungu saat card di-hover */
}

/* Efek garis bawah judul minimalis modern berwarna hijau */
.obj_article_summary .title a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  margin-top: 4px;
  transition: width 0.3s ease;
}

.obj_article_summary:hover .title a::after {
  width: 45px;
}

/* ===== GALLEY / PDF PULSE BUTTON REFINE ===== */
.obj_article_summary .galley_link {
  display: inline-flex;
  align-items: center;
  background-color: var(--accent-color) !important; /* Tombol PDF berwarna hijau */
  color: #ffffff !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 16px !important;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.obj_article_summary .galley_link:hover {
  background-color: var(--accent-hover) !important;
  transform: translateY(-2px);
  filter: brightness(1.05);
  animation: modernPulse 2s infinite;
}

/* ==========================================================================
   5. TEXT JUSTIFICATION & READABILITY ENHANCEMENT
   ========================================================================== */
.obj_article_details .abstract,
.obj_article_details .references {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.75;
  color: var(--text-light);
  font-size: 14.5px;
}

.obj_article_details .abstract h3 {
  color: var(--primary-color); /* Heading abstrak berwarna ungu */
  font-weight: 700;
  border-left: 4px solid var(--accent-color); /* Variasi border kiri hijau */
  padding-left: 10px;
}

/* ==========================================================================
   6. MODERN KEYFRAMES (Hardware Accelerated)
   ========================================================================== */
@keyframes modernPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes modernFadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}