/* ==========================================================================
   PERPUSTAKAAN DIGITAL M. ZEIN - Stitch Elegant Design System
   SMK Labor Pekanbaru - Modern OPAC SLiMS 9 Theme
   Compact, Crisp, Balanced Proportions
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800;900&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette */
  --primary: #002b85;
  --primary-dark: #001a52;
  --primary-hover: #001f60;
  --primary-light: #eff4ff;
  --secondary: #0284c7;
  --accent-gold: #f59e0b;
  --accent-amber: #d97706;
  --accent-emerald: #10b981;
  --accent-rose: #e11d48;
  --accent-indigo: #4f46e5;
  
  --bg-page: #f8faff;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-subtle: #e2e8f0;
  --border-glass: rgba(255, 255, 255, 0.9);
  
  --shadow-sm: 0 2px 8px rgba(0, 33, 71, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 33, 71, 0.05);
  --shadow-lg: 0 12px 32px rgba(0, 33, 71, 0.07);
  --shadow-float: 0 16px 40px rgba(0, 33, 71, 0.08);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   COMPACT TOP UTILITY BAR
   -------------------------------------------------------------------------- */
.stitch-topbar {
  background: #00163a;
  color: #94a3b8;
  font-size: 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stitch-topbar a {
  color: #cbd5e1;
}

.stitch-topbar a:hover {
  color: #ffffff;
}

.stitch-badge-open {
  background: #10b981;
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stitch-badge-closed {
  background: #64748b;
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   COMPACT STICKY NAVBAR
   -------------------------------------------------------------------------- */
.stitch-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1040;
  padding: 0.45rem 0;
  box-shadow: 0 2px 12px rgba(0, 33, 71, 0.03);
}

.stitch-navbar .navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.65rem;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.stitch-navbar .brand-logo-img {
  max-height: 38px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.stitch-navbar .brand-logo-img:hover {
  transform: scale(1.04);
}

.stitch-navbar .brand-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  display: block;
  white-space: nowrap;
}

.stitch-navbar .brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  white-space: nowrap;
}

.stitch-navbar .nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted) !important;
  padding: 0.4rem 0.75rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap !important;
}

.stitch-navbar .nav-link:hover,
.stitch-navbar .nav-item.active .nav-link {
  color: var(--primary) !important;
  background: var(--primary-light);
}

.stitch-btn-portal {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.825rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0, 43, 133, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.stitch-btn-portal:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(0, 43, 133, 0.28);
  color: #ffffff !important;
}


/* --------------------------------------------------------------------------
   COMPACT & CRISP HERO SECTION
   -------------------------------------------------------------------------- */
.stitch-hero {
  position: relative;
  background: linear-gradient(180deg, #f8faff 0%, #edf3ff 50%, #f8faff 100%);
  padding: 3rem 0 2.5rem 0;
  overflow: hidden;
}

.stitch-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(0, 43, 133, 0.06) 0%, rgba(2, 132, 199, 0.03) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.stitch-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
}

.stitch-hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 0.65rem;
  letter-spacing: -0.025em;
}

.stitch-hero-title .text-brand-gradient {
  background: linear-gradient(135deg, #002b85 0%, #1e40af 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.stitch-hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 1.5rem auto;
}

/* --------------------------------------------------------------------------
   COMPACT SLEEK OPAC SEARCH BOX
   -------------------------------------------------------------------------- */
.stitch-search-container {
  max-width: 760px;
  margin: 0 auto 1rem auto;
}

.stitch-search-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0.4rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
}

.stitch-search-card:focus-within {
  box-shadow: 0 10px 30px rgba(0, 43, 133, 0.12);
  border-color: rgba(0, 43, 133, 0.3);
}

.stitch-search-scope {
  border: 1px solid var(--border-subtle);
  background: #f8faff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0 0.85rem;
  height: 46px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  min-width: 145px;
}

.stitch-search-input-wrapper {
  display: flex;
  align-items: center;
  flex-grow: 1;
  padding: 0 0.5rem;
}

.stitch-search-input {
  border: none;
  background: transparent;
  font-size: 0.925rem;
  color: var(--text-main);
  padding: 0 0.65rem;
  width: 100%;
  height: 46px;
  outline: none;
}

.stitch-search-input::placeholder {
  color: var(--text-light);
  font-size: 0.875rem;
}

.stitch-search-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0 1.5rem;
  height: 46px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 43, 133, 0.2);
}

.stitch-search-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(0, 43, 133, 0.3);
}

/* Trending Search Badges */
.stitch-trending-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin: 0.2rem 0.15rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 33, 71, 0.02);
}

.stitch-trending-badge:hover {
  background: #ffffff;
  color: var(--primary-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   COMPACT LIVE STATS CARDS
   -------------------------------------------------------------------------- */
.stitch-stats-row {
  max-width: 880px;
  margin: 2rem auto 0 auto;
}

.stitch-stat-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  height: 100%;
}

.stitch-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 43, 133, 0.2);
}

.stitch-stat-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin: 0 auto 0.5rem auto;
}

.stitch-stat-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.15rem;
}

.stitch-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Inspiration Quote Strip */
.stitch-quote-strip {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.85rem 1.35rem;
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin: 1.75rem auto 0 auto;
}

/* --------------------------------------------------------------------------
   STITCH BENTO ACCESS & SERVICE CARDS
   -------------------------------------------------------------------------- */
.stitch-bento-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  text-decoration: none !important;
}

.stitch-bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 43, 133, 0.25);
}

.stitch-bento-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.stitch-bento-card:hover .stitch-bento-icon {
  transform: scale(1.06);
}

.icon-blue { background: #e0e7ff; color: #3730a3; }
.icon-emerald { background: #d1fae5; color: #065f46; }
.icon-rose { background: #ffe4e6; color: #9f1239; }
.icon-amber { background: #fef3c7; color: #92400e; }

.stitch-bento-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.stitch-bento-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.stitch-bento-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   STITCH NEWS CARDS
   -------------------------------------------------------------------------- */
.stitch-news-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 1.35rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.stitch-news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 43, 133, 0.2);
}

.stitch-news-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   SLIMS BOOK COLLECTION & TOPIC PILLS
   -------------------------------------------------------------------------- */
.topic-pill-item {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 33, 71, 0.03);
  text-decoration: none !important;
}

.topic-pill-item:hover {
  background: var(--primary-light);
  color: var(--primary) !important;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.collection {
  margin-left: -8px;
  margin-right: -8px;
}

.collection .card {
  background: #ffffff;
  border-radius: 16px !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: 0 2px 10px rgba(0, 33, 71, 0.04) !important;
  padding: 0.65rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  text-decoration: none !important;
}

.collection .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 33, 71, 0.1) !important;
  border-color: rgba(0, 43, 133, 0.25) !important;
}

.collection .card-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.collection .card-image {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.collection .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.collection .card:hover .card-image img {
  transform: scale(1.05);
}

.collection .card-text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-top: 0.65rem;
  padding: 0 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.3em;
  transition: color 0.2s ease;
}

.collection .card:hover .card-text {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   STITCH FOOTER
   -------------------------------------------------------------------------- */
.stitch-footer {
  background: #00163a;
  color: #94a3b8;
  padding: 3.5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stitch-footer h5 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.stitch-footer a {
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.stitch-footer a:hover {
  color: #ffffff;
  padding-left: 3px;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .stitch-hero {
    padding: 2.25rem 0 2rem 0;
  }
  .stitch-hero-title {
    font-size: 1.85rem;
  }
  .stitch-search-scope {
    width: 100%;
    margin-bottom: 0.35rem;
  }
  .stitch-stats-row {
    margin-top: 1.5rem;
  }
  .collection .card-image {
    height: 160px;
  }
}

