/* ====================================
   INSTITUTIONAL REPOSITORY - CSS UTAMA
   ==================================== */

:root {
  /* Palet warna: akademis modern dengan aksen biru profesional */
  --primary: #0056b3;
  --primary-dark: #003d82;
  --primary-light: #e7f1ff;
  --accent: #28a745;
  --accent-light: #d4edda;
  --danger: #dc3545;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Typography */
  --font-sans: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', monospace;
  
  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 0.75rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  
  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.2);
}

/* ================== RESET & FOUNDATION ================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--gray-700);
  background-color: #fff;
  font-size: 16px;
}

/* ================== TYPOGRAPHY ================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}

h1 { font-size: 2.5rem; margin-bottom: var(--sp-xl); }
h2 { font-size: 2rem; margin-bottom: var(--sp-lg); }
h3 { font-size: 1.5rem; margin-bottom: var(--sp-md); }
h4 { font-size: 1.25rem; margin-bottom: var(--sp-md); }
h5 { font-size: 1.1rem; margin-bottom: var(--sp-sm); }
h6 { font-size: 1rem; margin-bottom: var(--sp-sm); }

p { margin-bottom: var(--sp-md); }

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

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

strong { font-weight: 600; }

/* ================== LAYOUT ================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ================== HEADER & NAVBAR ================== */

header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--sp-lg) 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.header-contact {
  display: flex;
  gap: var(--sp-xl);
  font-size: 0.9rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.nav-main {
  display: flex;
  gap: var(--sp-xl);
  list-style: none;
  flex-wrap: wrap;
}

.nav-main a {
  color: white;
  font-weight: 500;
  padding: var(--sp-sm) var(--sp-md);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.nav-main a:hover,
.nav-main a.active {
  background: rgba(255, 255, 255, 0.2);
}

/* ================== HERO SECTION ================== */

.hero {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  color: white;
  padding: var(--sp-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--sp-lg);
  color: white;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: var(--sp-xl);
  color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: var(--sp-md) var(--sp-lg);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  white-space: nowrap;
}

.btn-primary {
  background: white;
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary);
}

/* ================== SEARCH SECTION ================== */

.search-section {
  background: var(--gray-50);
  padding: var(--sp-2xl) 0;
  border-bottom: 1px solid var(--gray-200);
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
}

.search-box h2 {
  text-align: center;
  margin-bottom: var(--sp-lg);
  font-size: 1.5rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  gap: var(--sp-sm);
}

.search-box input {
  flex: 1;
  padding: var(--sp-md);
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box button {
  padding: var(--sp-md) var(--sp-lg);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: var(--primary-dark);
}

/* ================== CONTENT SECTIONS ================== */

section {
  padding: var(--sp-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-2xl);
}

.section-header h2 {
  margin-bottom: var(--sp-md);
}

.section-header p {
  color: var(--gray-600);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ================== STATS ================== */

.stats {
  background: linear-gradient(135deg, #f0f4ff 0%, #f9fafb 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-xl);
}

.stat-card {
  background: white;
  padding: var(--sp-xl);
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--sp-sm);
}

.stat-label {
  color: var(--gray-600);
  font-weight: 500;
}

/* ================== FEATURES ================== */

.features {
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-xl);
}

.feature-card {
  background: var(--gray-50);
  padding: var(--sp-xl);
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid var(--gray-200);
}

.feature-card:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--sp-md);
}

.feature-card h3 {
  margin-bottom: var(--sp-md);
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--gray-600);
  margin-bottom: 0;
}

/* ================== DOCUMENTS GRID ================== */

.documents {
  background: white;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-xl);
}

.doc-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.doc-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.doc-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #e3f2fd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.doc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doc-content {
  padding: var(--sp-lg);
}

.doc-type {
  display: inline-block;
  background: var(--accent-light);
  color: #155724;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--sp-sm);
  text-transform: uppercase;
}

.doc-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-sm);
  line-height: 1.4;
}

.doc-meta {
  display: flex;
  justify-content: space-between;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--gray-200);
}

.doc-card a.btn {
  display: block;
  text-align: center;
  background: var(--primary);
  color: white;
  padding: var(--sp-sm) var(--sp-md);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  margin-top: var(--sp-md);
  transition: background 0.3s ease;
}

.doc-card a.btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* ================== CATEGORIES ================== */

.categories {
  background: var(--gray-50);
}

.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-lg);
}

.category-item {
  background: white;
  padding: var(--sp-lg);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.category-item:hover {
  background: var(--primary-light);
  transform: translateY(-4px);
}

.category-item .count {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--sp-sm);
}

.category-item p {
  margin: 0;
  color: var(--gray-600);
  font-weight: 500;
}

/* ================== CTAS ================== */

.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  padding: var(--sp-3xl) 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--sp-lg);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  margin-bottom: var(--sp-xl);
}

/* ================== FOOTER ================== */

footer {
  background: var(--gray-900);
  color: white;
  padding: var(--sp-2xl) 0 var(--sp-lg);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--sp-lg);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--sp-md);
}

.footer-section a {
  color: #d1d5db;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--sp-lg);
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ================== RESPONSIVE ================== */

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  
  .header-top {
    flex-direction: column;
    gap: var(--sp-lg);
  }
  
  .header-contact {
    flex-direction: column;
    gap: var(--sp-sm);
    text-align: center;
  }
  
  .nav-main {
    gap: var(--sp-md);
  }
  
  .hero {
    padding: var(--sp-2xl) 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .search-input-wrapper {
    flex-direction: column;
  }
  
  .stats-grid,
  .features-grid,
  .docs-grid,
  .category-list {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1rem;
  }
  
  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .nav-main {
    gap: var(--sp-sm);
  }
  
  .nav-main a {
    padding: var(--sp-xs) var(--sp-sm);
    font-size: 0.9rem;
  }
  
  .cta-section {
    padding: var(--sp-xl) 0;
  }
}

/* ================== UTILITY CLASSES ================== */

.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mt-lg { margin-top: var(--sp-lg); }
.mb-lg { margin-bottom: var(--sp-lg); }
.my-xl { margin: var(--sp-xl) 0; }

.badge {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--gray-200);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ================== ANIMATIONS ================== */

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

/* Print Styles */
@media print {
  header, footer, .search-section {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
  }
}
