div.department-container{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 18px;
}

div.departments-search-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 16px;
}

div.departments-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 400px;
}

div.departments-search-wrapper::before {
  content: '';
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  opacity: 0.65;
  color: #8a8a8a;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

#department-search {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 30px;
  border-radius: 8px;
  border: 1.5px solid #e2e2e2;
  background: #ffffff;
  color: var(--gray);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#department-search::placeholder {
  color: #9b9b9b;
  font-weight: 500;
}

#department-search:hover {
  border-color: #d0d0d0;
}

#department-search:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--light-orange);
}

div.department-card{
  width: 100%;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: minmax(190px, 260px) 1fr;
  align-items: start;
}

div.department-banner-wrapper{
  width: 100%;
  height: 170px;
  position: relative;
}

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

div.department-logo-wrapper{
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 3px solid #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 12px;
  bottom: 12px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

img.department-logo{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

div.department-info{
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

div.department-heading{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

h2.department-name{
  font-size: 0.98rem;
  color: var(--gray);
}

p.department-abbreviation{
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #ffffff;
  background-color: var(--gray);
  border-radius: 999px;
  padding: 5px 9px;
}

div.department-rank{
  font-size: 0.82rem;
  color: #555555;
}

div.department-rank span{
  color: var(--orange);
  font-weight: 800;
}

div.department-record-grid,
div.department-medal-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

div.department-stat,
div.department-medal{
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 3px;
}

p.department-stat-label,
p.department-medal-label{
  font-size: 0.72rem;
  color: #727272;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

p.department-stat-value,
p.department-medal-value{
  font-size: 1rem;
  font-size: 0.92rem;
  font-weight: 800;
}


details.department-college-dropdown {
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

details.department-college-dropdown > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}

details.department-college-dropdown > summary::-webkit-details-marker {
  display: none;
}

div.department-medal-gold p.department-medal-value{ color: #b98b00; }
div.department-medal-silver p.department-medal-value{ color: #707070; }
div.department-medal-bronze p.department-medal-value{ color: #a2592a; }


@media screen and (max-width: 580px){
  div.departments-search-row {
    justify-content: stretch;
  }

  div.departments-search-wrapper {
    width: 100%;
    min-width: 0;
  }

  div.department-card{
    width: 100%;
    display: block;
  }

  div.department-banner-wrapper{
    min-height: 125px;
    height: 125px;
  }

  div.department-logo-wrapper{
    width: 56px;
    height: 56px;
  }

  div.department-heading{
    align-items: flex-start;
    flex-direction: column;
  }
}

div.department-section-label{
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #8a8a8a;
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
div.department-section-label:first-of-type{ 
  margin-top: 0; 
}

div.department-section-label::after{
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e2e2;
}