/* Good Earth Hero Carousel — 70% active + 15% + 15% custom material-style layout. */

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

.ges-hero-carousel {
  --ges-green: #5ea260;
  --ges-deep-green: #245524;
  --ges-black: #111111;
  --ges-white: #ffffff;
  position: relative;
  min-height: var(--ges-hero-desktop-height, 760px);
  overflow: hidden;
  color: var(--ges-white);
  background: var(--ges-black);
  font-family: "Anek Latin", Manrope, Arial, sans-serif;
}

.ges-hero-carousel__stage {
  position: relative;
  width: 100%;
  height: var(--ges-hero-desktop-height, 760px);
  overflow: hidden;
  outline: none;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.ges-hero-carousel__stage.is-dragging {
  cursor: grabbing;
}

.ges-hero-carousel__slide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  z-index: 1;
  width: 15%;
  overflow: hidden;
  pointer-events: none;
  background: #222;
  transition:
    left var(--ges-hero-transition, 1000ms) cubic-bezier(.76, .09, .215, 1),
    width var(--ges-hero-transition, 1000ms) cubic-bezier(.76, .09, .215, 1),
    opacity 500ms ease,
    filter 500ms ease;
}

.ges-hero-carousel__slide.is-active {
  left: 0;
  z-index: 5;
  width: 70%;
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.ges-hero-carousel__slide.is-preview-1 {
  left: 70%;
  z-index: 4;
  width: 15%;
  opacity: 1;
  filter: brightness(.73) saturate(.82);
}

.ges-hero-carousel__slide.is-preview-2 {
  left: 85%;
  z-index: 3;
  width: 15%;
  opacity: 1;
  filter: brightness(.62) saturate(.75);
}

.ges-hero-carousel__slide.is-off-left {
  left: -15%;
  z-index: 1;
  width: 15%;
  opacity: 0;
  filter: brightness(.58) saturate(.68);
}

.ges-hero-carousel__slide.is-off-right {
  left: 100%;
  z-index: 1;
  width: 15%;
  opacity: 0;
  filter: brightness(.58) saturate(.68);
}

.ges-hero-carousel__slide.is-instant {
  transition: none !important;
}

/* A visible first-frame fallback for Elementor editor and slow script loading. */
.ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(1) {
  left: 0;
  z-index: 5;
  width: 70%;
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(2) {
  left: 70%;
  z-index: 4;
  width: 15%;
  opacity: 1;
  filter: brightness(.73) saturate(.82);
}

.ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(3) {
  left: 85%;
  z-index: 3;
  width: 15%;
  opacity: 1;
  filter: brightness(.62) saturate(.75);
}

.ges-hero-carousel__picture {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ges-hero-carousel__picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.035);
  transition: transform var(--ges-hero-transition, 1000ms) ease;
}

.ges-hero-carousel__slide.is-active .ges-hero-carousel__picture img {
  transform: scale(1);
}

.ges-hero-carousel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .68) 0%, rgba(0, 0, 0, .3) 62%, rgba(0, 0, 0, .1) 100%);
  transition: opacity 380ms ease;
}

.ges-hero-carousel__slide--light .ges-hero-carousel__overlay { opacity: .6; }
.ges-hero-carousel__slide--medium .ges-hero-carousel__overlay { opacity: .85; }
.ges-hero-carousel__slide--strong .ges-hero-carousel__overlay { opacity: 1; }
.ges-hero-carousel__slide:not(.is-active) .ges-hero-carousel__overlay { opacity: .08; }

.ges-hero-carousel__content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;

  display: flex;

  /*
   * The active carousel slide occupies 70% of the viewport.
   * Allow the content area to use that available space.
   */
  width: min(100%, 1250px);
  max-width: 1250px;

  height: 100%;

  /*
   * Top/bottom padding controls vertical breathing room.
   * Left padding preserves the current visual alignment.
   * Smaller right padding gives the heading more usable width.
   */
  padding:
    80px
    30px
    90px
    clamp(70px, 5vw, 130px);

  flex-direction: column;

  /*
   * Center the complete content group vertically
   * within the taller hero.
   */
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  transform: translateY(22px);

  transition:
    opacity 360ms ease 110ms,
    transform 480ms ease 110ms,
    visibility 0s linear 480ms;

  box-sizing: border-box;
}

.ges-hero-carousel__slide.is-active .ges-hero-carousel__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 380ms ease 240ms, transform 540ms cubic-bezier(.2,.7,.2,1) 240ms, visibility 0s;
}

.ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(1) .ges-hero-carousel__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ges-hero-carousel__eyebrow {
  display: block;
  margin-bottom: 17px;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
}

.ges-hero-carousel__heading {
  width: 1100px;
  max-width: 1100px;

  margin: 0 0 28px;

  color: var(--ges-white);

  font-size: clamp(52px, 3.15vw, 76px);
  font-weight: 500;

  line-height: .98;
  letter-spacing: -.04em;

  text-wrap: balance;
}

.ges-hero-carousel__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 52px;
  padding: 0 21px;
  border: 1px solid var(--ges-white);
  border-radius: 999px;
  color: var(--ges-black);
  background: var(--ges-white);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease;
}

.ges-hero-carousel__button span { margin-left: 10px; font-size: 18px; }
.ges-hero-carousel__button:hover,
.ges-hero-carousel__button:focus-visible {
  border-color: var(--ges-black);
  color: var(--ges-white);
  background: var(--ges-black);
  outline: 2px solid var(--ges-white);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.ges-hero-carousel__controls-wrap {
  position: absolute;
  right: clamp(22px, 5vw, 128px);
  bottom: clamp(26px, 4.5vw, 76px);
  left: clamp(22px, 5vw, 128px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.ges-hero-carousel__counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-style: normal;
}

.ges-hero-carousel__counter b { color: var(--ges-white); font-weight: 600; }
.ges-hero-carousel__counter i { display: inline-block; width: 42px; height: 1px; background: rgba(255, 255, 255, .45); }
.ges-hero-carousel__counter em { font-style: normal; }

.ges-hero-carousel__navigation {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.ges-hero-carousel__navigation button {
  display: inline-grid;
  width: clamp(43px, 3.25vw, 62px);
  height: clamp(43px, 3.25vw, 62px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  color: var(--ges-white);
  background: rgba(0, 0, 0, .18);
  cursor: pointer;
  place-items: center;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease;
}

.ges-hero-carousel__navigation svg { width: 22px; height: 22px; }
.ges-hero-carousel__navigation button:hover,
.ges-hero-carousel__navigation button:focus-visible {
  border-color: var(--ges-white);
  color: var(--ges-black);
  background: var(--ges-white);
  outline: none;
  transform: translateY(-2px);
}

.ges-hero-carousel__notice {
  padding: 24px;
  border: 1px solid #e3b9b9;
  color: #7c2323;
  background: #fff6f6;
}

@media (max-width: 1024px) {
  .ges-hero-carousel,
  .ges-hero-carousel__stage { min-height: 690px; height: 690px; }

  .ges-hero-carousel__slide.is-active { width: 78%; }
  .ges-hero-carousel__slide.is-preview-1 { left: 78%; width: 22%; }
  .ges-hero-carousel__slide.is-preview-2 { left: 100%; opacity: 0; }
  .ges-hero-carousel__slide.is-off-left { left: -22%; width: 22%; }
  .ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(1) { width: 78%; }
  .ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(2) { left: 78%; width: 22%; }
  .ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(3) { left: 100%; opacity: 0; }
  .ges-hero-carousel__content {
    width: min(100%, 800px);
    max-width: 800px;

    padding: 70px 48px 80px;

    justify-content: center;
}

.ges-hero-carousel__heading {
    width: 100%;
    max-width: 720px;

    font-size: clamp(46px, 5.5vw, 64px);
}
}

@media (max-width: 767px) {
  .ges-hero-carousel,
  .ges-hero-carousel__stage { min-height: 630px; height: 630px; }

  .ges-hero-carousel__slide.is-active { width: 100%; }
  .ges-hero-carousel__slide.is-preview-1,
  .ges-hero-carousel__slide.is-preview-2 { left: 100%; width: 20%; opacity: 0; }
  .ges-hero-carousel__slide.is-off-left { left: -20%; width: 20%; }
  .ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(1) { width: 100%; }
  .ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(2),
  .ges-hero-carousel:not(.is-ready) .ges-hero-carousel__slide:nth-child(3) { left: 100%; width: 20%; opacity: 0; }
  .ges-hero-carousel__content { padding: 105px clamp(22px, 8vw, 52px) 100px; }
  .ges-hero-carousel__heading { font-size: clamp(38px, 10vw, 52px); }
  .ges-hero-carousel__controls-wrap { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ges-hero-carousel *,
  .ges-hero-carousel *::before,
  .ges-hero-carousel *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
