/* Måviken V1.9 – kompakt premiumgalleri. Överstiger V1.7/V1.8-reglerna. */
.v17-gallery {
  display:grid!important;
  columns:initial!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:clamp(14px,1.8vw,24px)!important;
  max-width:1080px!important;
  margin:34px auto 10px!important;
  align-items:start;
}
.v17-gallery:has(> .v17-photo:only-child) {grid-template-columns: minmax(0,1fr)!important;max-width:520px!important;}
.v17-gallery:has(> .v17-photo:nth-child(2):last-child),
.v17-gallery:has(> .v17-photo:nth-child(4):last-child) {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  max-width:890px!important;
}
.v17-gallery .v17-photo,
.v17-gallery .v17-photo:first-child:nth-last-child(2),
.v17-gallery .v17-photo:nth-child(2):last-child,
.v17-gallery .v17-photo:nth-child(4):last-child,
.v17-gallery .v17-photo:nth-child(5):last-child {
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  grid-column:auto!important;
  margin:0!important;
  overflow:visible!important;
  break-inside:auto!important;
  -webkit-column-break-inside:auto!important;
  border:0!important;
  background:transparent!important;
}
.v17-gallery .v17-photo a {
  display:block!important;
  width:100%!important;
  height:clamp(180px,18vw,236px)!important;
  overflow:hidden!important;
  background:transparent!important;
  border-radius:3px!important;
  position:relative;
}
.v17-gallery .v17-photo img {
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:cover!important;
  object-position:center center!important;
  background:transparent!important;
  transition:transform .35s ease!important;
}
.v17-gallery .v17-photo a:hover img {transform:scale(1.035)!important;}
.v17-gallery .v17-photo figcaption {
  padding:9px 0 0!important;
  margin:0!important;
  color:#617269!important;
  font:500 12.5px/1.45 Barlow,Arial,sans-serif!important;
  letter-spacing:.005em;
  background:transparent!important;
  position:static!important;
}
/* En enda bild får inte breda ut sig över hela sidan. */
.v17-gallery:has(> .v17-photo:only-child) .v17-photo a {height:290px!important;}
/* Bildgallerisidan: lika prydliga, små och välbeskurna fotografier. */
.gallery-grid {
  display:grid!important;
  columns:initial!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:20px!important;
  align-items:start;
}
.gallery-grid figure {
  display:block!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:auto!important;
  margin:0!important;
  overflow:visible!important;
}
.gallery-grid a {display:block!important; height:220px!important;overflow:hidden!important;border-radius:3px!important;background:transparent!important;}
.gallery-grid img {width:100%!important;height:100%!important;aspect-ratio:auto!important;object-fit:cover!important;transition:transform .35s ease!important;}
.gallery-grid a:hover img {transform:scale(1.035)!important;}
@media(max-width:900px){
 .v17-gallery {grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:750px!important;}
 .v17-gallery:has(> .v17-photo:only-child) {max-width:520px!important;}
 .v17-gallery .v17-photo a {height:210px!important;}
 .gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:550px){
 .v17-gallery,.v17-gallery:has(> .v17-photo:nth-child(2):last-child),
 .v17-gallery:has(> .v17-photo:nth-child(4):last-child) {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important;}
 .v17-gallery .v17-photo a,.v17-gallery:has(> .v17-photo:only-child) .v17-photo a {height:clamp(125px,35vw,190px)!important;}
 .v17-gallery:has(> .v17-photo:only-child) {grid-template-columns:1fr!important;max-width:460px!important;}
 .v17-gallery .v17-photo figcaption {font-size:11.5px!important;}
 .gallery-grid {gap:11px!important;}
 .gallery-grid a {height:clamp(130px,36vw,190px)!important;}
}
@media(max-width:350px){
 .v17-gallery,.gallery-grid {grid-template-columns:1fr!important;}
 .v17-gallery .v17-photo a,.gallery-grid a {height:200px!important;}
}
