/**
 * PUSDI THM UNS Master Stylesheet — Academic Research Portal Architecture
 * Inspired by TropBRC IPB (biofarmaka.ipb.ac.id)
 * Strictly Anti-AI Slop: Restrained Radiuses, Editorial Grids, Real Sidebars, Official UNS Tokens
 */

/* ==========================================================================
   1. DESIGN TOKENS (UNS Brand Identity & Academic Standards)
   ========================================================================== */
:root {
  /* Official UNS Brand Colors */
  --uns-blue-primary: #00699e;
  --uns-blue-deep: #0f3d64;
  --uns-blue-dark: #181d27;
  --uns-blue-light: #e8f4fc;
  --uns-blue-border: #bae0f7;
  --uns-gold: #e8c204;
  --uns-gold-bright: #FFDB07;
  --uns-gold-hover: #cfa800;

  /* Natural Botanical Herbal Accents (Academic & Grounded, Never Neon) */
  --thm-green-dark: #1b4332;
  --thm-green-primary: #2d6a4f;
  --thm-green-light: #edf7f2;
  --thm-green-border: #b7e4c7;

  /* Neutrals & Surfaces */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Strict Anti-AI Slop Geometry */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px; /* Maximum allowable border-radius */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--uns-blue-deep);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
}

a {
  color: var(--uns-blue-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover, a:focus {
  color: var(--uns-blue-deep);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Override Hello Elementor default 1140px constraint on .site-main and #content */
body:not([class*="elementor-page-"]) .site-main,
#content.site-main,
.site-main,
.page-content,
#content {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pusdi-container {
  max-width: 1600px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 28px !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   3. HEADER & NAVIGATION (Editorial Academic Style)
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--uns-blue-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
}

.site-header .header-inner {
  max-width: 1600px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 12px 28px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.site-branding .site-title a {
  text-decoration: none;
}

.site-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.site-navigation ul li a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uns-blue-dark);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.site-navigation ul li a:hover,
.site-navigation ul li.current-menu-item a {
  background-color: var(--uns-blue-light);
  color: var(--uns-blue-primary);
}

/* Responsive Pill Scroll for Mobile */
@media (max-width: 768px) {
  .site-header .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-navigation {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .site-navigation ul {
    display: inline-flex;
    white-space: nowrap;
  }
}

/* ==========================================================================
   4. TWO-COLUMN ACADEMIC LAYOUT (Main 70% : Sidebar 30%)
   ========================================================================== */
.pusdi-layout-wrapper,
.pusdi-two-column-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 28px auto 48px auto;
  max-width: 1600px !important;
  width: 100% !important;
  padding: 0 28px !important;
  box-sizing: border-box !important;
}

@media (min-width: 992px) {
  .pusdi-layout-wrapper,
  .pusdi-two-column-layout {
    grid-template-columns: minmax(0, 7.3fr) minmax(0, 3.2fr);
  }
}

.pusdi-two-column-layout > p {
  display: none !important;
}

.pusdi-main-col {
  min-width: 0;
}

.pusdi-sidebar-col {
  min-width: 0;
}


@media (min-width: 992px) {
  .pusdi-sidebar-col {
    position: sticky;
    top: 90px;
    align-self: start;
  }
}

/* ==========================================================================
   5. ACADEMIC SIDEBAR & WIDGETS (Matching TropBRC IPB)
   ========================================================================== */
.pusdi-academic-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pusdi-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.pusdi-widget .widget-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--uns-blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--uns-blue-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
  position: relative;
}

.pusdi-widget .widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background-color: var(--uns-gold);
}

/* Search Widget */
.pusdi-search-group {
  display: flex;
  gap: 6px;
}

.pusdi-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.pusdi-search-input:focus {
  border-color: var(--uns-blue-primary);
}

.pusdi-search-btn {
  background: var(--uns-blue-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.2s;
}

.pusdi-search-btn:hover {
  background: var(--uns-blue-deep);
}

/* Quick Links Widget */
.pusdi-widget-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pusdi-widget-links li {
  border-bottom: 1px dashed var(--border-color);
  padding: 8px 0;
}

.pusdi-widget-links li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pusdi-widget-links li a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.pusdi-widget-links li a::before {
  content: '▸';
  color: var(--uns-blue-primary);
  font-size: 12px;
}

.pusdi-widget-links li a:hover {
  color: var(--uns-blue-primary);
  padding-left: 4px;
}

/* Agenda Widget */
.pusdi-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pusdi-agenda-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.pusdi-agenda-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pusdi-agenda-date {
  width: 46px;
  height: 48px;
  background: var(--uns-blue-deep);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  border-top: 3px solid var(--uns-gold);
}

.pusdi-agenda-date .day {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.pusdi-agenda-date .month {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--uns-gold-bright);
}

.pusdi-agenda-body h5 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px 0;
}

.pusdi-agenda-body h5 a {
  color: var(--text-main);
  text-decoration: none;
}

.pusdi-agenda-body h5 a:hover {
  color: var(--uns-blue-primary);
}

.pusdi-agenda-body .meta-loc {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Sidebar Posts Widget */
.pusdi-sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pusdi-s-post {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pusdi-s-post .s-post-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.pusdi-s-post .s-post-info h6 {
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.pusdi-s-post .s-post-info h6 a {
  color: var(--text-main);
  text-decoration: none;
}

.pusdi-s-post .s-post-info h6 a:hover {
  color: var(--uns-blue-primary);
}

.pusdi-s-post .s-post-info .s-post-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Secretariat Box */
.pusdi-secretariat-box {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.pusdi-secretariat-box p {
  margin: 0 0 10px 0;
}

.pusdi-btn-outline-sm {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--uns-blue-primary);
  border: 1px solid var(--uns-blue-primary);
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 4px;
}

.pusdi-btn-outline-sm:hover {
  background: var(--uns-blue-primary);
  color: #fff;
  text-decoration: none;
}

/* ==========================================================================
   6. FEATURED RESEARCH SLIDER / HERO
   ========================================================================== */
.pusdi-featured-slider {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.pusdi-slide-item {
  display: grid;
  grid-template-columns: 1fr;
  background: #ffffff;
}

@media (min-width: 768px) {
  .pusdi-slide-item {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.pusdi-slide-image {
  position: relative;
  min-height: 280px;
  background: #000;
}

.pusdi-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pusdi-slide-content {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pusdi-slide-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--uns-blue-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--uns-blue-light);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-bottom: 8px;
  align-self: flex-start;
}

.pusdi-slide-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--uns-blue-deep);
}

.pusdi-slide-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
}

/* ==========================================================================
   7. EDITORIAL CONTENT BLOCKS (Sections, Cards, Lists)
   ========================================================================== */
.pusdi-section-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.pusdi-section-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.pusdi-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--uns-blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  position: relative;
}

.pusdi-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 48px;
  height: 2px;
  background: var(--uns-gold);
}

/* Magazine News Feed (Editorial Articles) */
.pusdi-news-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pusdi-news-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 576px) {
  .pusdi-news-item {
    flex-direction: row;
    align-items: flex-start;
  }
}

.pusdi-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pusdi-news-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

@media (min-width: 576px) {
  .pusdi-news-thumb {
    width: 200px;
    height: 125px;
  }
}

.pusdi-news-details {
  flex: 1;
}

.pusdi-news-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pusdi-news-meta .meta-cat {
  font-weight: 700;
  color: var(--uns-blue-primary);
  text-transform: uppercase;
}

.pusdi-news-heading {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px 0;
}

.pusdi-news-heading a {
  color: var(--uns-blue-deep);
  text-decoration: none;
}

.pusdi-news-heading a:hover {
  color: var(--uns-blue-primary);
  text-decoration: underline;
}

.pusdi-news-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 10px 0;
}

.pusdi-news-readmore {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--uns-blue-primary);
}

/* 4-Pillar Research Umbrellas Grid */
.pusdi-umbrella-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .pusdi-umbrella-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pusdi-umbrella-card {
  background: #fbfcfd;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--uns-blue-primary);
  border-radius: var(--radius-xs);
  padding: 16px 18px;
}

.pusdi-umbrella-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--uns-blue-deep);
  margin: 0 0 6px 0;
}

.pusdi-umbrella-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Hilirisasi Product Showcase */
.pusdi-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .pusdi-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pusdi-product-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}

.pusdi-product-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.pusdi-product-info {
  padding: 16px;
}

.pusdi-product-info h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.pusdi-product-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 10px 0;
}

/* ==========================================================================
   8. CLEAN ACADEMIC DATA TABLES (Scopus, DJKI Patents)
   ========================================================================== */
.pusdi-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 24px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
}

.pusdi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.pusdi-table th {
  background: #f1f5f9;
  color: var(--uns-blue-deep);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-dark);
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

.pusdi-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  color: var(--text-main);
  line-height: 1.5;
}

.pusdi-table tr:hover td {
  background: #f8fafc;
}

/* ==========================================================================
   9. STATS BAR (Strict 4-Box Academic Counters)
   ========================================================================== */
.pusdi-stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background: var(--uns-blue-deep);
  border-radius: var(--radius-sm);
  padding: 24px;
  color: #fff;
  border-top: 3px solid var(--uns-gold);
}

@media (min-width: 768px) {
  .pusdi-stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pusdi-stat-unit {
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.pusdi-stat-unit:last-child {
  border-right: none;
}

.pusdi-stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--uns-gold-bright);
  line-height: 1;
  margin-bottom: 6px;
}

.pusdi-stat-lbl {
  font-size: 0.82rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ==========================================================================
   10. INNER PAGE BANNERS & BREADCRUMBS
   ========================================================================== */
.pusdi-page-banner {
  background: var(--uns-blue-deep);
  color: #ffffff;
  padding: 24px 0;
  border-bottom: 3px solid var(--uns-gold);
}

.pusdi-breadcrumbs {
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.pusdi-breadcrumbs a {
  color: #cbd5e1;
  text-decoration: none;
}

.pusdi-breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.pusdi-breadcrumbs .pusdi-sep {
  margin: 0 6px;
  color: #64748b;
}

.pusdi-breadcrumbs .pusdi-current {
  color: var(--uns-gold-bright);
  font-weight: 600;
}

.pusdi-page-banner-title {
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
}

/* ==========================================================================
   11. FOOTER (4-Column Academic Footer)
   ========================================================================== */
.site-footer {
  background-color: var(--uns-blue-dark);
  color: #cbd5e1;
  padding: 48px 0 24px 0;
  border-top: 3px solid var(--uns-blue-primary);
  margin-top: 48px;
}

.pusdi-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .pusdi-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .pusdi-footer-grid {
    grid-template-columns: 1.4fr 0.9fr 0.9fr 1.1fr;
  }
}

.site-footer h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--uns-blue-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
  position: relative;
}

.site-footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 32px;
  height: 2px;
  background: var(--uns-gold);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 2;
  font-size: 0.88rem;
}

.site-footer ul li a {
  color: #94a3b8;
  text-decoration: none;
}

.site-footer ul li a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
}


/* ==========================================================================
   12. WIDESCREEN & FULLSCREEN LAYOUT ENHANCEMENTS
   ========================================================================== */
@media (min-width: 1200px) {
  body:not([class*="elementor-page-"]) .site-main,
  body .site-main,
  #content.site-main,
  .site-main,
  .page-content,
  #content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-header .header-inner,
  .site-footer .footer-inner {
    max-width: 1560px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 12px 32px !important;
  }

  .pusdi-container {
    max-width: 1560px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
  }

  .pusdi-layout-wrapper,
  .pusdi-two-column-layout {
    max-width: 1560px !important;
    width: 100% !important;
    margin: 28px auto 48px auto !important;
    padding: 0 32px !important;
  }
}

@media (min-width: 1600px) {
  .site-header .header-inner,
  .site-footer .footer-inner,
  .pusdi-container,
  .pusdi-layout-wrapper,
  .pusdi-two-column-layout {
    max-width: 1680px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

