/* ==========================================================================
   slider.css — Joomla 3.x (aktsii)
   Connect AFTER tmpl.default.css so these rules win the cascade.
   Every selector is prefixed with .slider so the template's global rules
   (img{max-width:98%}, .item_fulltext img{width:auto;display:inline-block},
   a{color}, a:hover{color}) can't override the slider.
   Colours are CSS variables — change them in one place below.
   ========================================================================== */

.slider {
  --slider-btn: #cc0000;
  --slider-btn-hover: #e60000;
  --slider-arrow: #d3060a;
  --slider-arrow-hover: #1e73be;
  --slider-text: #333;

  position: relative;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
  overflow: hidden;
}

/* ---------- Image area ---------- */

/* aspect-ratio below is only a fallback until JS reads the real image size.
   Set it to the typical width/height of YOUR images to minimise layout shift. */
.slider .slider-images {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  aspect-ratio: 1200 / 1800;
  margin-bottom: 20px;
}

.slider .slider-images.zoomed {
  touch-action: none;
}

.slider .slider-images img {
  display: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 5px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.slider .slider-images img.active {
  display: block;
  pointer-events: auto;
}

/* ---------- Side arrows (drawn in CSS — no <svg> in the article,
   because Joomla 3 editors/filters often strip it) ---------- */

.slider .slider-arrow {
  position: absolute;
  top: 35%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 64px;
  color: var(--slider-arrow);
  text-decoration: none;
  transform: translateY(-50%);
  transition: color 0.25s ease, transform 0.25s ease;
}

.slider .arrow-left  { left: 4px; }
.slider .arrow-right { right: 4px; }

.slider .slider-arrow::before {
  content: "";
  display: block;
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  border-style: solid;
  border-color: currentColor;
  transform: rotate(45deg);
}

.slider .arrow-left::before {
  border-width: 0 0 5px 5px;
  margin-left: 8px;
}

.slider .arrow-right::before {
  border-width: 5px 5px 0 0;
  margin-right: 8px;
}

.slider .slider-arrow:hover,
.slider .slider-arrow:focus-visible,
.slider .slider-arrow:active {
  color: var(--slider-arrow-hover);
  transform: translateY(-50%) scale(1.15);
}

/* Visually hidden label (kept for screen readers) */
.slider .slider-arrow span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Thumbnail carousel (built by JS) ---------- */

.slider .slider-carousel {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  min-height: 118px;
  padding: 14px 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slider .slider-carousel::-webkit-scrollbar {
  display: none;
}

.slider .slider-thumb {
  display: block;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 70px;
  height: 90px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 5px;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.slider .slider-thumb img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

.slider .slider-thumb-active {
  border-color: var(--slider-btn);
  opacity: 1;
}

.slider .slider-thumb-hover {
  opacity: 1;
}

@media (hover: hover) {
  .slider .slider-thumb:hover {
    opacity: 1;
  }
}

/* ---------- Bottom navigation ---------- */

.slider .slider-bottom-nav {
  margin-top: 20px;
  text-align: center;
}

.slider .nav-buttons {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.slider .slider-counter {
  flex-shrink: 0;
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--slider-text);
}

.slider .nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 140px;
  padding: 14px 30px;
  background: var(--slider-btn);
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.slider .nav-btn:hover,
.slider .nav-btn:focus {
  background: var(--slider-btn-hover);
  box-shadow: 0 8px 24px rgba(204, 0, 0, 0.45);
  color: #fff;
  transform: translateY(-3px);
}

.slider .nav-btn:active {
  transform: scale(0.96);
}

/* Triangles drawn with pseudo-elements: no empty <span> needed in the article */
.slider .btn-prev::before,
.slider .btn-next::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
}

.slider .btn-prev::before {
  border-width: 7px 11px 7px 0;
  border-color: transparent #fff transparent transparent;
}

.slider .btn-next::after {
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #fff;
}

/* ---------- Tablet ---------- */

@media (max-width: 768px) {
  .slider .slider-arrow {
    width: 44px;
    height: 56px;
  }

  .slider .arrow-left  { left: 1px; }
  .slider .arrow-right { right: 1px; }

  .slider .nav-buttons {
    padding: 0 15px;
  }

  .slider .nav-btn {
    min-width: 120px;
    padding: 12px 26px;
    font-size: 1.05rem;
  }

  .slider .btn-prev::before { border-width: 6px 10px 6px 0; }
  .slider .btn-next::after  { border-width: 6px 0 6px 10px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
  .slider .slider-carousel {
    min-height: 96px;
  }

  .slider .slider-thumb {
    width: 52px;
    height: 68px;
  }

  .slider .nav-buttons {
    padding: 0 10px;
  }

  .slider .nav-btn {
    min-width: 100px;
    padding: 12px 18px;
    font-size: 1rem;
  }

  .slider .btn-prev::before { border-width: 6px 9px 6px 0; }
  .slider .btn-next::after  { border-width: 6px 0 6px 9px; }
}

.slider .ad-slot {
  margin: 1px 0;
}