/* =======================================
   BASE SECTION STYLING
   ======================================= */

.activities-section {
  padding: 0px 15px;
}

/* By default we only show the mobile version */
.activities-section--desktop {
  display: none;
}

/* =======================================
   MOBILE VERSION (1 COLUMN, 1–6)
   ======================================= */

.activities-section--mobile .activities-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--activities-row-gap);
}

/* Shared block layout */
.activity-block {
  display: flex;
  flex-direction: column;
  gap: var(--activities-inner-gap);
}

/* Text card */
.activity-text {
  background: var(--activities-box-bg);
  border-radius: 24px;
  padding: 24px 26px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.activity-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
}

.activity-body {
  margin: 0;
  line-height: 1.6;
}

/* Center grey carousel card */
.activity-carousel {
  display: flex;
  justify-content: center;
}

/* Kill any external margin that might come from rebuilt2.css */
.activity-block .pairCard {
  margin: 0 auto !important;
}


/* =======================================
   DESKTOP VERSION (2 COLUMNS: 1-3-5 / 2-4-6)
   ======================================= */

@media (min-width: 992px) {

  /* Switch: hide mobile, show desktop */
  .activities-section--mobile {
    display: none;
  }

  .activities-section--desktop {
    display: block;
  }

  /* Main wrapper for both columns */
  .activities-desktop-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    column-gap: 60px; /* distance between left & right columns */
  }

  .activities-column {
    flex: 1;
    display: flex;
    flex-direction: column;
  }



  .activities-column--left .activity-block {
    margin-bottom: var(--activities-left-column-gap, var(--activities-row-gap));
  }

  .activities-column--right .activity-block {
    margin-bottom: var(--activities-right-column-gap, var(--activities-row-gap));
  }

  /* Remove bottom margin for the last block in each column */
  .activities-column--left .activity-block:last-child,
  .activities-column--right .activity-block:last-child {
    margin-bottom: 0;
  }

  /* Optional: slightly adjust text card on desktop if you want */
   .activities-section--desktop .activity-text {
    margin-top: 10px;
  } 
}




/* =========================
   BASIC LAYOUT – STEP 1
   ========================= */

/* Outer wrapper for the whole carousel section */
.pairCarousel-root {
  max-width: 1000px;  /* limit how wide the carousel can get */
  margin:  var(--section-gap) auto;/* center it (auto left/right) and add 60px space below */
  padding: 0 10px;    /* small horizontal padding so content doesn't touch screen edge */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
                      /* use the system UI font for a clean, native look */
}

/* Containers for mobile and (later) desktop versions of the carousel */
.pairCarousel-mobile,
.pairCarousel-desktop {
  display: block;     /* make them behave as normal block-level elements (full width) */
}


/* ---------- Level 1: grey card ---------- */

/* Single grey "card" that wraps one carousel (Level 1) */
.pairCard {
  background: var(--box-carousel);          /* grey background */
  border-radius: 22px;                      /* rounded corners for the card */
  padding: 16px 24px 24px;                  /* inner spacing: top 16px, sides 24px, bottom 24px */
  box-shadow: 0 12px 32px rgba(0,0,0,0.25); /* soft shadow to lift the card from the background */
  position: relative;                       /* allows absolute-positioned elements inside */

  width: 100%;          /* take full width on mobile */
  max-width: 430px; 
  max-height: 220px;    /* fixed-ish max width of the grey box */
  margin: 0 auto 30px;  /* center the box, keep space below */
  /* no overflow here – we’re stacking slides, not scrolling a strip */
}




/* Container for the title area at the top of the card */
.pairCard-header {
  margin-bottom: 12px;                       /* small gap between title and the content below (slider/images) */
  text-align: center;
}

/* The title text itself ("Zusätzlicher Komfort", etc.) */
.pairCard-title {
  display: inline-block;           /* shrink box to fit text */
  margin: 0;
  padding: 8px 18px;               /* inside spacing of the white box */
  border-radius: 999px;            /* big radius = pill shape (use 12–18px for a rectangle) */
  background: var(--title-box-carousel); /* white box */
  color: var(--title-box-txt);                     /* darker text so it reads well on white */
  font-size: 1.2rem;
  font-weight: 600;
}



/* ---------- Slide content: row with 2 images ---------- */

.pairSlide-row {
  display: flex;
  align-items: center;

  /* use the whole grey box */
  width: 100%;
  margin: 0;

  /* even spacing left – center – right */
  justify-content: space-evenly;
  column-gap: clamp(16px, 5vw, 40px);
}


/* Each clickable image tile (frame + image) */
.pairTile {
  flex: 0 1 40%;          /* each tile ≈ 40% of the row */
  min-width: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  cursor: zoom-in;
  display: flex;          /* center the frame inside */
  justify-content: center;
}


/* White box around the image (Level 3) */
.pairTile-frame {
  background: var(--box-foto);
  border-radius: 18px;
  padding: 8px;
  overflow: hidden;
  height: 150px;
  max-width: 180px;       /* cap width, but let flex centering handle spacing */
  width: 100%;

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



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


/* The actual image inside the white/grey box */
.pairTile-img {
  display: block;
  max-width: 160px;   /* ⬅️ hard cap for width */
  max-height: 170px;
  width: 100%;        /* fill available space up to 170px */
  height: auto;       /* keep aspect ratio */
  object-fit: contain;/* show the whole image, no cropping */
}

/* Override: even on small phones keep 2 images next to each other */
@media (max-width: 480px) {
  .pairCarousel-root .pairSlide-row {
    flex-direction: row;
  }
}


/* ---------- HOVER EFFECT ---------- */

/* When hovering the tile, bring it visually above its neighbors */
.pairTile:hover {
  z-index: 5;
}

/* Lift and slightly scale the whole white box (frame + image together) */
.pairTile:hover .pairTile-frame {
  transform: translateY(-2px) scale(1.24);   /* small lift + zoom */
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);  /* stronger shadow to emphasize hover */
}

/* Keep the image “locked” to the frame (no extra scaling inside) */
.pairTile:hover .pairTile-img {
  transform: none;
}
.pairTile-frame {
  /* ... */
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}





/* ===== MOBILE SLIDER – HORIZONTAL STACK OF SLIDES ===== */
/* The viewport no longer needs to scroll a long strip */
.pairCard-viewport {
  width: 100%;
  height: 220px;
   /* optional, but fine */
  position: relative;
}

/* Track just acts as a positioning container */
.pairCard-track {
  position: relative;      /* no flex, no translateX */
}

/* Stack all slides on top of each other */
.pairSlide {
  position: absolute;
  inset: 0;
  opacity: 0;             /* hidden by default */
  pointer-events: none;   /* not clickable when hidden */
  transition: opacity 0.4s ease;
}


/* Only the current slide is visible and clickable */
.pairSlide.is-active {
  opacity: 1;
  pointer-events: auto;
}


/* ===== MOBILE vs DESKTOP VISIBILITY ===== */

/* Default: show ONLY the mobile version */
.pairCarousel-mobile {
  display: block;    /* mobile carousel visible on small/medium screens */
}

.pairCarousel-desktop {
  display: none;     /* desktop version hidden by default */
}

/* On large screens: switch to the desktop layout */
@media (min-width: 1200px) {
  .pairCarousel-mobile {
    display: none;   /* hide mobile carousel */
  }

  .pairCarousel-desktop {
    display: block;  /* show desktop carousel */
  }
}
@media (min-width: 1200px) {
  .pairCarousel-desktop-layout {
    display: flex;
    justify-content: center;
    gap: 40px;              /* space between left and right cards */
  }

  .pairCarousel-desktop-slot {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* ==========================================
   SLIDER WRAPPER – CONTEXT FOR ARROWS & DOTS
   ========================================== */
.pairCard-slider {
  position: relative;          /* reference for arrows & indicators */
  z-index: 3;
}


/* ==========================================
   ARROWS (white circles, same style as old)
   ========================================== */

.pairCard-arrow {
  position: absolute;
  top: 40%;
  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: 40px;              /* 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;
}

/* mobile: a bit more side padding if you want */
@media (max-width: 980.98px) {
  .pairCard-indicators {
    padding: 0 32px;
  }
}



/* 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;
}


@media (max-width: 480px) {
  .pairCarousel-root .pairCard {
    transform: scale(0.85) translateX(-30px);
    transform-origin: center;
    margin: 0 auto;
  }
  .pairLightbox-dialog {
    transform: scale(0.95);
  }
  .pairCard-viewport {
    height: 130px;      /* was 220px – adjust as you like */
  }

  .pairTile-frame {
    height: 120px;      /* was 180px */
    max-width: 150px;   /* was 180px */
  }

  .pairTile-img {
    max-height: 150px;  /* was 170px */
  }
.pairCard-arrow {
    top: 50%;                 /* move vertically */
    transform: translateY(-50%);
    width: 26px;              /* a bit smaller */
    height: 26px;
    font-size: 16px;
  }

  .pairCard-arrow-prev {
    left: -18px;                /* bring them inside the card */
  }

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

  /* indicators: tighter and a bit higher */
  .pairCard-indicators {
    padding: 0 16px;
    gap: 4px;
    bottom: -15px;
  }
}



/* ==========================================
   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 */
@media (max-width: 768px) {
  .pairLightbox-dialog {
    /* about 20% smaller than the desktop default */
    width: 75vw;
    height: 56vh;

    padding: 18px 24px 40px;  /* a bit less padding so content still fits */
    border-radius: 18px;
  }

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

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