/**
 * 1.3.9 — scroll-reveal, card hover and Instagram carousel.
 * Palette: green #005B40, white, black #111. Hidden state is added by JS only.
 */

/* --- Scroll reveal (class added by JS; content stays visible if JS is off) --- */
.ipb3-reveal {
  opacity: 0;
  transform: translateY(20px);
}

.ipb3-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 550ms ease-out, transform 550ms ease-out;
}

/* --- Card hover (pointer devices only) --- */
@media (hover: hover) {
  .ipb3-event-card,
  .ipb3-home .min-card-link,
  .ipb3-home .gallery-strip a,
  .ipb3-gallery-carousel a,
  body.ipb3-blog-layout .ipb3-entry-image {
    transition: transform 250ms ease, box-shadow 250ms ease;
  }

  .ipb3-event-media,
  .ipb3-entry-image,
  .ipb3-home .gallery-strip a,
  .ipb3-gallery-carousel a {
    overflow: hidden;
  }

  .ipb3-event-media img,
  .ipb3-entry-image img,
  .ipb3-home .gallery-strip img,
  .ipb3-gallery-carousel img {
    transition: transform 250ms ease;
  }

  .ipb3-event-card:hover,
  .ipb3-home .min-card-link:hover,
  .ipb3-home .gallery-strip a:hover,
  .ipb3-gallery-carousel a:hover,
  body.ipb3-blog-layout .ipb3-entry-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.14);
  }

  .ipb3-event-card:hover .ipb3-event-media img,
  body.ipb3-blog-layout .ipb3-entry-image:hover img,
  .ipb3-home .gallery-strip a:hover img,
  .ipb3-gallery-carousel a:hover img {
    transform: scale(1.045);
  }
}

/* --- Instagram carousel: CSS grid fallback until JS adds .is-carousel --- */
.ipb3-gallery-ui {
  display: none;
}

.ipb3-gallery-carousel.is-carousel .ipb3-gallery-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.ipb3-gallery-carousel.is-carousel .ipb3-gallery-track {
  display: flex;
  gap: var(--ipb3-gal-gap, 12px);
  transition: transform 550ms ease-out;
  will-change: transform;
}

.ipb3-gallery-carousel.is-carousel .ipb3-gallery-track a {
  flex: 0 0 calc((100% - (var(--ipb3-gal-gap, 12px) * (var(--ipb3-gal-vis, 4) - 1))) / var(--ipb3-gal-vis, 4));
  width: calc((100% - (var(--ipb3-gal-gap, 12px) * (var(--ipb3-gal-vis, 4) - 1))) / var(--ipb3-gal-vis, 4));
  max-width: none;
}

.ipb3-gallery-carousel.is-carousel.is-dragging .ipb3-gallery-track {
  transition: none;
}

.ipb3-gallery-carousel.is-carousel .ipb3-gallery-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.ipb3-gallery-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #005B40;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}

.ipb3-gallery-btn:hover,
.ipb3-gallery-btn:focus-visible {
  background: #004632;
  outline: 2px solid #005B40;
  outline-offset: 2px;
}

.ipb3-gallery-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.ipb3-gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ipb3-gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid #005B40;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.ipb3-gallery-dot[aria-current="true"] {
  background: #005B40;
}

.ipb3-gallery-dot:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.ipb3-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ipb3-reveal,
  .ipb3-reveal.is-in,
  .ipb3-event-card,
  .ipb3-event-media img,
  .ipb3-entry-image,
  .ipb3-entry-image img,
  .ipb3-home .gallery-strip a,
  .ipb3-home .gallery-strip img,
  .ipb3-gallery-carousel a,
  .ipb3-gallery-carousel img,
  .ipb3-home .min-card-link,
  .ipb3-gallery-carousel.is-carousel .ipb3-gallery-track,
  a.min-card-link {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    box-shadow: none !important;
  }
}
