/* === 🚀 PERFORMANCE: CSS Reset (halaman-utama-home.css dihapus untuk mengurangi 114KB) === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #ffffff;
  color: #1a202c;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

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

/* === Wireframe Layout === */

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


.dir-main {
  padding-top: 40px;
  padding-bottom: 80px;
  background-color: #ffffff;
  min-height: 100vh;
  animation: pageFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 🚀 PERFORMANCE: content-visibility agar browser skip render card di bawah fold */
.dir-grid {
  content-visibility: auto;
  contain-intrinsic-size: auto 1200px;
}

.dir-pagination {
  content-visibility: auto;
  contain-intrinsic-size: auto 60px;
}

/* 🚀 PERFORMANCE: Aksesibilitas & performa untuk low-end device */
@media (prefers-reduced-motion: reduce) {
  .dir-main {
    animation: none !important;
  }
  .dir-card {
    transition: none !important;
  }
}

.dir-container {
  width: 90%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumbs */
.dir-breadcrumbs {
  font-size: 13px;
  color: #000000;
  margin-bottom: 24px;
}

.dir-breadcrumbs .current {
  color: #000000;
  font-weight: bold;
}

.dir-breadcrumbs i {
  color: #000000;
}

/* Header */
.dir-header {
  margin-bottom: 32px;
  max-width: 750px;
}

.dir-header h1 {
  font-size: 32px;
  color: #000000;
  margin-bottom: 12px;
  font-weight: 600;
}

.dir-header .highlight {
  color: #000000;
  /* No blue */
  text-decoration: underline;
  /* Wireframe emphasis */
}

.dir-header p {
  color: #333333;
  font-size: 14px;
  line-height: 1.6;
}

/* Controls (Search + Filters) */
.dir-controls {
  margin-bottom: 32px;
}

/* Role Tabs as Pills */
.dir-role-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.tab-pill {
  padding: 8px 20px;
  border: 1px solid #000000;
  background: white;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  border-radius: 40px;
  /* Pill shape */
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-pill:hover {
  background: #f3f4f6;
}

.tab-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* Unified Search Bar */
.dir-search-unified {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  border: 2px solid #cbd5e1;
  background: white;
  padding: 4px;
  border-radius: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.dir-search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.dir-search-input .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #000000;
  font-size: 18px;
}

.btn-clear-search {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #ef4444;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-clear-search:hover {
  background-color: #fee2e2;
  transform: translateY(-50%) scale(1.1);
}

.dir-search-input input {
  width: 100%;
  padding: 12px 48px 12px 44px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #000000;
}

.dir-search-input input:focus {
  outline: none;
}

.dir-search-dropdowns {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 12px;
  border-left: 1px solid #e5e7eb;
}

.dropdown-sel {
  padding: 10px 32px 10px 16px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background-color: white;
  color: #333333;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 10px auto;
}

.dropdown-sel:focus {
  outline: none;
  border-color: #000000;
}

.btn-cari-unified {
  padding: 10px 24px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cari-unified:hover {
  background: #1d4ed8;
}

/* Results text */
.dir-results-text {
  font-size: 13px;
  color: #000000;
  margin-bottom: 24px;
  font-weight: bold;
}

/* Grid Layout */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.dir-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #000000;
  transition: all 0.2s ease;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dir-card:hover {
  box-shadow: 6px 6px 0px #0056d2;
  border-color: #0056d2;
  transform: translate(-3px, -3px);
}

/* Cover Image / Background */
.card-cover {
  width: 100%;
  height: 120px;
  background-color: #e5e7eb;
  /* Default wireframe background */
  position: relative;
}

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

.badges-wrapper {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 10;
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border: 1px solid #000000;
  background: white;
  color: #000000;
  text-transform: uppercase;
}

.extra-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 3px 6px;
  border: 1px solid #000000;
  background: #f8fafc;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.extra-badge i {
  font-size: 11px;
}

.instruktur-badge-1 i { color: #0056d2; }
.instruktur-badge-2 i { color: #f59e0b; }
.pengelola-badge-1 i { color: #10b981; }
.pengelola-badge-2 i { color: #6366f1; }
.peserta-badge-1 i { color: #ec4899; }
.peserta-badge-2 i { color: #06b6d4; }

/* Avatar */
.avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin-top: -75px;
  margin-left: auto;
  margin-right: auto;
  z-index: 2;
}

.card-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-decoration {
  position: absolute;
  top: -6px;
  left: -10px;
  font-size: 20px;
  background: white;
  border: 2px solid #000000;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000;
  z-index: 3;
  animation: floatDeco 3s ease-in-out infinite;
  cursor: default;
}

@keyframes floatDeco {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-4px) rotate(10deg); }
}

.avatar-decoration i {
  font-size: 16px;
  line-height: 1;
}

.card-avatar i {
  font-size: 36px;
  color: #000000;
}

/* Info Section */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 16px 20px 0;
}

.card-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  text-transform: uppercase;
}

.dept {
  font-size: 12px;
  color: #4b5563;
  text-transform: uppercase;
  font-weight: 500;
}

.email {
  font-size: 11px;
  color: #000000;
  margin-top: 4px;
}

/* Socials Section */
.card-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.card-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.card-socials a:hover {
  transform: translateY(-2px);
}

.social-fb {
  background-color: #1877F2;
}

.social-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-li {
  background-color: #0A66C2;
}

.social-yt {
  background-color: #FF0000;
}

.social-gh {
  background-color: #181717;
}

/* Stats Section */
.card-stats {
  display: flex;
  width: calc(100% - 40px);
  justify-content: center;
  gap: 24px;
  border-top: 1px dashed #000000;
  padding-top: 16px;
  margin-top: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
}

.stat-label {
  font-size: 9px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pengelola-desc {
  font-size: 11px;
  color: #4b5563;
  text-align: center;
  line-height: 1.4;
  padding: 0 10px;
  font-style: italic;
}

/* Action Button */
.card-action {
  width: 100%;
  padding: 20px;
  margin-top: auto;
}

.btn-lihat-profil {
  display: inline-block;
  width: 100%;
  padding: 10px 16px;
  background-color: transparent;
  color: #000000;
  border: 1px solid #000000;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.2s ease;
  border-radius: 4px;
  /* Optional slight rounding for button */
}

.btn-lihat-profil:hover {
  background-color: #0056d2;
  border-color: #0056d2;
  color: #ffffff;
}

@media (max-width: 768px) {
  .dir-grid {
    grid-template-columns: 1fr;
  }

  .dir-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-right {
    flex-direction: column;
  }
}

/* Empty State */
.dir-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.dir-empty-state .empty-illustration-wrapper {
  margin-bottom: 24px;
}

.dir-empty-state .empty-illustration {
  max-width: 300px;
  height: auto;
}

.dir-empty-state h3 {
  font-size: 20px;
  color: #0f172a;
  margin-bottom: 12px;
  font-weight: 700;
}

.dir-empty-state p {
  font-size: 14px;
  color: #64748b;
  max-width: 400px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.dir-empty-state .btn-reset-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #0f172a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.dir-empty-state .btn-reset-filter:hover {
  background-color: #1e293b;
}

/* Pagination */
.dir-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid #000000;
  background: white;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-btn:hover:not(.disabled) {
  background: #000000;
  color: white;
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #cbd5e1;
  color: #64748b;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-num:hover:not(.active) {
  background: #f3f4f6;
}

.page-num.active {
  background: #2563eb;
  color: white;
  font-weight: 600;
}

.page-ellipsis {
  color: #64748b;
  font-weight: 600;
  padding: 0 4px;
}