@charset "UTF-8";
:root {
  /* Perusvakiot */
  --gallery-color: #f3f3f3;
  --gallery-bs: 0px 2px 10px 0px #C5C5C5;
  --gallery-color1: #1560BD;
  --gallery-color-dept: #1560BD;
  /* Lisävärit */
  --gallery-dark-bg: #212a2e;
  --gallery-fullscreen-bg: #fff;
  --gallery-fullscreen-image-info-bg: #f3f3f3a1;
  --gallery-swiper-button-hover-bg: #f4f4f475;
  --gallery-timebar-container-bg: rgba(0, 0, 0, 0.5);
  --gallery-timebar-bg: rgba(255, 255, 255, 0.75);
  --gallery-white: #fff;
  --gallery-fc-icon-fill: #1560BD;
  --gallery-close-fc-icon-fill: #1560BD;
  --gallery-fullscreen-image-info-alt-bg: #ffffff94;
  /* Koot */
  --gallery-small: 8px;
  --gallery-medium: 10px;
  --gallery-large: 16px;
  --gallery-xlarge: 20px;
  --gallery-xxlarge: 60px;
  --gallery-border-radius: 25px;
  --gallery-svg-icon-height: 40px;
  --gallery-svg-icon-width: 20px;
  --gallery-swiper-thumb-mw: 80px;
  --gallery-swiper-thumb-height: 50px; }

.theme-dark {
  --gallery-color: #242c40;
  --gallery-bs: 0px 2px 10px 0px #4b4b4b; }

html {
  height: 100vh; }

.fullscreen .image-info.none {
  display: none; }

.swiper-notification {
  display: none; }

.image-container .Video {
  aspect-ratio: 16/9;
  min-height: 300px;
  position: relative;
  width: 100%; }

.timebar-overlay {
  position: absolute;
  top: -9px;
  border: 0;
  right: 0;
  left: 0;
  height: 20px;
  pointer-events: all;
  z-index: 999; }

.dark .ag-gallery,
.dark .ag-gallery .image-info {
  background: var(--gallery-dark-bg); }

.ag-gallery {
  overflow: hidden;
  position: relative;
  margin-bottom: var(--gallery-large);
  background: var(--gallery-color);
  /*box-shadow: var(--gallery-bs);*/
  border: 1px solid var(--color-border); }

.ag-gallery, .image-container .Image, .article-text div.Image img {
  cursor: pointer !important; }

.scrolly-article .article-text div.Image.aghplacementany img {
  cursor: default !important; }

.ag-gallery .image-info, .image-container .image-info {
  cursor: text !important; }

.swiper-wrapper {
  -webkit-transform: translateZ(0);
  transform: translateZ(0); }

.ag-gallery:not(.fullscreen) .swiper-slide.fullscreen-only {
  display: none; }

.ag-gallery .image-container.ag-html > * {
  padding: var(--gallery-xlarge) var(--gallery-xxlarge); }

.ag-gallery.fullscreen .swiper-slide.fullscreen-only {
  display: block; }

.ag-gallery.fullscreen.hide-navigation .swiper-pagination,
.ag-gallery.fullscreen.hide-navigation .swiper-button-next,
.ag-gallery.fullscreen.hide-navigation .swiper-button-prev,
.ag-gallery.fullscreen.hide-navigation .image-info {
  opacity: 0; }

.ag-gallery.fullscreen .swiper-pagination,
.ag-gallery.fullscreen .swiper-button-next,
.ag-gallery.fullscreen .swiper-button-prev,
.ag-gallery.fullscreen .image-info {
  opacity: 1;
  transition: all 0.2s; }

.ag-gallery .swiper-slide {
  overflow: hidden;
  width: 100% !important; }

.ag-gallery .swiper-slide img {
  max-width: 100% !important; }

.ag-gallery.fullscreen .swiper-slide {
  position: relative;
  height: 100dvh !important; }

.ag-gallery.fullscreen .image-info {
  position: absolute;
  bottom: 0;
  background: var(--gallery-fullscreen-image-info-bg);
  z-index: 1;
  width: 100%; }

.ag-gallery.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 0;
  margin: 0;
  z-index: 9999999;
  background: var(--gallery-fullscreen-bg); }

.ag-gallery.fullscreen .image-container img {
  max-width: 100% !important; }

.ag-gallery .image-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%; }

.ag-gallery .image-container img {
  object-fit: cover;
  width: 100%; }

.ag-gallery .image-info {
  padding: 0 0 var(--gallery-medium) 0;
  z-index: 9999;
  display: block;
  position: inherit;
  background: var(--gallery-color);
  word-break: break-word; }

.ag-gallery .swiper-button-next,
.ag-gallery .swiper-button-prev {
  color: var(--gallery-color1);
  top: 0;
  height: 290px;
  background: transparent;
  padding: 0 var(--gallery-xlarge);
  margin-top: 0;
  transition: all 0.3s; }

.ag-gallery .swiper-button-next.play {
  right: -60px; }

.ag-gallery .swiper-button-prev.play {
  left: -60px; }

.ag-gallery .swiper-button-next {
  right: 0; }

.ag-gallery .swiper-button-prev {
  left: 0; }

.ag-gallery .swiper-button-next:after,
.ag-gallery .swiper-button-prev:after {
  font-size: 16px;
  background: var(--gallery-swiper-button-hover-bg);
  transition: all 0.2s;
  border-radius: 50px;
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold; }

.ag-gallery.fullscreen .swiper-button-next,
.ag-gallery.fullscreen .swiper-button-prev {
  height: 100vh !important;
  background: transparent; }

.ag-gallery .ag-fullscreen-button svg {
  height: 22px; }

.ag-gallery .ag-close-fullscreen-button svg {
  height: 20px;
  fill: var(--gallery-color1); }

.ag-gallery .ag-fullscreen-button,
.ag-gallery .ag-close-fullscreen-button {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 999;
  cursor: pointer;
  /* padding: var(--gallery-medium); */
  fill: var(--gallery-color-dept);
  transition: all 0.15s ease-in;
  background: var(--gallery-swiper-button-hover-bg);
  border-radius: 50px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center; }

.timebar-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gallery-timebar-container-bg);
  border-radius: 2px;
  z-index: 999; }

.timebar-container .timebar {
  height: 7px;
  background: var(--gallery-timebar-bg);
  border-radius: 2px; }

.controls-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer; }

.controls-wrapper svg {
  height: var(--gallery-svg-icon-height);
  width: var(--gallery-svg-icon-width); }

.hide {
  display: none; }

.mute-wrapper {
  position: absolute;
  right: 45px;
  bottom: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--gallery-color1);
  border-radius: var(--gallery-border-radius);
  display: flex;
  transition: all 0.3s;
  z-index: 999; }

.mute-wrapper.play {
  right: 10px; }

.controls-wrapper svg {
  fill: var(--gallery-white); }

.mute-wrapper svg {
  fill: var(--gallery-white); }

.blur-img {
  position: absolute;
  inset: 0;
  filter: brightness(0.4) blur(20px);
  transform: scale(1.1); }

.ag-gallery .image-container video {
  width: 100%;
  height: 100%; }

.ag-gallery .image-container .controls-wrapper {
  z-index: 10; }

.image-info .info-wrap {
  display: flex;
  padding: var(--gallery-medium) var(--gallery-medium) 0;
  /*gap: var(--gallery-medium);*/
  flex-direction: column; }

div.image-info div.info-wrap p.Caption {
  padding: 0 !important; }

.ag-gallery .image-container iframe {
  min-height: 400px; }

.ag-gallery.fullscreen .image-container {
  height: inherit; }

.ag-gallery.fullscreen .image-container img {
  object-fit: contain; }

.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.swiper-pagination-fraction {
  top: 0 !important;
  bottom: unset !important; }

.Image.fullscreen {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 10000;
  margin: 0 !important;
  left: 0;
  right: 0;
  background: var(--gallery-fullscreen-bg) !important;
  width: 100% !important; }

.Image.fullscreen img {
  width: 100% !important;
  object-fit: contain;
  position: relative !important;
  height: inherit !important; }

.Image.fullscreen .crop_container {
  height: 100% !important;
  padding: 0 !important; }

.Image.fullscreen .image-info {
  position: absolute;
  bottom: 0;
  background: var(--gallery-fullscreen-image-info-alt-bg);
  width: 100%;
  padding: 5px 10px; }

div.Image:has(.ag-fc-icon):not(.fullscreen) {
  position: relative; }

.ag-fc-icon svg {
  width: 22px;
  height: auto;
  fill: var(--gallery-fc-icon-fill); }

.ag-fc-icon {
  display: flex;
  width: max-content;
  position: absolute;
  top: 0;
  right: 0;
  padding: var(--gallery-medium);
  cursor: pointer;
  transition: all 0.15s ease-in; }

.ag-fc-icon:hover {
  background: var(--gallery-fullscreen-button-hover-bg); }

div.Image:has(.ag-fc-icon) {
  cursor: pointer; }

.ag-fc-icon.none {
  display: none; }

.ag-close-fc-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 999;
  cursor: pointer;
  fill: var(--gallery-color-dept);
  transition: all 0.15s ease-in;
  background: var(--gallery-swiper-button-hover-bg);
  border-radius: 50px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center; }

.ag-close-fc-icon svg {
  width: 20px;
  fill: var(--gallery-close-fc-icon-fill);
  height: 20px;
  fill: var(--gallery-color1); }

.ag-close-fc-icon.none {
  display: none; }

.theme-dark .ag-gallery {
  background: var(--color-border); }

.theme-dark .ag-gallery.fullscreen .image-info {
  background: #222c41bf; }

.theme-dark .Image.fullscreen .image-info {
  background: #222c41bf; }

.theme-dark .Image.fullscreen {
  background: #242c40 !important; }

.theme-dark .ag-thumb-active {
  border-color: #fff; }

.scrolly-article .Image.aghplacementleft.fullscreen, .scrolly-article .Image.aghplacementright.fullscreen {
  width: 100% !important; }

/* Thumbnail-rivi (wrap ja swiper) ALKU */
.ag-gallery .ag-gallery-thumbnails .swiper-slide {
  max-width: var(--gallery-swiper-thumb-mw);
  width: auto !important;
  height: var(--gallery-swiper-thumb-height) !important; }

.ag-gallery-thumbnails {
  margin-top: 12px; }

.ag-thumbnails-wrap-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* justify-content: space-between; */
  padding: 0 10px 10px; }

.ag-gallery .ag-thumbnails-swiper .swiper-wrapper {
  display: flex;
  align-items: center; }

.ag-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease; }

.ag-thumb:hover {
  opacity: 0.9; }

.ag-thumb-active {
  border-color: #333;
  opacity: 1; }

.ag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block; }

.ag-gallery img {
  user-select: none; }

/* Thumbnail-rivi (wrap ja swiper) LOPPU */
/* 16/9-kehys: ulompi wrapper */
.ag-gallery-aspect-wrap {
  width: 100%;
  position: relative; }

.ag-gallery-aspect-wrap .ag-gallery.ag-gallery-ratio {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0; }

.ag-gallery-ratio .swiper-wrapper,
.ag-gallery-ratio .swiper-slide {
  height: 100%; }

.ag-gallery-ratio .image-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center; }

.ag-gallery-ratio .image-container img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center; }

.ag-gallery-ratio .image-container .Video,
.ag-gallery-ratio .image-container .Video video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center; }

/* Fullscreen: kuvakehys täyttää näytön, kuva täysikokoinen (contain) */
.ag-gallery.fullscreen .swiper,
.ag-gallery.fullscreen .swiper-wrapper,
.ag-gallery.fullscreen .swiper-slide {
  height: 100%; }

.ag-gallery.fullscreen .ag-gallery-ratio-frame {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0; }

.ag-gallery.fullscreen .ag-gallery-ratio-frame .image-container img {
  object-fit: contain;
  object-position: center;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto; }

.ag-gallery.fullscreen .ag-gallery-ratio-frame .Video video {
  object-fit: contain;
  object-position: center;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto; }

/* Modaali */
.ag-gallery-pagination-bottom .ag-gallery-swiper-viewport {
  position: relative !important; }

.ag-pagination-bottom {
  top: auto !important;
  bottom: 0 !important; }

.ag-close-fullscreen-button.none,
.ag-close-fc-icon.none {
  display: none !important; }

.ag-gallery.fullscreen .ag-close-fullscreen-button {
  display: flex !important;
  visibility: visible !important; }

.fullscreen .ag-close-fc-icon {
  display: flex !important;
  visibility: visible !important; }

.ag-gallery.show-all .ag-gallery-swiper-viewport,
.ag-gallery.show-all .swiper-wrapper,
.ag-gallery.show-all .swiper-button-next,
.ag-gallery.show-all .swiper-button-prev,
.ag-gallery.show-all .ag-fullscreen-button,
.ag-gallery.show-all .ag-close-fullscreen-button,
.ag-gallery.show-all .swiper-pagination,
.ag-gallery.show-all .ag-gallery-thumbnails,
.ag-gallery.show-all .ag-show-all-button {
  display: none !important; }

.ag-gallery.show-all.fullscreen .ag-gallery-swiper-viewport,
.ag-gallery.show-all.fullscreen .swiper-wrapper,
.ag-gallery.show-all.fullscreen .swiper-button-next,
.ag-gallery.show-all.fullscreen .swiper-button-prev,
.ag-gallery.show-all.fullscreen .ag-fullscreen-button,
.ag-gallery.show-all.fullscreen .ag-close-fullscreen-button,
.ag-gallery.show-all.fullscreen .swiper-pagination {
  display: block !important; }

.ag-gallery.show-all.fullscreen .ag-show-all-wrap {
  display: none !important; }

.ag-gallery .ag-show-all-wrap {
  display: none; }

.ag-gallery.show-all .ag-show-all-wrap {
  display: block;
  position: relative; }

.ag-gallery .ag-show-all-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; }

.ag-gallery .ag-show-all-cell {
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
  background: #111; }

.ag-gallery .ag-show-all-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; }

.ag-gallery .ag-show-all-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center; }

.ag-gallery .ag-show-all-close:hover {
  background: rgba(0, 0, 0, 0.8); }

/* Gallery-modal (Näytä kaikki kuvat) – käytä .modal.galleryModal tai .galleryModal */
.modal.galleryModal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: rgba(0, 0, 0, 0.95);
  flex-direction: column; }

.modal.galleryModal.active {
  display: flex; }

.modal.galleryModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  flex-shrink: 0; }

.modal.galleryModal .modal-title {
  font-size: 1.125rem; }

.modal.galleryModal .modal-controls {
  display: flex;
  align-items: center;
  gap: 8px; }

.modal.galleryModal .modal-close {
  border: none;
  cursor: pointer;
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 999;
  fill: var(--gallery-color1);
  transition: all 0.15s ease-in;
  background: var(--gallery-swiper-button-hover-bg);
  border-radius: 50px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center; }

.modal.galleryModal .modal-close:hover {
  opacity: 0.8; }

.modal.galleryModal .modal-content {
  flex: 1;
  overflow: auto;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: row;
  justify-content: center; }

.modal.galleryModal .modal-grid-view {
  display: none; }

.modal.galleryModal .modal-grid-view.active {
  display: block;
  max-width: 1024px; }

.modal.galleryModal .modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; }

.modal.galleryModal .modal-grid-item {
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
  background: #111; }

.modal.galleryModal .modal-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; }

.ag-gallery button.ag-show-all-button {
  border-radius: 20px;
  background: initial;
  border: 0;
  padding: var(--gallery-medium) var(--gallery-xlarge);
  margin: var(--gallery-xlarge) auto;
  cursor: pointer;
  font-family: var(--ff2);
  background: var(--gallery-color1);
  color: var(--gallery-white); }

/* Lataa kuva */
.download-elem svg {
  height: 25px; }

.download-elem a {
  display: flex;
  column-gap: 5px;
  justify-content: flex-end;
  text-decoration: none;
  align-items: center; }

.download-elem p {
  margin-bottom: 0px; }

.ag-gallery.fullscreen .download-elem {
  margin-right: 30px; }

.download-elem svg path {
  fill: var(--gallery-color1); }

.download-elem {
  margin-right: 10px; }

.theme-dark .download-elem svg path {
  fill: var(--gallery-white); }

.theme-dark .download-elem p {
  color: var(--gallery-white); }

@media (min-width: 700px) {
  .ag-gallery .swiper-button-next:hover,
  .ag-gallery .swiper-button-prev:hover {
    /* background: var(--gallery-swiper-button-hover-bg); */ }
  .ag-gallery .swiper-button-next:hover:after,
  .ag-gallery .swiper-button-prev:hover:after {
    /* background: none; */ } }