.department-overview-image {
  width: 100%;
  margin-bottom: 30px;
}

.departments h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.departments h2 {
  border: 0;
  padding: 0;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 1px;
}

.department-profile {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 30px;
}

.department-profile img {
  width: 50%;
  height: 300px;
  object-fit: cover;
}

.department-profile h2 {
  margin-top: 0;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.department-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 15px;
  background-color: rgba(20, 36, 64, 0.8);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.department-card:hover,
.department-card:focus,
.department-card[aria-current="page"] {
  background-color: #f18b00;
  color: #fff;
}

.department-card:focus-visible {
  outline: 3px solid #142440 !important;
  outline-offset: 3px;
}

@media (max-width: 991px) {
  .department-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .department-profile {
    display: block;
  }

  .department-profile img {
    width: 100%;
    margin-bottom: 20px;
  }
}
