.eo-services {
  --service-paper: #fdfdf9;
  --service-muted: #505b46;
  padding-block: clamp(30px, 5.2vh, 66px);
  border-top: 1px solid #e0e2d3;
  background: var(--service-paper);
  color: var(--eo-ink);
  font: 400 17px/1.45 var(--eo-face);
}

.eo-services:focus { outline: none; }

.eo-services a {
  color: inherit;
  text-decoration: none;
}

.eo-services a:focus-visible {
  outline: 2px solid var(--eo-action);
  outline-offset: 5px;
}

.eo-services-heading { margin-bottom: clamp(22px, 3.5vh, 43px); }

.eo-services-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--eo-action);
  font: 680 13px/1.2 var(--eo-face);
  text-transform: uppercase;
  letter-spacing: .13em;
}

.eo-services-kicker::before {
  width: 30px;
  height: 2px;
  background: var(--eo-accent);
  content: "";
}

.eo-services h2, .eo-services .eo-service-card h3 {
  margin: 0;
  color: var(--eo-ink);
  font-family: var(--eo-display);
  font-weight: 470;
  text-transform: none;
}

.eo-services h2 {
  font-size: clamp(45px, 5vw, 94px);
  line-height: .97;
  letter-spacing: -.055em;
}

.eo-services-title-line { display: block; }
.eo-services h2 em { color: var(--eo-action); font-style: normal; }

.eo-services-brief {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: clamp(12px, 1.5vh, 19px);
}

.eo-services-brief p {
  margin: 0;
  color: var(--service-muted);
  font-size: clamp(17px, 1.14vw, 21px);
}

.eo-family-route {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 11px 4px 6px;
  border: 1px solid #c4cbb1;
  border-radius: 6px;
  font: 650 15px/1.2 var(--eo-face);
  transition: background-color 280ms ease, border-color 280ms ease;
}

.eo-family-route > i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #ecefdc;
  color: var(--eo-action);
  font-size: 13px;
}

.eo-family-route:is(:hover, :focus-visible) {
  border-color: #a2ae8e;
  background: #f2f4e5;
}

.eo-family-route .eo-service-arrow { --arrow-size: 25px; margin-inline-start: 2px; }

.eo-service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(15px, 1.7vw, 31px);
}

.eo-service-card {
  --card-border: #d7dcc5;
  --card-surface: #f2f4e7;
  --card-accent: #dfe6b9;
  --card-pad: clamp(18px, 1.7vw, 32px);
  --card-enter: 1;
  --photo-crop: 50% 28%;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--card-border);
  border-radius: 12px 34px 12px 12px;
  background: var(--card-surface);
  box-shadow: 0 9px 23px -20px #414c30;
  transition: border-color 380ms ease, box-shadow 450ms var(--eo-ease-out);
}

#services-application {
  --card-border: #d7dfd0;
  --card-surface: #edf2ea;
  --card-accent: #d6e4cc;
  --photo-crop: 50% 31%;
}

#services-visa {
  --card-border: #e0dacc;
  --card-surface: #f6f1e6;
  --card-accent: #ecdebb;
  --photo-crop: 50% 29%;
}

.eo-service-card-media {
  position: relative;
  aspect-ratio: 1.67;
  max-height: 34vh;
  overflow: hidden;
  border-radius: 11px 33px 0 0;
  background: linear-gradient(142deg, var(--card-accent), var(--card-surface));
}

.eo-service-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-crop);
}

.eo-service-card-media.is-photo-unavailable img { visibility: hidden; }

.eo-service-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 33px var(--card-pad) clamp(14px, 1.65vh, 23px);
}

.eo-service-card-icon {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  align-self: flex-start;
  margin: -23px 0 -23px var(--card-pad);
  pointer-events: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--card-surface);
  border-radius: 50%;
  background: var(--card-accent);
  color: var(--eo-action);
  font-size: 17px;
}

.eo-service-context {
  margin: 0 0 6px;
  color: var(--eo-action);
  font: 660 15px/1.25 var(--eo-face);
}

.eo-services .eo-service-card h3 {
  font-size: clamp(27px, 2.45vw, 47px) !important;
  line-height: 1;
  letter-spacing: -.042em;
}

.eo-service-summary {
  margin: 9px 0 clamp(13px, 1.5vh, 20px);
  color: var(--service-muted);
  font-size: clamp(16px, 1vw, 19px);
  line-height: 1.34;
}

.eo-service-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 50px;
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  font: 680 clamp(15px, .94vw, 18px)/1.15 var(--eo-face);
}

/* Keep the real link as the only focus stop while mapping the card to its destination. */
.eo-service-card-action::after {
  position: absolute;
  inset: 0;
  content: "";
}

.eo-service-arrow {
  --arrow-size: 34px;
  --arrow-active: 0;
  position: relative;
  isolation: isolate;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--arrow-size);
  height: var(--arrow-size);
  overflow: hidden;
  border: 1px solid #bfc8aa;
  border-radius: 50%;
  background: var(--service-paper);
  color: var(--eo-action);
  font-size: calc(var(--arrow-size) * .43);
}

.eo-service-arrow::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: var(--eo-action);
  transform: translateX(calc((var(--arrow-active) - 1) * 142%)) skewX(-20deg) scaleX(1.4);
  transition: transform .48s cubic-bezier(.4, 0, .2, 1);
}

.eo-service-arrow i {
  grid-area: 1 / 1;
  transform: translateX(calc(var(--arrow-active) * var(--arrow-size)));
  transition: transform .49s var(--eo-ease-out);
}

.eo-service-arrow i + i {
  color: var(--eo-paper);
  transform: translateX(calc((var(--arrow-active) - 1) * var(--arrow-size)));
  transition-delay: calc(var(--arrow-active) * 65ms);
}

.eo-service-card:has(.eo-service-card-action:focus-visible) {
  outline: 2px solid var(--eo-action);
  outline-offset: 4px;
}

.eo-services .eo-service-card-action:focus-visible { outline: none; }
.eo-services a:is(:focus-visible, :active) .eo-service-arrow { --arrow-active: 1; }

@media (hover: hover) and (pointer: fine) {
  .eo-service-card:hover {
    border-color: #a8b195;
    box-shadow: 0 25px 38px -28px #414c3070;
  }

  .eo-service-card:hover .eo-service-arrow, .eo-family-route:hover .eo-service-arrow { --arrow-active: 1; }
}

@media (min-width: 1101px) {
  .eo-student-home #services {
    display: grid;
    align-content: center;
    min-height: calc(100vh - var(--eo-pinned-height));
    min-height: calc(100svh - var(--eo-pinned-height));
    scroll-margin-top: var(--eo-pinned-height);
  }
}

@media (max-width: 799px) {
  .eo-service-cards { grid-template-columns: minmax(0, 1fr); }
  .eo-service-card-media { max-height: 340px; }
}

@media (prefers-reduced-motion: no-preference) {
  .eo-services.has-scroll-entry .eo-services-heading {
    --title-enter: clamp(0, calc((var(--service-entry, 1) - .02) * 2.54), 1);
    --intro-enter: clamp(0, calc((var(--service-entry, 1) - .13) * 2.23), 1);
  }

  .eo-services.has-scroll-entry .eo-services-heading h2 {
    overflow: hidden;
    padding-block: .09em;
    margin-block: -.09em;
  }

  .eo-services.has-scroll-entry .eo-services-title-line {
    opacity: calc(.16 + var(--title-enter) * .84);
    transform: translateY(calc((1 - var(--title-enter)) * .57em));
  }

  .eo-services.has-scroll-entry .eo-services-brief {
    opacity: calc(.2 + var(--intro-enter) * .8);
    transform: translateY(calc((1 - var(--intro-enter)) * 18px));
  }

  .eo-services.has-scroll-entry .eo-service-card {
    --card-delay: .11;
    --copy-enter: clamp(0, calc((var(--service-entry, 1) - var(--card-delay) - .13) * 1.92), 1);
    --card-enter: clamp(0, calc((var(--service-entry, 1) - var(--card-delay)) * 1.78), 1);
    opacity: calc(.36 + var(--card-enter) * .64);
    transform: translateY(calc((1 - var(--card-enter)) * 34px));
  }

  .eo-services.has-scroll-entry .eo-service-card:nth-child(2) { --card-delay: .18; }
  .eo-services.has-scroll-entry .eo-service-card:nth-child(3) { --card-delay: .28; }
  .eo-services.has-scroll-entry .eo-service-card:has(.eo-service-card-action:focus-visible) {
    --card-enter: 1;
    --copy-enter: 1;
  }

  .eo-services.has-scroll-entry .eo-service-card-media img {
    clip-path: inset(0 0 calc((1 - var(--card-enter)) * 43%) 0);
    transform: translateY(calc((1 - var(--card-enter)) * 18px));
  }

  .eo-services.has-scroll-entry .eo-service-card-copy > :is(.eo-service-context, h3, .eo-service-summary) {
    opacity: calc(.24 + var(--copy-enter) * .76);
    transform: translateY(calc((1 - var(--copy-enter)) * 13px));
  }

  .eo-services.has-scroll-entry .eo-service-card-icon {
    transform: translateY(calc((1 - var(--card-enter)) * 13px));
  }
}

/* Keep the document at its current position. The full-viewport dialog contains
   scroll at its edges and the reading pane scrolls independently. */
.eo-service-detail {
  --detail-accent: #e4eacb;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  color: var(--eo-ink);
  background: transparent;
  transition: background-color 220ms ease;
}

.eo-service-detail[open] { display: grid; place-items: center; }
.eo-service-detail::backdrop { background: transparent; }
.eo-service-detail.is-entered { background-color: #252d20a8; }
.eo-service-detail[data-service="application"] { --detail-accent: #e0eadb; }
.eo-service-detail[data-service="study-visa"] { --detail-accent: #f1e6ca; }

.eo-service-detail-grid {
  display: grid;
  width: min(1170px, calc(100% - 56px));
  grid-template-columns: minmax(0, .55fr) minmax(0, 1fr);
  min-height: 0;
  height: min(750px, calc(100vh - 72px));
  height: min(750px, calc(100dvh - 72px));
  border: 1px solid #bec8ac;
  border-radius: 13px 36px 13px 13px;
  overflow: hidden;
  background: var(--service-paper);
  box-shadow: 0 35px 90px #1c241957;
}

.eo-service-detail-photo {
  min-height: 0;
  background: linear-gradient(145deg, var(--detail-accent), #b6c3a6);
}

.eo-service-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
}

.eo-service-detail-photo img:not([src]) { visibility: hidden; }

.eo-service-detail[data-service="germany-family-reunion"] .eo-service-detail-grid {
  width: min(655px, calc(100% - 56px));
  grid-template-columns: minmax(0, 1fr);
  height: auto;
  max-height: calc(100dvh - 40px);
}
.eo-service-detail[data-service="germany-family-reunion"] .eo-service-detail-photo { display: none; }

.eo-service-detail-pane {
  --detail-pad: clamp(26px, 3vw, 52px);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.eo-service-detail-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c4cbb1;
  border-radius: 50%;
  background: var(--service-paper);
  color: var(--eo-ink);
  cursor: pointer;
}

.eo-service-detail-close:hover { background: var(--detail-accent); }
.eo-service-detail-close:focus-visible { outline: 2px solid var(--eo-action); outline-offset: 3px; }

.eo-service-detail-body {
  flex: 1;
  min-height: 0;
  padding: clamp(26px, 3.65vh, 43px) var(--detail-pad) 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #78846b transparent;
}

.eo-service-detail-body:focus-visible {
  outline: 2px solid var(--eo-action);
  outline-offset: -3px;
}

/* Safari versions using scrollbar pseudo-elements inherit the theme's blue track. */
.eo-service-detail-body::-webkit-scrollbar { width: 6px; }
.eo-service-detail-body::-webkit-scrollbar-track { background: transparent; }
.eo-service-detail-body::-webkit-scrollbar-thumb {
  border-radius: 8px !important;
  background: #78846b;
}

@media (forced-colors: active) {
  .eo-service-detail-body { scrollbar-color: auto; scrollbar-width: auto; }
  .eo-service-detail-body::-webkit-scrollbar { width: revert; }
  .eo-service-detail-body::-webkit-scrollbar-track { background: Canvas; }
  .eo-service-detail-body::-webkit-scrollbar-thumb { background: ButtonText; }
}

.eo-service-detail-header { padding-inline-end: 30px; }
.eo-services #eo-service-detail-title {
  margin: 0;
  color: var(--eo-ink);
  font: 460 clamp(34px, 3.4vw, 66px)/1 var(--eo-display) !important;
  letter-spacing: -.045em;
  outline: none;
}

.eo-service-detail-intro {
  margin: 12px 0 0;
  color: var(--service-muted);
  font: 450 18px/1.45 var(--eo-face);
}

.eo-service-detail-bring {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: clamp(15px, 2.2vh, 24px) 0;
  padding: 13px 16px;
  border-radius: 7px;
  background: var(--detail-accent);
}

.eo-brief-icon {
  display: inline-grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border: 1px solid #c8ceb9;
  border-radius: 10px 15px 10px 10px;
  background: #f2f4e6;
  color: var(--eo-action);
  font-size: 16px;
}

.eo-service-detail-bring > .eo-brief-icon {
  width: 33px;
  height: 33px;
  border-color: #46543830;
  background: #fdfdf97a;
  font-size: 14px;
}

.eo-service-detail-bring strong { font: 680 16px/1.3 var(--eo-face); }

.eo-brief-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 17px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.eo-brief-checklist li {
  position: relative;
  padding-inline-start: 14px;
  color: #404b37;
  font: 450 15px/1.35 var(--eo-face);
}

.eo-brief-checklist li::before {
  content: "";
  position: absolute;
  top: .42em;
  left: 2px;
  width: 5px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(40deg);
}

.eo-service-detail-groups { display: grid; gap: 9px; }
.eo-service-detail-groups:empty { display: none; }
.eo-brief-facts { margin: 0; }
.eo-brief-facts > div { position: relative; padding: 11px 0; border-top: 1px solid #dde1d3; }
.eo-brief-facts dt { color: var(--eo-ink); font: 680 16px/1.32 var(--eo-face); }
.eo-brief-facts dd { margin: 3px 0 0; color: var(--service-muted); font: 430 16px/1.38 var(--eo-face); }
.eo-brief-facts > .eo-brief-illustrated { min-height: 61px; padding-inline-start: 55px; }
.eo-brief-illustrated .eo-brief-icon { position: absolute; inset: 12px auto auto 0; }

.eo-services .eo-brief-overview h4 {
  margin: 0 0 8px;
  color: var(--eo-ink);
  font: 480 28px/1.08 var(--eo-display) !important;
  letter-spacing: -.025em;
}

.eo-brief-topic {
  border: 1px solid #dce0d1;
  border-radius: 8px;
  background: var(--service-paper);
}

.eo-brief-topic[open] { border-color: #b4bea3; }
.eo-brief-topic summary { display: block; border-radius: inherit; list-style: none; cursor: pointer; }
.eo-brief-topic summary::-webkit-details-marker { display: none; }
.eo-brief-topic summary:focus-visible { outline: 2px solid var(--eo-action); outline-offset: 2px; }
.eo-brief-topic[open] summary, .eo-brief-topic summary:hover { background: #f4f5e9; }

.eo-services .eo-brief-topic h4 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  color: var(--eo-ink);
  font: 480 clamp(22px, 1.62vw, 29px)/1.05 var(--eo-display) !important;
  letter-spacing: -.027em;
}

.eo-brief-topic h4 strong { display: block; font: inherit; }
.eo-brief-topic small { display: block; margin-top: 3px; color: var(--service-muted); font: 430 15px/1.3 var(--eo-face); letter-spacing: normal; }
.eo-brief-topic h4::after {
  content: "";
  justify-self: end;
  width: 9px;
  height: 9px;
  margin: 0 7px;
  border: solid var(--eo-action);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 230ms var(--eo-ease-out);
}
.eo-brief-topic[open] h4::after { transform: translateY(2px) rotate(225deg); }
@media (hover: hover) and (pointer: fine) {
  .eo-brief-topic summary:hover h4::after { transform: translateY(1px) rotate(45deg); }
  .eo-brief-topic[open] summary:hover h4::after { transform: translateY(-1px) rotate(225deg); }
}
.eo-brief-topic .eo-brief-facts { padding: 0 16px; }
.eo-brief-topic .eo-brief-facts > div {
  display: grid;
  grid-template-columns: minmax(122px, 1fr) minmax(0, 2fr);
  gap: 15px;
}
.eo-brief-topic .eo-brief-facts dd { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .eo-brief-topic[open] .eo-brief-facts { animation: eo-brief-read .26s var(--eo-ease-out) both; }
}
@keyframes eo-brief-read {
  from { opacity: .3; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.eo-service-detail-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 11px var(--detail-pad);
  border-top: 1px solid #e0e4d6;
}

.eo-service-detail-address {
  color: var(--service-muted);
  font: 400 15px/1.3 var(--eo-face);
  user-select: all;
}

.eo-service-detail-email { --surface-height: 44px; margin-inline-start: auto; }

.eo-email-icon { color: var(--eo-action); }
.eo-action-reveal .eo-email-icon { color: var(--eo-paper); }
.eo-email-icon i {
  grid-area: 1 / 1;
  font-size: 15px;
  opacity: calc(1 - var(--engaged));
  transform: translateY(calc(var(--engaged) * 8px)) rotate(calc(var(--engaged) * -8deg));
  transition: opacity .26s ease, transform .45s var(--action-ease);
}
.eo-email-icon i + i {
  opacity: var(--engaged);
  transform: translateY(calc((1 - var(--engaged)) * 8px));
  transition-delay: calc(var(--engaged) * 75ms);
}

@media (max-width: 720px) {
  .eo-service-detail-grid, .eo-service-detail[data-service="germany-family-reunion"] .eo-service-detail-grid {
    width: calc(100vw - 24px);
    border-radius: 12px 24px 12px 12px;
  }

  .eo-service-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .eo-service-detail-photo { display: none; }
  .eo-service-detail-pane { --detail-pad: 19px; }
  .eo-service-detail-body { padding-top: 30px; }
  .eo-service-detail-header { padding-inline-end: 36px; }
  .eo-service-detail-close { top: 12px; right: 12px; }
  .eo-services .eo-brief-topic h4 { padding: 10px; gap: 9px; }
  .eo-brief-topic .eo-brief-facts > div { display: block; }
  .eo-brief-topic .eo-brief-facts dd { margin-top: 4px; }
}

@media (max-width: 480px) {
  .eo-service-detail-footer { padding: 9px 12px; column-gap: 8px; }
  .eo-service-detail-address { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .eo-services *, .eo-services *::before, .eo-services *::after { transition: none !important; }
}
