/* © 2026 Dr. Benedikt Matt, amrhein.at – Alle Rechte vorbehalten. */
section.custom-carousel            {background:transparent;padding:0;box-sizing:border-box;}
section.custom-carousel .container {max-width:1044px;margin:0 auto;padding:0 20px;}

.carousel               {display:flex;flex-direction:column;position:relative;text-align:left;}
.carousel > input       {clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;}

.carousel__thumbnails .thumb-img {
  transition:transform .8s ease,box-shadow .2s ease;
  position:relative;
  width:100%;
  padding-top:100%;
  border-radius:50%;
  overflow:hidden;
  margin-bottom: 15px;
}
.carousel > input:nth-of-type(1):checked ~ .carousel__thumbnails li:nth-of-type(1) .thumb-img,
.carousel > input:nth-of-type(2):checked ~ .carousel__thumbnails li:nth-of-type(2) .thumb-img,
.carousel > input:nth-of-type(3):checked ~ .carousel__thumbnails li:nth-of-type(3) .thumb-img,
.carousel > input:nth-of-type(4):checked ~ .carousel__thumbnails li:nth-of-type(4) .thumb-img {
  transform:scale(.5);
  transform-origin:center;
}
.carousel > input:nth-of-type(1):checked ~ .carousel__thumbnails li:nth-of-type(1) .thumb-img img,
.carousel > input:nth-of-type(2):checked ~ .carousel__thumbnails li:nth-of-type(2) .thumb-img img,
.carousel > input:nth-of-type(3):checked ~ .carousel__thumbnails li:nth-of-type(3) .thumb-img img,
.carousel > input:nth-of-type(4):checked ~ .carousel__thumbnails li:nth-of-type(4) .thumb-img img {
  opacity:.5;
}

.carousel__slides          {display:grid;grid-template-columns:minmax(0,1fr);list-style:none;padding:0;margin:0;overflow:hidden;}
.carousel__slide           {grid-area:1/1;pointer-events:none;z-index:1;}
.carousel__slide .frame    {opacity:0;transition:opacity 0s linear .8s;}
.carousel__slide figcaption{opacity:0;transition:opacity .8s ease-in-out;}
.carousel > input:nth-of-type(1):checked ~ .carousel__slides .carousel__slide:nth-of-type(1),
.carousel > input:nth-of-type(2):checked ~ .carousel__slides .carousel__slide:nth-of-type(2),
.carousel > input:nth-of-type(3):checked ~ .carousel__slides .carousel__slide:nth-of-type(3),
.carousel > input:nth-of-type(4):checked ~ .carousel__slides .carousel__slide:nth-of-type(4) {
  pointer-events:auto;
  z-index:2;
}
.carousel > input:nth-of-type(1):checked ~ .carousel__slides .carousel__slide:nth-of-type(1) .frame,
.carousel > input:nth-of-type(2):checked ~ .carousel__slides .carousel__slide:nth-of-type(2) .frame,
.carousel > input:nth-of-type(3):checked ~ .carousel__slides .carousel__slide:nth-of-type(3) .frame,
.carousel > input:nth-of-type(4):checked ~ .carousel__slides .carousel__slide:nth-of-type(4) .frame {
  opacity:1;
  transition:opacity .8s ease-in-out;
}
.carousel > input:nth-of-type(1):checked ~ .carousel__slides .carousel__slide:nth-of-type(1) figcaption,
.carousel > input:nth-of-type(2):checked ~ .carousel__slides .carousel__slide:nth-of-type(2) figcaption,
.carousel > input:nth-of-type(3):checked ~ .carousel__slides .carousel__slide:nth-of-type(3) figcaption,
.carousel > input:nth-of-type(4):checked ~ .carousel__slides .carousel__slide:nth-of-type(4) figcaption {
  opacity:1;
}

.carousel__slide figure    {display:flex;margin:0;font-family:"Montserrat Regular",sans-serif;}

.carousel__slide .frame,
.carousel__thumbnails .thumb-img img {position:relative;width:100%;border-radius:16px;overflow:hidden;}
.carousel__slide .frame::before {content:"";display:block;width:100%;padding-top:100%;}

.carousel__slide img,
.carousel__thumbnails .thumb-img img {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.carousel__thumbnails .thumb-img img {border-radius:50%;transition:opacity .8s ease;}

.carousel__slide figcaption {align-self:flex-end;padding:20px 20px 0;flex:0 0 25%;min-width:100px;font-size:1.2rem;}
.carousel__slide .credit    {display:block;margin-top:1rem;color:rgba(0,0,0,.5);font-size:1rem;font-family:"NSR",sans-serif;}

.carousel__thumbnails               {display:flex;flex:0 0 auto;list-style:none;margin:0 -10px 40px;padding:0;}
.carousel__thumbnails li            {flex:1 1 auto;max-width:calc((100% / 4) - 20px);margin:0 10px;transition:.8s ease-in-out;}
.carousel__thumbnails label         {display:flex;flex-direction:column;align-items:center;text-align:center;cursor:pointer;}
.carousel__thumbnails .thumb-caption{margin-top:18px;font-size:1rem;line-height:1.25;font-weight:bold;color:#3e5b4c;font-family:"NSR",sans-serif;}

@media (hover: hover) {
  .carousel__thumbnails label:hover .thumb-img {box-shadow:0 0 0 2px rgba(62,91,76,.35);}}

.carousel > input:nth-of-type(1):focus-visible ~ .carousel__thumbnails li:nth-of-type(1) .thumb-img,
.carousel > input:nth-of-type(2):focus-visible ~ .carousel__thumbnails li:nth-of-type(2) .thumb-img,
.carousel > input:nth-of-type(3):focus-visible ~ .carousel__thumbnails li:nth-of-type(3) .thumb-img,
.carousel > input:nth-of-type(4):focus-visible ~ .carousel__thumbnails li:nth-of-type(4) .thumb-img {
  outline:3px solid #3e5b4c;
  outline-offset:4px;
}
.carousel > input:nth-of-type(1):checked:focus-visible ~ .carousel__thumbnails li:nth-of-type(1) .thumb-img,
.carousel > input:nth-of-type(2):checked:focus-visible ~ .carousel__thumbnails li:nth-of-type(2) .thumb-img,
.carousel > input:nth-of-type(3):checked:focus-visible ~ .carousel__thumbnails li:nth-of-type(3) .thumb-img,
.carousel > input:nth-of-type(4):checked:focus-visible ~ .carousel__thumbnails li:nth-of-type(4) .thumb-img {
  outline-width:6px;
  outline-offset:8px;
}

.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

@media (max-width: 767px) {
  .carousel__slide .frame::before {
    padding-top:120%;
  }
  .carousel__slide figcaption {
    flex:0 0 30%;
    padding:15px 15px 0;
    font-size:1rem;
  }
  .carousel__slide .credit {
    font-size:0.9rem;
  }}
@media (prefers-reduced-motion: reduce) {
  .carousel__thumbnails .thumb-img {transition:box-shadow .2s ease;}
  .carousel__thumbnails li         {transition:none;}
  .carousel__thumbnails .thumb-img img,
  .carousel__slide figcaption      {transition-duration:.4s;}
  .carousel__slide .frame          {transition-delay:.4s;}
  .carousel > input:nth-of-type(1):checked ~ .carousel__slides .carousel__slide:nth-of-type(1) .frame,
  .carousel > input:nth-of-type(2):checked ~ .carousel__slides .carousel__slide:nth-of-type(2) .frame,
  .carousel > input:nth-of-type(3):checked ~ .carousel__slides .carousel__slide:nth-of-type(3) .frame,
  .carousel > input:nth-of-type(4):checked ~ .carousel__slides .carousel__slide:nth-of-type(4) .frame {
    transition-duration:.4s;
  }}
