/* =====================
   MEDIA HERO
===================== */
.media-hero {
  background: var(--dark);
  padding-top: 100px;
  padding-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.media-hero::before {
  content: '';
  position: absolute;
  top: -150px; right: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,122,74,0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.media-search .input-group {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.media-search .input-group-text,
.media-search .form-control {
  border: none;
  background: #fff;
  padding: 12px 16px;
}

.media-search .form-control:focus { box-shadow: none; }

.filter-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
  user-select: none;
}

.filter-tag:hover, .filter-tag.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.hero-stat-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: background 0.2s;
}

.hero-stat-card:hover { background: rgba(255,255,255,0.12); }
.hero-stat-icon { font-size: 1.8rem; margin-bottom: 8px; }

.hero-stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* =====================
   JENJANG CARDS
===================== */
.jenjang-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 36px 28px;
  text-decoration: none;
  color: #fff;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.jenjang-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.jenjang-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  color: #fff;
}

.card-sma { background: linear-gradient(135deg, #0d3b26, #1a7a4a); }
.card-smk { background: linear-gradient(135deg, #1a2b4a, #2d5090); }
.card-slb { background: linear-gradient(135deg, #3b1a0d, #8a4a1a); }

.jenjang-icon { font-size: 2.5rem; margin-bottom: 10px; }

.jenjang-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  width: fit-content;
}

.jenjang-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.jenjang-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.jenjang-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.jenjang-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =====================
   FILTER BUTTONS
===================== */
.btn-filter {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-filter:hover, .btn-filter.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* =====================
   TOGGLE VIEW
===================== */
.view-toggle {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  border-radius: 8px;
  padding: 3px;
}

.view-btn {
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.view-btn.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* =====================
   MATERI CARD - GRID
===================== */
.materi-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.materi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
  color: var(--text);
}

.materi-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  position: relative;
  flex-shrink: 0;
}

.materi-thumb .tipe-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.materi-body { padding: 16px; flex: 1; }

.materi-body h6 {
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.materi-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.materi-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.materi-type { font-size: 0.72rem; color: var(--text-muted); }
.materi-cta { font-size: 0.72rem; font-weight: 700; color: var(--green); }

.badge-sma { background: var(--green-pale) !important; color: var(--green) !important; }
.badge-smk { background: #e8f0ff !important; color: #2d5090 !important; }
.badge-slb { background: #fff3e0 !important; color: #e65100 !important; }

/* =====================
   MATERI CARD - LIST
===================== */
.materi-list-item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.07);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, transform 0.2s;
}

.materi-list-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateX(4px);
  color: var(--text);
}

.materi-list-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.materi-list-body { flex: 1; min-width: 0; }

.materi-list-body h6 {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.materi-list-body p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.materi-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.materi-list-meta .mapel {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* =====================
   FILTER SIDEBAR
===================== */
.filter-sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px;
  border: 1px solid rgba(0,0,0,0.07);
  position: sticky;
  top: 90px;
}

.filter-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.filter-group {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.filter-group:last-of-type { border-bottom: none; padding-bottom: 0; }

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 7px;
  transition: background 0.15s;
}

.filter-check:hover { background: var(--green-pale); }
.filter-check input { accent-color: var(--green); cursor: pointer; }

/* =====================
   JENJANG HEADER PAGE
===================== */
.jenjang-header {
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.header-sma { background: linear-gradient(135deg, #0a2e1e, #1a7a4a); }
.header-smk { background: linear-gradient(135deg, #0d1f3b, #2d5090); }
.header-slb { background: linear-gradient(135deg, #2e1a0a, #8a4a1a); }

.breadcrumb-light .breadcrumb-item a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.breadcrumb-light .breadcrumb-item.active { color: rgba(255,255,255,0.9); }
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.3); }

.jenjang-big-icon { font-size: 3rem; }

.jenjang-stat-row { display: flex; gap: 16px; }

.jenjang-stat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 16px 24px;
  text-align: center;
}

.jenjang-stat span {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.jenjang-stat small {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  display: block;
}

/* =====================
   PAGINATION
===================== */
.pagination .page-link {
  color: var(--green);
  border-color: rgba(0,0,0,0.1);
  border-radius: 8px !important;
  margin: 0 2px;
}

.pagination .page-item.active .page-link {
  background: var(--green);
  border-color: var(--green);
}

/* =====================
   EMPTY STATE
===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h5 { font-family: 'Sora', sans-serif; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; }

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  .media-hero { padding-top: 85px; }
  .jenjang-card { padding: 24px 20px; }
  .jenjang-card h3 { font-size: 1.5rem; }
  .filter-sidebar { position: static; margin-bottom: 16px; }
}

@media (max-width: 576px) {
  .materi-list-item { flex-wrap: wrap; }
  .materi-list-meta { flex-direction: row; }
  .hero-stat-num { font-size: 1.3rem; }
}

/* Fix search button di jenjang header */
.jenjang-header .media-search .input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.jenjang-header .media-search .input-group-text,
.jenjang-header .media-search .form-control {
  border: none;
  background: #fff;
  padding: 12px 16px;
  font-size: 0.95rem;
}

.jenjang-header .media-search .form-control:focus {
  box-shadow: none;
}

.jenjang-header .media-search .btn-primary-custom {
  border-radius: 0 !important;
  font-size: 0.95rem;
  min-width: 90px;
}
