@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&display=swap');

/* =========================================
   BLOCK 1: FILM GALERIE STYLES
========================================= */

/* Die lineare Perforation, extrem leicht zu rendern */
.mm-film-strip-container.album-mode,
.mm-swiper-slide-container { 
  background-color: #000; 
  background-image: 
    linear-gradient(to right, transparent 8px, #f4f4f4 8px, #f4f4f4 16px), 
    linear-gradient(to right, transparent 8px, #f4f4f4 8px, #f4f4f4 16px); 
  background-position: top 8px left 0, bottom 8px left 0; 
  background-size: 16px 12px, 16px 12px; 
  background-repeat: repeat-x, repeat-x; 
}

.mm-film-strip-container.album-mode { 
  display: flex; gap: 10px; overflow: hidden; padding: 30px 10px; position: relative; box-sizing: border-box; 
}
.mm-film-strip-container.album-mode .mm-film-frame { flex: 1 1 0; min-width: 0; }

.mm-album-wrapper { display: none; flex-direction: column; }

/* Desktop */
.show-desktop-6 { display: flex; }
.show-desktop-4 { display: flex; } 

/* Tablet */
@media (max-width: 900px) {
  .show-desktop-6 { display: none !important; }
  .show-desktop-4 { display: none !important; }
  .show-tablet-4 { display: flex !important; }
}

/* Mobile */
@media (max-width: 600px) {
  .show-tablet-4 { display: none !important; }
  .show-mobile-3 { display: flex !important; }
}

/* WENN ÜBERSCHUSS AUSGEBLENDET WERDEN SOLL */
.mm-hide-excess { display: flex !important; flex-direction: column; }
@media (max-width: 900px) {
  .mm-hide-excess .mm-film-frame:nth-child(n+5) { display: none; }
}
@media (max-width: 600px) {
  .mm-hide-excess .mm-film-frame:nth-child(n+4) { display: none; }
}

.mm-film-slider { width: 100%; overflow: hidden; background-color: #000; }
.swiper-wrapper.slider-mode { display: flex; box-sizing: border-box; }

.mm-swiper-slide-container { 
  width: 320px !important; 
  padding: 30px 10px; 
  box-sizing: border-box;
  flex-shrink: 0; 
}
.mm-film-slider.is-fluid-ticker .swiper-wrapper { transition-timing-function: linear !important; }

.mm-film-frame { aspect-ratio: 3 / 2; position: relative; background-color: #111; overflow: hidden; container-type: size; }
.mm-film-frame.empty-frame { background-color: #222; opacity: 0.5; }

.mm-film-link { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; cursor: pointer; }
.mm-film-img { display: block; position: relative; z-index: 1; pointer-events: none; }
.mm-film-img.is-landscape { width: 100%; height: 100%; object-fit: cover; }
.mm-film-img.is-portrait { position: absolute; top: 50%; left: 50%; width: 100cqh; height: 100cqw; transform: translate(-50%, -50%) rotate(90deg); object-fit: cover; }


/* =========================================
   BLOCK 2: POLAROID HEADER STYLES
========================================= */
.mm-polaroid-header-container {
  position: relative; width: 100%; background-color: #a3a3a3; overflow: hidden; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}

.mm-polaroid-overlay-border {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 99999;
}

.mm-polaroid-title { position: relative; z-index: 1000; text-align: center; margin: 0; padding: 0 20px; pointer-events: none; }
.mm-polaroid-title.has-shadow { text-shadow: 2px 4px 20px rgba(0,0,0,0.9); }
.mm-polaroid-title.has-stroke { -webkit-text-stroke: 2px #000; text-stroke: 2px #000; }

.mm-polaroid {
  position: absolute;
  background-color: var(--p-bg, #ffffff);
  padding: var(--p-pad, 16px) var(--p-pad, 16px) var(--p-bot, 70px) var(--p-pad, 16px);
  box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
  filter: brightness(0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease, z-index 0s;
  cursor: crosshair;
  -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column;
}

.mm-polaroid img { width: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.polaroid-portrait { width: 280px; }
.polaroid-portrait img { aspect-ratio: 3 / 4; }
.polaroid-landscape { width: 360px; } 
.polaroid-landscape img { aspect-ratio: 4 / 3; }

.mm-polaroid-caption {
  position: absolute; bottom: 25px; left: 10px; right: 10px; font-family: 'Caveat', cursive; font-size: 1.8rem; color: #222; text-align: center; line-height: 1.1; transform: rotate(-2deg); pointer-events: none; 
}

.mm-polaroid:hover,
.mm-polaroid.is-active {
  filter: brightness(1); 
  transform: translate(-50%, -50%) scale(1.1) rotate(0deg) !important;
  box-shadow: 5px 20px 40px rgba(0,0,0,0.6);
  z-index: 99990 !important; 
}

@media (max-width: 768px) {
  .polaroid-portrait { width: 180px; }
  .polaroid-landscape { width: 220px; }
  .mm-polaroid { padding: 10px 10px var(--p-bot, 50px) 10px; }
  .mm-polaroid-caption { bottom: 15px; font-size: 1.2rem; }
}


/* =========================================
   BLOCK 3: HOVER BILD (FARBWECHSEL)
========================================= */
.mm-hover-image-block { position: relative; width: 100%; overflow: hidden; line-height: 0; }
.mm-hi-base { width: 100%; height: auto; display: block; }
.mm-hi-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.mm-hover-image-block:hover .mm-hi-hover { opacity: 1; }


/* =========================================
   BLOCK 4: VORHER / NACHHER SLIDER
========================================= */
.mm-before-after-container { position: relative; width: 100%; overflow: hidden; line-height: 0; }
.mm-ba-img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.mm-ba-before { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: left; clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); }
.mm-ba-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 10; margin: 0; padding: 0; }
.mm-ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: white; z-index: 5; transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.mm-ba-handle-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-family: monospace; color: #333; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }


/* =========================================
   BLOCK 5: DIA LEUCHTPULT
========================================= */
.mm-dia-wrapper { width: 100%; display: flex; flex-direction: column; background: #000000; }

/* Die großen Kacheln (Tabs) */
.mm-dia-tabs { 
  display: flex; 
  width: 100%; 
  margin: 0; 
  padding: 0; 
  background: #000; 
}
.mm-dia-tab {
  flex: 1; 
  padding: 20px 10px; 
  border: none; 
  border-right: 1px solid #000; 
  background-color: var(--t-bg, #222); 
  color: var(--t-col, #fff);
  font-size: var(--t-fs, 18px); 
  font-weight: bold; 
  cursor: pointer;
  text-align: center; 
  transition: all 0.3s ease;
  text-transform: uppercase;
}
.mm-dia-tab:last-child { border-right: none; }
.mm-dia-tab.is-active, .mm-dia-tab:hover {
  background-color: var(--t-act-bg, #fff); 
  color: var(--t-act-col, #000);
}

.mm-dia-container { position: relative; width: 100%; height: 80vh; background-color: #000000; overflow: hidden; }

.mm-dia-light-table {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70%; height: 60%; background-color: #fff;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(0,0,0,0.1);
  border-radius: 8px; pointer-events: none; z-index: 1;
}

.mm-dia-magazine { display: none; position: absolute; top:0; left:0; width:100%; height:100%; }
.mm-dia-magazine.is-active { display: block; z-index: 5; }

.mm-dia-slide {
  position: absolute; width: 160px; height: 160px; cursor: grab; z-index: 10;
  transition: transform 0.1s ease; touch-action: none; 
}
.mm-dia-slide:active { cursor: grabbing; z-index: 100 !important; }

.mm-dia-frame {
  width: 100%; height: 100%; background-color: #e6e6e6; border-radius: 8px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.5), inset -2px -2px 5px rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}

/* Echte Bildformate */
.mm-dia-image-wrapper { 
  position: relative; background-color: #000; box-shadow: inset 0 0 10px rgba(0,0,0,0.8); 
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}

/* Querformat (3:2) -> Breite dominiert */
.format-3-2 .mm-dia-image-wrapper { width: 90%; height: auto; aspect-ratio: 3/2; }

/* Hochformat (2:3) -> Höhe dominiert */
.format-2-3 .mm-dia-image-wrapper { width: auto; height: 90%; aspect-ratio: 2/3; }

/* Quadratisch (1:1) -> Stark verkleinert für dicken Plastikrand */
.format-1-1 .mm-dia-image-wrapper { width: 65%; height: auto; aspect-ratio: 1/1; }

.mm-dia-img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.05; transition: opacity 0.3s ease; pointer-events: none; }
.mm-dia-black-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #000; transition: opacity 0.3s ease; }

.mm-dia-slide.is-illuminated .mm-dia-img { opacity: 1; }
.mm-dia-slide.is-illuminated .mm-dia-black-overlay { opacity: 0; }

@media (max-width: 768px) {
  .mm-dia-slide { width: 100px; height: 100px; }
  .mm-dia-light-table { width: 90%; height: 50%; }
  .mm-dia-tab { padding: 15px 5px; font-size: 14px !important; }
}