/* ===========================
   ÜBER UNS – LAYOUT
   =========================== */

.about-main {
  padding: 40px 15px 60px;
}

/* Each block (Gastgeber / Tiere) */
.about-section {
  margin: 0;            /* reset */
}

/* GAP BETWEEN SECTIONS */
.about-section + .about-section {
  margin-top: 40px;    /* distance between the two rows */
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* one row = text + 4 images */
.about-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ===========================
   DESKTOP ≥ 992px
   =========================== */

@media (min-width: 992px) {
  .about-row {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;       /* text defines row height, images are centered */
  }

  /* Text column fills full row height */
  .about-row > .about-text-card {
    align-self: stretch;
  }

  /* Image grid stays centered vertically in the row */
  .about-row > .about-image-grid {
    align-self: center;
  }
}

/* ===========================
   TEXT CARD
   =========================== */

.about-text-card {
  background: var(--ueber-uns-box-bg);
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);

  display: flex;
  flex-direction: column;
  justify-content: center;

  /* ⬅️ minimum height for a nice block even with little text */
  min-height: 340px;
}

.about-title {
  margin: 0 0 16px;
  font-size: 1.6rem;
  font-weight: 700;
}

.about-body {
  margin: 0 0 10px;
  line-height: 1.6;
}

.about-body:last-of-type {
  margin-bottom: 0;
}

/* ===========================
   IMAGE GRID (2x2)
   =========================== */

.about-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-image-grid-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ueber-uns-box-bg);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* 1:1 aspect ratio (square tiles) */
.about-image-grid-item::before {
  content: "";
  display: block;
  padding-bottom: 100%;   /* 1:1 ratio */
}

/* image fills the square */
.about-image-grid-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   MOBILE – order
   =========================== */

@media (max-width: 991.98px) {
  /* Default: stack blocks text -> images */
  .about-row {
    display: flex;
    flex-direction: column;
  }

  /* Tiere block – text ABOVE images on mobile */
  .about-row--animals {
    flex-direction: column-reverse;
  }
}

/* ===========================
   ÜBER UNS – LAYOUT
   =========================== */

.about-main {
  padding: 40px 15px 60px;
}

/* Each block (Gastgeber / Tiere) */
.about-section {
  margin: 0;            /* reset */
}

/* GAP BETWEEN SECTIONS */
.about-section + .about-section {
  margin-top: 100px;    /* distance between the two rows */
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* one row = text + 4 images */
.about-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ===========================
   DESKTOP ≥ 992px
   =========================== */

@media (min-width: 992px) {
  .about-row {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;       /* text defines row height, images are centered */
  }

  /* Text column fills full row height */
  .about-row > .about-text-card {
    align-self: stretch;
  }

  /* Image grid stays centered vertically in the row */
  .about-row > .about-image-grid {
    align-self: center;
  }
}

/* ===========================
   TEXT CARD
   =========================== */

.about-text-card {
  background: var(--ueber-uns-box-bg);
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);

  display: flex;
  flex-direction: column;
  justify-content: center;

  /* minimum height for a nice block even with little text */
  min-height: 340px;
}

.about-title {
  margin: 0 0 16px;
  font-size: 1.6rem;
  font-weight: 700;
}

.about-body {
  margin: 0 0 10px;
  line-height: 1.6;
}

.about-body:last-of-type {
  margin-bottom: 0;
}

/* ===========================
   IMAGE GRID (2x2)
   =========================== */

.about-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-image-grid-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ueber-uns-box-bg);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* 1:1 aspect ratio (square tiles) */
.about-image-grid-item::before {
  content: "";
  display: block;
  padding-bottom: 100%;   /* 1:1 ratio */
}

/* image fills the square */
.about-image-grid-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   MOBILE – order
   =========================== */

@media (max-width: 991.98px) {
  /* Default: stack blocks text -> images */
  .about-row {
    display: flex;
    flex-direction: column;
  }

  /* Tiere block – text ABOVE images on mobile */
  .about-row--animals {
    flex-direction: column-reverse;
  }
}

/* ===========================
   ÜBER UNS – IMAGE HOVER ZOOM
   =========================== */

/* smooth animation for the image */
.about-image-grid-item img {
  transition: transform 0.25s ease-out;
}

/* zoom-in effect on hover */
.about-image-grid-item:hover img {
  transform: scale(1.08);
  cursor: zoom-in !important;
}

/* optional: slightly stronger shadow when hovered */
.about-image-grid-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}


/* ===========================
   ÜBER UNS – CAROUSEL BASE
   =========================== */

.about-section--carousel {
  margin-top: 80px;
  margin-bottom: 80px;
}

.ueber-uns-carousel-wrapper {
  display: flex;
  justify-content: center;
}

/* Grey card – big version always */
.ueber-uns-pairCard {
  background: var(--box-carousel);
  border-radius: 22px;
  padding: 32px 40px 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  position: relative;

  width: 100%;
  max-width: 820px;
  margin: 0 auto 100px;
}

/* ===========================
   TEXT INSIDE EACH SLIDE
   =========================== */

.ueber-uns-slide-copy {
  text-align: center;
  margin-bottom: 14px;
}

.ueber-uns-slide-title {
  margin: 0 0 8px;
  padding: 6px 14px;
  display: inline-block;
  border-radius: 999px;
  background: var(--title-box-carousel);
  color: var(--title-box-txt);
  font-size: 1.1rem;
  font-weight: 600;
}

.ueber-uns-carousel-text {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* ===========================
   SLIDER MECHANICS (STACKED)
   =========================== */

.ueber-uns-pairCard .pairCard-slider {
  position: relative;
}

/* visible window */
.ueber-uns-pairCard .pairCard-viewport {
  width: 100%;
  height: 450px;              /* big grey box always */
  position: relative;
  overflow: hidden;
}

/* simple positioning container */
.ueber-uns-pairCard .pairCard-track {
  position: relative;
}

/* stack slides on top of each other */
.ueber-uns-pairCard .pairSlide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* active slide shown */
.ueber-uns-pairCard .pairSlide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* row with 2 tiles */
.ueber-uns-pairCard .pairSlide-row {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  column-gap: clamp(16px, 5vw, 40px);
  width: 100%;
}

/* clickable tile */
.ueber-uns-pairCard .pairTile {
  flex: 0 1 40%;
  min-width: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  cursor: zoom-in;
  display: flex;
  justify-content: center;
}

/* white box around each image */
.ueber-uns-pairCard .pairTile-frame {
  background: var(--box-foto);
  border-radius: 18px;
  padding: 8px;
  overflow: hidden;

  height: 300px;
  max-width: 467px;
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

/* image */
.ueber-uns-pairCard .pairTile-img {
  display: block;
  max-width: 365px;
  max-height: 288px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* hover effect */
.ueber-uns-pairCard .pairTile:hover {
  z-index: 5;
}

.ueber-uns-pairCard .pairTile:hover .pairTile-frame {
  transform: translateY(-2px) scale(1.24);
}

/* ===========================
   SLIDER WRAPPER – CONTEXT
   =========================== */

.pairCard-slider {
  position: relative;          /* reference for arrows & indicators */
  z-index: 3;
}

/* ==========================================
   ARROWS (white circles)
   ========================================== */

.pairCard-arrow {
  position: absolute;
  bottom: 35%;
  transform: translateY(-55%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--arrow-circle-br);
  box-shadow: 0 4px 10px rgba(0,0,0,.20);
  opacity: 0.9;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  font-weight: 700;
  color: var(--arrow-normal);

  z-index: 1;   /* above indicators, below hovered tiles */

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.pairCard-arrow-prev { left: -18px; }
.pairCard-arrow-next { right: -18px; }

.pairCard-arrow:hover {
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
  color: var(--arrow-on-hover);
}

.pairCard-indicators {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0 24px;

  position: relative;
  left: 0;
  right: 0;
  bottom: 17px;              /* 10px above bottom of grey card area */
  z-index: 0;                /* sit behind image tiles */
}

.pairCard-indicator {
  position: relative;

  flex: 1 1 0;
  height: 4px;
  border-radius: 999px;
  border: 0;
  background: var(--indicator-not-active);  /* light grey base */
  cursor: pointer;
  padding: 0;
}

/* active base bar (while autoplay runs) */
.pairCard-indicator.is-active {
  background: var(--indicator-not-active);
}

/* red progress bar inside */
.pairCard-indicator::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--indicator-loading);      /* e.g. red */
  border-radius: inherit;
}

/* autoplay progress (JS adds .is-progress) */
.pairCard-indicator.is-progress::before {
  width: 100%;
  transition: width 4.5s linear;
}

/* after manual click: solid active color, no red progress */
.pairCard-indicator.is-manual {
  background: var(--indicator-active);       /* e.g. black */
}

.pairCard-indicator.is-manual::before {
  transition: none;
  width: 0;
}


/* ==========================================
   SCALE DOWN THE ÜBER-UNS CAROUSEL ON NARROWER VIEWPORTS
   ========================================== */

/* start scaling once the viewport is ~1100px or smaller */
@media (max-width: 1100px) {
  .ueber-uns-pairCard {
    transform: scale(0.9);
    transform-origin: center top;
  }
}

/* scale a bit more on real tablets / big phones */
@media (max-width: 900px) {
  .ueber-uns-pairCard {
    transform: scale(0.8);
    transform-origin: center top;
  }
  }
/* scale a bit more on real tablets / big phones */
@media (max-width: 750px) {
  .ueber-uns-pairCard {
    transform: scale(0.9);
    transform-origin: center top;
      }
  }

@media (max-width: 800px) {
   .ueber-uns-pairCard {
    padding: 10px;
      }
    /* slightly lower viewport so it doesn’t feel so tall */
  .ueber-uns-pairCard .pairCard-viewport {
    height: 390px;
  }

  .ueber-uns-pairCard .pairTile-frame {
    height: 240px; 
     }
      /* actual image corners rounded too */
  .ueber-uns-pairCard .pairTile-img {
    border-radius: 0px;
    max-height: 240px;
    width: auto;
    max-width: 100%;
  }
 .pairCard-arrow {
  position: absolute;
  bottom: 28%;
   }
  .pairCard-arrow-prev { left: 0px; }
.pairCard-arrow-next { right: 0px; }
  .ueber-uns-pairCard .pairCard-arrow {
    width: 30px;      /* smaller circle */
    height: 30px;
    font-size: 20px;  /* smaller arrow symbol */
  }


   .ueber-uns-pairCard .pairSlide-row {
    column-gap: 8px;        /* your smaller gap */
    align-items: flex-end;  /* ⬅️ push images down inside the grey box */
  }
    .ueber-uns-pairCard .pairCard-indicators {
    gap: 4px;        /* smaller space between indicators */
    padding: 0 8px;  /* a bit less horizontal padding (optional) */
    bottom: 6px;     /* closer to the bottom edge (optional) */
  }
}
  /* 8:11 aspect ratio for the white image box on small screens */
@media (max-width: 500px) {
   .ueber-uns-pairCard {
    padding: 10px;
      }
    /* slightly lower viewport so it doesn’t feel so tall */
  .ueber-uns-pairCard .pairCard-viewport {
    height: 320px;
  }

  .ueber-uns-pairCard .pairTile-frame {
    height: 140px; 
     }
      /* actual image corners rounded too */
  .ueber-uns-pairCard .pairTile-img {
    border-radius: 0px;
    max-height: 150px;
    width: auto;
    max-width: 100%;
  }
 .pairCard-arrow {
  position: absolute;
  bottom: 23%;
   }
  .pairCard-arrow-prev { left: -6px; }
.pairCard-arrow-next { right: -6px; }
  .ueber-uns-pairCard .pairCard-arrow {
    width: 22px;      /* smaller circle */
    height: 22px;
    font-size: 16px;  /* smaller arrow symbol */
  }


   .ueber-uns-pairCard .pairSlide-row {
    column-gap: 8px;        /* your smaller gap */
    align-items: flex-end;  /* ⬅️ push images down inside the grey box */
  }
    .ueber-uns-pairCard .pairCard-indicators {
    gap: 4px;        /* smaller space between indicators */
    padding: 0 8px;  /* a bit less horizontal padding (optional) */
    bottom: 6px;     /* closer to the bottom edge (optional) */
  }
}




/* ==========================================
   LEVEL 5 – LIGHTBOX OVERLAY
   ========================================== */

.pairLightbox {
  position: fixed;
  inset: 0;                                /* full screen */
  background: rgba(0,0,0,0.65);            /* dark overlay behind dialog */
  display: none;                           /* JS toggles .is-open */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pairLightbox.is-open {
  display: flex;
}

/* clickable background (for closing) */
.pairLightbox-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;                 /* main dark is on .pairLightbox */
}

.pairLightbox-dialog {
  position: relative;
  width: min(800px, 95vw);   /* fixed-ish width, responsive */
  height: min(900px, 70vh);  /* fixed-ish height, responsive */
  background: var(--lightbox-br);
  border-radius: 20px;
  padding: 32px 48px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.75);

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image scales inside the fixed dialog box */
.pairLightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;   /* show whole image */
  border-radius: 12px;
}

/* close button */
.pairLightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--close-botton-border);
  background: var(--close-botton-box);
  color: var(--close-botton);
  font-size: 22px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* arrows in lightbox (matching card arrows) */
.pairLightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--arrow-circle-br);
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  opacity: 0.9;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  font-weight: 700;
  color: var(--arrow-normal);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.pairLightbox-arrow-prev { left: 16px; }
.pairLightbox-arrow-next { right: 16px; }

.pairLightbox-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  color: var(--arrow-on-hover);
}

/* indicators inside the white box, at the bottom */
.pairLightbox-indicators {
  position: absolute;
  left: 60px;                              /* match dialog horizontal padding */
  right: 60px;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0;
}

.pairLightbox-indicator {
  width: 50px;
  height: 4px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: var(--indicator-not-active);
  cursor: pointer;
}

.pairLightbox-indicator.is-active {
  background: var(--indicator-active);
  width: 80px;                             /* active one a bit longer */
}

/* responsive tweaks just for lightbox */
@media (max-width: 768px) {
  .pairLightbox-dialog {
    width: 75vw;
    height: 56vh;

    padding: 18px 24px 40px;
    border-radius: 18px;
  }

  .pairLightbox-arrow {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .pairLightbox-indicators {
    left: 24px;
    right: 24px;
    bottom: 10px;
  }
}
