.home-directions {
  padding: 88px 0 92px;
  overflow: hidden;
  background: #f7f7f7;
}

.home-directions-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.home-directions-heading > div:first-child { max-width: 740px; }

.home-directions-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #66676b;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-directions-heading h2 {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 18px;
  color: #232323;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.home-directions-heading h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: #242323;
}

.home-directions-heading p {
  margin: 0;
  color: #67696e;
  line-height: 1.65;
}

.home-directions-controls {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
  padding-bottom: 4px;
}

.home-directions-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #d8d9dc;
  border-radius: 50%;
  background: #fff;
  color: #242323;
  font-size: 1.1rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.home-directions-arrow:hover:not(:disabled) {
  border-color: #242323;
  background: #242323;
  color: #fff;
}

.home-directions-arrow:focus-visible,
.home-direction-card:focus-visible {
  outline: 3px solid #1674ef;
  outline-offset: 3px;
}

.home-directions-arrow.swiper-button-disabled {
  cursor: default;
  opacity: .4;
}

/* Swiper measures 2.4/1.2 slides against .container; slides can travel beyond it. */
.home-directions-swiper {
  width: 100%;
  margin-inline: 0;
  overflow: visible;
}

.home-directions-swiper .swiper-wrapper { align-items: stretch; }
.home-directions-swiper .swiper-slide { height: 490px; }

.home-direction-card {
  --direction-surface: #faf3e7;
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  border-radius: 18px;
  background: var(--direction-surface);
  color: #242323;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.home-direction-card:hover {
  border-color: #c9c9c9;
  box-shadow: 0 16px 32px rgba(20, 20, 20, .1);
  color: #242323;
}

.home-direction-spec { --direction-surface: #faf3e7; }
.home-direction-equipment { --direction-surface: #eaf4fb; }
.home-direction-services { --direction-surface: #fff2e6; }
.home-direction-manipulator { --direction-surface: #f5f0f1; }
.home-direction-transport { --direction-surface: #eaf4ed; }

.home-direction-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 218px;
  flex-direction: column;
  padding: 30px 32px 12px;
}

.home-direction-number {
  color: #777a7f;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .11em;
}

.home-direction-copy h3 {
  margin: 13px 0 9px;
  padding-right: 42px;
  color: #242323;
  font-size: clamp(1.5rem, 2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.home-direction-copy p {
  max-width: 370px;
  margin: 0 0 16px;
  color: #57595e;
  font-size: .96rem;
  line-height: 1.55;
}

.home-direction-open {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d8d9dc;
  border-radius: 50%;
  background: #fff;
  color: #242323;
  font-size: 1.1rem;
  transition: transform .2s ease, border-color .2s ease;
}

.home-direction-card:hover .home-direction-open {
  transform: translate(2px, -2px);
  border-color: #242323;
}

.home-direction-media {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}

.home-direction-media img {
  position: absolute;
  display: block;
  width: calc(100% - 10px);
  height: calc(120% - 10px);
  object-fit: contain;
  object-position: right bottom;
  overflow: visible;
  bottom: 0;
}

.home-popular-grid { margin-bottom: 24px; }

.home-popular-card { min-height: 390px; }

.home-popular-card .home-direction-copy {
  min-height: 165px;
  padding-bottom: 4px;
}

.home-popular-card .home-direction-copy h3 { font-size: clamp(1.4rem, 1.8vw, 1.9rem); }

.home-popular-card .home-direction-copy p { font-size: .9rem; }

.home-popular-card .home-direction-media img {
  right: 10px;
  bottom: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 10px);
}

.home-directions-pagination {
  position: static;
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 25px;
}

.home-directions-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 !important;
  background: #8a8b8d;
  opacity: .55;
}

.home-directions-pagination .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 5px;
  background: #242323;
  opacity: 1;
}

@media (max-width: 767px) {
  .home-directions { padding: 64px 0 70px; }
  .home-directions-heading { align-items: end; gap: 14px; }
  .home-directions-controls { gap: 6px; }
  .home-directions-arrow { width: 40px; height: 40px; }
  .home-directions-swiper .swiper-slide { height: 450px; }
  .home-direction-copy { min-height: 215px; padding: 24px 24px 10px; }
  .home-direction-copy p { font-size: .9rem; }
}

@media (max-width: 575px) {
  .home-directions-heading { align-items: flex-start; flex-direction: column; }
  .home-directions-controls { align-self: flex-end; }
  .home-directions-swiper .swiper-slide { height: 430px; }
  .home-direction-copy { min-height: 205px; padding: 22px 20px 8px; }
  .home-direction-copy h3 { font-size: 1.5rem; }
  .home-direction-open { top: 18px; right: 18px; width: 40px; height: 40px; }
  .home-popular-card { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-direction-card,
  .home-direction-open,
  .home-directions-arrow { transition: none; }
}
