.smh-hero,
.smh-hero * {
  box-sizing: border-box;
}

.smh-hero {
  --smh-card-gap: 20px;
  --smh-gallery-duration: 85s;
  --smh-mobile-duration: 80s;
  --smh-entrance-duration: 850ms;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 700px;
  padding: 0 20px;
  overflow: hidden;
  isolation: isolate;
  background: #1a4d3a;
  color: #fff;
}

.smh-overlay {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.smh-inner {
  display: grid;
  grid-template-columns: minmax(0, 33%) minmax(0, 1fr);
  align-items: center;
  gap: 80px;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}

.smh-copy {
  --smh-justify: flex-start;
  --smh-auto-left: 0;
  --smh-auto-right: auto;
  --smh-track-align: flex-start;
  position: relative;
  z-index: 2;
  min-width: 0;
}

.smh-heading {
  margin: 0 0 30px;
  padding: 0;
  color: inherit;
}

.smh-title-line {
  display: block;
  color: #a8e6cf;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.1;
}

.smh-word-window {
  display: block;
  width: max-content;
  max-width: 100%;
  height: 84px;
  overflow: hidden;
  margin-left: var(--smh-auto-left);
  margin-right: var(--smh-auto-right);
}

.smh-word-track {
  display: flex;
  flex-direction: column;
  align-items: var(--smh-track-align);
  width: max-content;
  min-width: 100%;
  height: 84px;
  will-change: transform;
}

.smh-word {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  height: 84px;
  color: #fff;
  font-size: 64px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.smh-description {
  max-width: 480px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, .9);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  margin-left: var(--smh-auto-left);
  margin-right: var(--smh-auto-right);
}

.smh-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: var(--smh-justify);
  gap: 15px;
}

.smh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: transform .3s ease, color .3s ease, background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.smh-button--primary { background: #fff; color: #1a4d3a; }
.smh-button--secondary { border-color: #fff; background: transparent; color: #fff; }
.smh-button:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.smh-gallery {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.smh-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
  height: 100%;
}

.smh-column {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: var(--smh-card-gap);
  height: max-content;
  will-change: transform;
  animation-duration: var(--smh-gallery-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.smh-motion-up { animation-name: smh-slide-up; }
.smh-motion-down { animation-name: smh-slide-down; }

@keyframes smh-slide-up {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, calc(-50% - (var(--smh-card-gap) / 2)), 0); }
}

@keyframes smh-slide-down {
  from { transform: translate3d(0, calc(-50% - (var(--smh-card-gap) / 2)), 0); }
  to { transform: translate3d(0, 0, 0); }
}

.smh-column-item,
.smh-mobile-item { flex: 0 0 auto; min-width: 0; }

.smh-card {
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  transform: translateZ(0);
}

.smh-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--smh-image-y, 50%);
  transition-property: transform, filter;
  transition-duration: 350ms;
  transition-timing-function: ease;
}

.smh-card:hover img { transform: scale(1.05); }
.smh-pause-hover .smh-gallery:hover .smh-column,
.smh-pause-hover .smh-mobile-window:hover .smh-mobile-track { animation-play-state: paused; }
.smh-is-offscreen .smh-column,
.smh-is-offscreen .smh-mobile-track { animation-play-state: paused; }

.smh-gallery--mobile { display: none; width: 100%; overflow: hidden; }
.smh-mobile-window { width: 100%; overflow: hidden; }
.smh-mobile-window + .smh-mobile-window { margin-top: 20px; }

.smh-mobile-track {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
  animation-duration: var(--smh-mobile-duration);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.smh-mobile-item { width: 220px; }
.smh-motion-left { animation-name: smh-slide-left; }
.smh-motion-right { animation-name: smh-slide-right; }

@keyframes smh-slide-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-50% - 10px), 0, 0); }
}

@keyframes smh-slide-right {
  from { transform: translate3d(calc(-50% - 10px), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.smh-entrance--fade,
.smh-entrance--fade-up,
.smh-entrance--zoom {
  opacity: 0;
  transition: opacity var(--smh-entrance-duration) cubic-bezier(.16, 1, .3, 1), transform var(--smh-entrance-duration) cubic-bezier(.16, 1, .3, 1);
}

.smh-entrance--fade-up { transform: translate3d(0, 28px, 0); }
.smh-entrance--zoom { transform: scale(.975); }
.smh-hero.smh-is-visible { opacity: 1; transform: none; }

@media (max-width: 968px) {
  .smh-hero { min-height: 760px; padding: 50px 20px; }
  .smh-inner { grid-template-columns: 1fr !important; gap: 50px; }
  .smh-copy { text-align: center; --smh-align: center; }
  .smh-title-line { font-size: 48px; }
  .smh-word { font-size: 56px; }
  .smh-copy { --smh-justify: center; --smh-auto-left: auto; --smh-auto-right: auto; --smh-track-align: center; }
  .smh-gallery { height: 500px; }
}

@media (max-width: 767px) {
  .smh-hero { min-height: 680px; padding: 45px 15px; }
  .smh-inner { display: flex; flex-direction: column; gap: 40px; }
  .smh-title-line { font-size: 40px; }
  .smh-word { font-size: 48px; }
  .smh-word-window,
  .smh-word-track,
  .smh-word { height: 62px; }
  .smh-description { font-size: 16px; }
  .smh-gallery--desktop { display: none; }
  .smh-gallery--mobile { display: block; }
  .smh-card { height: 200px; }
}

@media (max-width: 479px) {
  .smh-title-line { font-size: 36px; }
  .smh-word { font-size: 44px; }
  .smh-word-window,
  .smh-word-track,
  .smh-word { height: 58px; }
  .smh-buttons { flex-direction: column; align-items: stretch; }
  .smh-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .smh-hero[data-smh-reduced-motion="1"] *,
  .smh-hero[data-smh-reduced-motion="1"] *::before,
  .smh-hero[data-smh-reduced-motion="1"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
