.tn-slider {
  --tn-height: 400px;
  --tn-mobile-height: var(--tn-height);
  position: relative;
  width: 100%;
  height: var(--tn-height);
  min-height: 180px;
  overflow: hidden;
  background: #f1f3f1;
}

.tn-slides,
.tn-slide,
.tn-slide-image,
.tn-slide-overlay {
  position: absolute;
  inset: 0;
}

.tn-slide {
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.tn-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.tn-slide-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.tn-slide-overlay {
  z-index: 1;
  pointer-events: none;
}

.tn-slide-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.tn-slide-content h2 {
  margin: 0 0 10px;
  color: inherit;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.tn-slide-content p {
  margin: 0;
  color: inherit;
  font-size: clamp(16px, 2.3vw, 26px);
  line-height: 1.4;
}

.tn-slide-button {
  margin-top: 22px;
  padding: 11px 22px;
  border-radius: 3px;
  background: #0b6117;
  color: #fff;
  text-decoration: none;
}

.tn-slider-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b6117;
  font: 400 52px/1 Arial, sans-serif;
  transform: translateY(-50%);
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.65));
}

.tn-slider-prev { left: 10px; }
.tn-slider-next { right: 10px; }

.tn-slider-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 15px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.tn-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.tn-slider-dot.is-active {
  background: #0b6117;
  border-color: #0b6117;
}

.tn-masonry-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: row dense;
  gap: 10px;
  align-items: start;
}

.tn-gallery-item {
  display: block;
  overflow: hidden;
  background: #eef1ee;
}

.tn-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.25s ease;
}

.tn-gallery-item:hover img,
.tn-gallery-item:focus-visible img {
  transform: scale(1.025);
}

.tn-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px;
  background: rgba(0, 0, 0, 0.9);
}

.tn-lightbox.is-open { display: flex; }

.tn-lightbox img {
  max-width: min(95vw, 1500px);
  max-height: 90vh;
  object-fit: contain;
}

.tn-lightbox-close {
  position: absolute;
  top: 12px;
  right: 18px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font: 300 42px/1 Arial, sans-serif;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .tn-masonry-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .tn-slider { height: var(--tn-mobile-height); }
  .tn-slide-content { padding: 32px 48px; }
  .tn-slider-arrow { width: 36px; font-size: 42px; }
  .tn-slider-dots { bottom: 10px; }
  .tn-masonry-gallery { grid-template-columns: 1fr; }
  .tn-lightbox { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tn-slide,
  .tn-gallery-item img { transition: none; }
}

