/* ==========================================================================
   1. GLOBAL VARIABLES & MODERN RESET
   ========================================================================== */
:root {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #475569;
  
  --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --accent-color: #38bdf8;
  --accent-hover: #0284c7;
  --sidebar-header-bg: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --pill-bg: #f8fafc;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --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(0,0,0,0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}

body {
  font-family: var(--font-sans);
  background-color: #7e7f80;
  color: var(--text-main);
  margin: 0;
  padding: 40px 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  background-attachment: fixed;
}

/* ==========================================================================
   2. OJS CORE HEADER COMPONENT CLEANUP
   ========================================================================== */
#header, .pkp_site_name, .pkp_site_name > a { padding-block: 0 !important; }
.pkp_site_name .is_img img { max-height: 180px !important; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05)); }
.pkp_site_name_wrapper { padding-inline: 0; }
.pkp_navigation_user_wrapper { position: absolute; top: 0; right: 0; padding-right: 30px; z-index: 10; }
.pkp_structure_page { margin-block: 30px !important; padding-bottom: 30px !important; }

/* ==========================================================================
   3. SIDEBAR COMPONENT (Bento-Grid Inspired Style)
   ========================================================================== */
.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: var(--border-hover); }
.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; }
.sidebar-header::after { content: ""; position: absolute; bottom: 0; left: 20px; width: 30px; height: 3px; background: var(--accent-color); border-radius: 2px; }
.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); transition: var(--transition-smooth); }
.sidebar-anim:hover { background-color: #0f172a !important; }
.sidebar-anim::after { content: ""; position: absolute; top: 0; left: -4px; width: 4px; height: 100%; background: linear-gradient(to bottom, var(--accent-color), #0ea5e9); transition: left 0.3s ease; }
.sidebar-anim:hover::after { left: 0; }
.sidebar-anim:hover a { transform: translateX(6px); color: #ffffff !important; }

/* ==========================================================================
   4. ARTICLE CARDS & VISITOR COUNTER
   ========================================================================== */
.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; box-shadow: var(--shadow-sm); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1); animation: modernFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.obj_article_summary:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }

/* Meta Author (Legal Touch) */
.obj_article_summary .authors { font-family: 'Georgia', serif; font-size: 13.5px; color: var(--text-muted); font-style: italic; margin: 4px 0; }

/* Visitor Counter */
.article-visitor-counter { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.article-visitor-counter em { color: var(--accent-color); font-size: 12px; }

/* Title Styling */
.obj_article_summary .title a { color: var(--text-main); font-weight: 700; font-size: 1.2rem; text-decoration: none; display: inline-block; }
.obj_article_summary:hover .title a { color: var(--accent-hover); }

/* ==========================================================================
   5. UTILS & KEYFRAMES
   ========================================================================== */
@keyframes modernPulse {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

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