/* Filmstrip carousel: single row, theme-driven colors (no hardcoded BG/borders) */
.mmg-filmstrip {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0; /* follow Divi spacing around module */
}

.mmg-track {
  display: flex;
  gap: var(--mmg-gap, 8px);
  align-items: stretch;
  will-change: transform;
  transition: transform .2s ease-out;
}

.mmg-link {
  display: block;
  border-radius: var(--mmg-radius, 8px);
  overflow: hidden;
}

.mmg-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* enforce 16:9 tiles */
  object-fit: cover;
  transition: transform .15s ease;
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.mmg-link:hover .mmg-thumb { transform: scale(1.02); }

/* Nav arrows — neutral buttons, inherit theme colors */
.mmg-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: .25rem .5rem;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit; /* follow Divi text color */
  z-index: 2;
}
.mmg-prev { left: .25rem; }
.mmg-next { right: .25rem; }

/* Size of tiles: responsive counts (no fixed bg) */
.mmg-filmstrip { --mmg-item-min: 180px; }
@media (max-width: 900px){ .mmg-filmstrip { --mmg-item-min: 150px; } }
@media (max-width: 600px){ .mmg-filmstrip { --mmg-item-min: 140px; } }

/* Lightbox — theme driven: no background color, center image only */
.mmg-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  /* no background to follow theme section; Divi can style via container */
}
.mmg-overlay.is-open { display: flex; }
.mmg-overlay img {
  max-width: 92vw;
  max-height: 90vh;
  display: block;
}
.mmg-overlay .mmg-close,
.mmg-overlay .mmg-prev,
.mmg-overlay .mmg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: .5rem .75rem;
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
}
.mmg-overlay .mmg-close { top: 7%; right: 3%; transform: none; }
.mmg-overlay .mmg-prev { left: 2%; }
.mmg-overlay .mmg-next { right: 2%; }

body.mmg-no-scroll { overflow: hidden; }

/* 1.2.6: tydliga pilar (alltid synliga) */
.mmg-nav{
  background:#fff;
  border-radius:999px;
  width:36px; height:36px;
  font-size:18px;
  box-shadow:0 2px 6px rgba(0,0,0,.2);
  color:inherit;
  opacity:1;
}

/* 1.2.7: flytta pilarna längre ut */
.mmg-nav.prev { position:absolute; top:50%; left:-20px; transform:translateY(-50%); }
.mmg-nav.next { position:absolute; top:50%; right:-20px; transform:translateY(-50%); }
