/* V4 static interaction and responsive repairs. Keep V3's white/green palette. */

.elementor-menu-toggle {
  cursor: pointer;
  touch-action: manipulation;
}

@media (max-width: 1024px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .elementor-widget-slides .swiper-slide-bg {
    background-size: cover;
    background-position: center;
  }

  .elementor-widget-slides .swiper-slide-inner {
    min-height: clamp(220px, 42vw, 430px);
  }

  .elementor-widget-media-carousel .elementor-carousel-image {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  .elementor-widget-testimonial-carousel .elementor-testimonial__text {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  .elementor-widget-heading .elementor-heading-title {
    font-size: clamp(1.35rem, 5.3vw, 1.9rem);
    line-height: 1.2;
    overflow-wrap: normal;
  }

  .elementor-widget-text-editor,
  .elementor-widget-text-editor p,
  .site-main p,
  .site-main li {
    font-size: 1rem;
    line-height: 1.6;
  }

  .elementor-widget-slides .swiper-slide-inner {
    min-height: clamp(170px, 44vw, 250px);
  }

  .elementor-widget-slides .swiper-slide-contents {
    max-width: calc(100vw - 40px);
    padding: 14px 18px;
  }

  .elementor-widget-slides .elementor-slide-heading {
    font-size: clamp(1.25rem, 6vw, 2rem);
    line-height: 1.2;
  }

  .elementor-widget-slides .elementor-slide-description {
    font-size: clamp(.85rem, 3.8vw, 1rem);
    line-height: 1.45;
  }

  .elementor-widget-media-carousel .swiper-wrapper,
  .elementor-widget-testimonial-carousel .swiper-wrapper {
    align-items: stretch;
  }

  .elementor-widget-media-carousel .elementor-carousel-image {
    min-height: 230px;
    max-height: 64vw;
  }

  .elementor-widget-testimonial-carousel .elementor-testimonial {
    height: 100%;
    box-sizing: border-box;
  }

  .elementor-widget-testimonial-carousel .elementor-testimonial__image img {
    width: clamp(52px, 16vw, 76px);
    height: clamp(52px, 16vw, 76px);
    object-fit: cover;
  }

  .elementor-widget-media-carousel .elementor-swiper-button,
  .elementor-widget-testimonial-carousel .elementor-swiper-button {
    width: 40px;
    height: 44px;
    display: grid;
    place-items: center;
    z-index: 5;
  }

  .elementor-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
  }

  .elementor-nav-menu__container.elementor-nav-menu--dropdown.v4-menu-open {
    display: block !important;
    height: auto !important;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    z-index: 1000;
  }

  .elementor-nav-menu--dropdown .elementor-item,
  .elementor-nav-menu--dropdown .elementor-sub-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .elementor-widget-image img,
  .elementor-widget-theme-post-featured-image img,
  .elementor-widget-image-box img {
    height: auto;
    max-width: 100%;
    object-fit: contain;
  }

  .elementor-widget-form input,
  .elementor-widget-form select,
  .elementor-widget-form textarea {
    max-width: 100%;
    box-sizing: border-box;
  }
}

.v4-carousel .swiper-wrapper {
  display: flex !important;
  transition-property: transform;
  transition-timing-function: ease;
  will-change: transform;
}

.v4-carousel .swiper-slide {
  flex: 0 0 auto !important;
  min-width: 0;
  box-sizing: border-box;
}

.v4-carousel .swiper-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  min-height: 28px;
  margin-top: 8px;
}

.v4-carousel .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #8da99a;
  cursor: pointer;
}

.v4-carousel .swiper-pagination-bullet-active {
  background: #00532d;
  transform: scale(1.2);
}

.v4-carousel .elementor-swiper-button {
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.v4-carousel .elementor-swiper-button:focus-visible,
.v4-carousel .swiper-pagination-bullet:focus-visible,
.elementor-menu-toggle:focus-visible {
  outline: 2px solid #00532d;
  outline-offset: 3px;
}

.v4-hover-scale {
  transition: transform 250ms ease;
}

.v4-hover-scale:hover {
  transform: scale(1.1);
}

.v4-carousel.v4-coverflow .swiper-slide {
  transition: transform 500ms ease, opacity 500ms ease;
}

.v4-carousel.v4-coverflow .swiper-slide:not(.v4-active) {
  transform: scale(.9);
  opacity: .78;
}

.elementor-widget-slides:not(.v4-carousel) .swiper-slide:not(:first-child) {
  display: none;
}

.elementor-widget-media-carousel:not(.v4-carousel) .swiper-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.elementor-widget-testimonial-carousel:not(.v4-carousel) .swiper-wrapper {
  display: grid;
  gap: 12px;
}

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

  .v4-carousel .swiper-wrapper {
    transition: none !important;
  }
}
