.ed-department-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f5e0c4;
  border-block-end: 1px solid var(--ed-line);
}

.ed-department-hero-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 41%;
  pointer-events: none;
}

.ed-department-hero-art img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 54%;
}

.ed-department-hero-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f5e0c4 1%, #f5e0c41a 27%, transparent 58%);
  content: '';
}

.ed-department-hero-inner {
  display: grid;
  justify-items: start;
  gap: 17px;
  min-block-size: 228px;
  padding-block: 21px 35px;
}

.ed-department-hero h1 {
  max-inline-size: 14ch;
  margin: 0;
  color: var(--ed-deep);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 780;
  letter-spacing: -.038em;
  line-height: .99;
  text-wrap: balance;
}

.ed-department-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 44px;
  padding: 8px 14px;
  color: var(--ed-white);
  background: var(--ed-deep);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 170ms ease-out;
}

.ed-department-cta svg { inline-size: 18px; block-size: 18px; color: var(--ed-yellow); }
.ed-department-cta:hover { background: var(--ed-accent-dark); }

.ed-department-section { padding-block: clamp(24px, 3.65vw, 50px) clamp(38px, 5vw, 72px); }
.ed-department-section h2 {
  margin: 0 0 15px;
  color: var(--ed-deep);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -.025em;
}

.ed-branch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.7vw, 24px); }

.ed-branch-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-inline-size: 0;
  overflow: hidden;
  color: var(--ed-deep);
  background: var(--ed-surface);
  border: 1px solid var(--ed-line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 200ms ease-out, box-shadow 250ms ease-out, translate 300ms var(--ed-appear);
}

.ed-branch-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  color: #9e6239;
  background: #f6e5ca;
}

.ed-branch-image svg { inline-size: 26px; block-size: 26px; }
.ed-branch-image img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; transition: scale 500ms var(--ed-appear); }

.ed-branch-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 12px clamp(9px, 1.5vw, 17px);
}

.ed-branch-heading {
  display: grid;
  gap: 4px;
  min-inline-size: 0;
  overflow-wrap: break-word;
}

.ed-branch-heading strong { font-family: var(--ed-display); font-size: clamp(.965rem, 2vw, 1.33rem); font-weight: 760; line-height: 1.16; }
.ed-branch-heading span { color: var(--ed-muted); font-size: .74rem; }
.ed-branch-arrow {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  color: var(--ed-accent-dark);
  background: var(--ed-hover);
  border-radius: 50%;
  transition: background-color 200ms ease-out, color 200ms ease-out;
}

.ed-branch-arrow svg { inline-size: 17px; block-size: 17px; }
.ed-branch-card:focus-visible { outline-offset: 3px; }

@media (hover: hover) {
  .ed-branch-card:hover { translate: 0 -3px; border-color: #d4ac8e; box-shadow: 0 7px 22px #42122b14; }
  .ed-branch-card:hover img { scale: 1.04; }
  .ed-branch-card:hover .ed-branch-arrow { background: var(--ed-deep); color: var(--ed-yellow); }
}

@media (prefers-reduced-motion: no-preference) {
  .ed-department .ed-branch-card { animation: ed-branch-rise 460ms var(--ed-appear) both; }
  .ed-department .ed-branch-card:nth-child(3n + 2) { animation-delay: 45ms; }
  .ed-department .ed-branch-card:nth-child(3n + 3) { animation-delay: 90ms; }
  @keyframes ed-branch-rise { from { opacity: .18; transform: translateY(13px); } }
}

@media (max-width: 760px) {
  .ed-department-hero-art { inset-inline-start: 27%; }
  .ed-department-hero-art::after { background: linear-gradient(90deg, #f5e0c4, #f5e0c49c 42%, transparent 100%); }
  .ed-department-hero-inner { min-block-size: 196px; gap: 12px; padding-block: 15px 23px; }
  .ed-department-hero h1 { max-inline-size: 12ch; }
  .ed-branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-branch-arrow { inline-size: 25px; block-size: 25px; }
  .ed-branch-arrow svg { inline-size: 14px; block-size: 14px; }
}

@media (max-width: 360px) {
  .ed-branch-copy { grid-template-columns: minmax(0, 1fr); }
  .ed-branch-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-department-cta, .ed-branch-card, .ed-branch-card img, .ed-branch-arrow { transition: none; }
  .ed-branch-card:hover { translate: none; }
  .ed-branch-card:hover img { scale: none; }
}
.ed-department-empty { margin: 10px 0 0; color: var(--ed-deep); font-weight: 650; }
