/* Departments List Page – Redesign */

/* ── Section heading (shared pattern) ───────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
}

.section-heading-icon {
  width: 2.875rem;
  height: 2.875rem;
  background: var(--gradient-section-icon, linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.section-heading-icon i {
  color: #fff !important;
  font-size: 1.125rem;
}

.section-heading-label {
  font-size: 1.3125rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.section-heading-bar {
  width: 3rem;
  height: 0.1875rem;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-secondary-light));
  border-radius: 0.125rem;
  margin-top: 0.3125rem;
}

/* ── Section wrapper ─────────────────────────────── */
.departments-section {
  padding: 3rem 0 3.75rem;
  overflow-x: hidden;
}

/* ── Department card ─────────────────────────────── */

.dep-cards-grid {
  justify-content: center !important;
}

.dep-cards-grid > [class*="col"] {
  display: flex;
}

.dep-card {
  display: flex;
  width: 100%;
  text-decoration: none !important;
  color: inherit !important;
}

.dep-card-inner {
  padding: 1rem 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.625rem;
  cursor: pointer;
  border-radius: 1rem;
  transition: background 0.25s ease;
  width: 100%;
}

.dep-card-logo {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f8fa 0%, #c8eef2 100%);
  border: 3px solid rgba(var(--color-primary-rgb), 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.125rem;
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.dep-card:hover .dep-card-logo {
  background: linear-gradient(135deg, #d0f2f5 0%, #a8e4ea 100%);
  border-color: rgba(var(--color-primary-rgb), 0.65);
}

.dep-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dep-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1a2e35;
  margin: 0;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.dep-card:hover .dep-card-title {
  color: var(--color-primary);
}

/* ── Skeleton ────────────────────────────────────── */

.dep-card-skeleton {
  pointer-events: none;
}

.dep-card-skeleton .dep-card-inner {
  background: none;
}

/* ── Grid (5 per row on xl, Bootstrap handles smaller) */

@media (min-width: 1200px) {
  .dep-cards-grid > [class*="col"] {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* ── Responsive card sizes ───────────────────────── */

@media (max-width: 768px) {
  .dep-card-logo {
    width: 5.5rem;
    height: 5.5rem;
    padding: 0.875rem;
  }

  .dep-card-title {
    font-size: 0.8125rem;
  }

  .dep-card-inner {
    padding: 0.75rem 0.5rem 0.625rem;
    gap: 0.5rem;
  }
}

@media (max-width: 400px) {
  .dep-card-logo {
    width: 4.5rem;
    height: 4.5rem;
    padding: 0.75rem;
  }

  .dep-card-title {
    font-size: 0.75rem;
  }
}

/* ── Content container matches header 5% padding ── */
.departments-content-container {
  width: 100%;
  padding-right: 5%;
  padding-left: 5%;
}

/* ── Empty state ─────────────────────────────────── */
.dep-empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-text-secondary);
}
