/* ==========================================================
   Portal Game Edukatif BGTK Kalsel — Custom Styles
   Melengkapi utility class dari Tailwind CDN
   ========================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #1d4ed8;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: background-color 0.15s, color 0.15s;
}
.nav-link:hover { background-color: #f1f5f9; color: #1d4ed8; }
.nav-link-active { color: #1d4ed8; background-color: #eff6ff; font-weight: 700; }

.nav-link-mobile {
  padding: 0.6rem 0.25rem;
  font-size: 0.95rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

/* Game card */
.game-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.game-card:hover, .game-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -12px rgba(30, 64, 175, 0.25);
  border-color: #bfdbfe;
}
.game-card__thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #eef2ff);
  overflow: hidden;
}
.game-card__thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.game-card:hover .game-card__thumb-wrap img { transform: scale(1.05); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
}
.badge-subject { background: #fef3c7; color: #92400e; }
.badge-level { background: #dbeafe; color: #1e40af; }
.badge-featured { background: #fee2e2; color: #b91c1c; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  background-color: #1d4ed8;
  color: #fff;
  transition: background-color 0.15s;
}
.btn-primary:hover { background-color: #1e40af; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Skeleton loading state (dipakai oleh fetch/AJAX di games.php) */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 1rem;
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Carousel */
.hero-slide { display: none; }
.hero-slide.is-active { display: grid; }

/* Admin sidebar drawer (mobile) */
#admin-sidebar { transition: transform 0.25s ease; }
@media (max-width: 1023px) {
  #admin-sidebar { transform: translateX(-100%); }
  #admin-sidebar.is-open { transform: translateX(0); }
}
