/**handles:kk-layout**/
:where(.wp-site-blocks) > * {
  margin-block-start: 0px;
  margin-block-end: 0px;
}

.wp-block-image > img {
  height: auto;
}

/* embedded video aspect ratios */
.wp-block-embed__wrapper {
  position: relative;
  height: 0;
  overflow: hidden;
}

.wp-embed-aspect-16-9 > .wp-block-embed__wrapper {
  padding-bottom: 56.25%;
}

.wp-embed-aspect-9-16 > .wp-block-embed__wrapper {
  padding-bottom: 178%;
}

.wp-embed-aspect-4-3 > .wp-block-embed__wrapper {
  padding-bottom: 75%;
}

.wp-block-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* default element spacing */
main > *[class^="wp-block"] {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

main > .alignfull:first-child {
  margin-top: 0;
}

main > .alignfull:last-child {
  margin-bottom: 0;
}

main > *[class^="wp-block"].alignfull + *[class^="wp-block"].alignfull {
  margin-top: -3rem;
}

/* .wp-block-group.has-background {
  padding: 1em;
} */

.wp-block-group:last-child {
  margin-bottom: 0;
}

main > h1 {
  margin-top: 1.5em;
}

/* 404 page */
.error-not-found {
  padding-top: 10rem;
  padding-bottom: 10rem;
}

@media (min-width: 1400px) {
  main > *[class^="wp-block"] {
    margin-top: 5vw;
    margin-bottom: 5vw;
  }

  main > .alignfull:last-child {
    margin-bottom: 0;
  }

  main > *[class^="wp-block"].alignfull + *[class^="wp-block"].alignfull {
    margin-top: -5vw;
  }
}

/* --- overrides from the former "kuopionkonservatorio" child theme --- */

body {
  overflow-x: hidden;
}

/* default content width inside group and columns */
/* .wp-block-column
  > *[class^="wp-block"]:not(.alignwide):not(.alignfull):not(.wp-block-buttons):not(
    .wp-block-letm-blocks-accordion
  ),
.wp-block-group__inner-container > *[class^="wp-block"]:not(.alignwide):not(.alignfull) {
  margin-right: auto;
  margin-left: auto;
  max-width: 720px;
} */

@media (min-width: 1400px) {
  /* main > *[class^="wp-block"] {
    margin-top: 0 !important;
    margin-bottom: 2em !important;
  } */
}

/* match wide content area with .container width */
.alignwide {
  margin: 0 auto;
  scroll-margin-top: 5em;
}

@media (min-width: 768px) {
  .alignwide {
    max-width: 720px !important;
    scroll-margin-top: 9em;
  }
}

@media (min-width: 992px) {
  .alignwide {
    max-width: 960px !important;
  }
}

@media (min-width: 1200px) {
  .alignwide {
    max-width: 1140px !important;
  }
}

@media (min-width: 1400px) {
  .alignwide {
    max-width: 1320px !important;
  }
}

.featured-image-banner {
  width: 100%;
  min-height: 500px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

.full-width-image img {
  width: 100%;
  height: auto;
}

/* Oma konsa panel: menu list styling now lives in nav.css (core/navigation markup) */

.wp-block-column[style*="flex-basis:33.33%"] h2 + ul {
  margin-top: 60px;
}

.wp-block-column[style*="flex-basis:33.33%"] ul {
  margin-right: 1.5em;
  padding-bottom: 50px;
  padding-left: 0;
  list-style-type: none;
}

@media (max-width: 992px) {
  ul.relatives,
  ul.linkkilista {
    margin-right: 0;
  }
}

/* Sidebar lists */
.wp-block-column[style*="flex-basis:33.33%"] li {
  line-height: 3;
  border-bottom: 1px solid #ebebeb;
  background-color: #fff;
}
.wp-block-column[style*="flex-basis:33.33%"] li:hover {
  background-color: #171717;
  border-bottom: 2px solid #171717;
}

.wp-block-column[style*="flex-basis:33.33%"] li a {
  display: block;
  color: #171717;
}
.wp-block-column[style*="flex-basis:33.33%"] li:hover a {
  padding-left: 1rem;
  color: #fff;
  background-color: #171717;
  transition: 0.3s;
}

.wp-block-column[style*="flex-basis:33.33%"] li:hover a[href$=".pdf"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-filetype-pdf' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38.574.574 0 0 1-.238.241.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084 0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592 1.14 1.14 0 0 1-.196.422.8.8 0 0 1-.334.252 1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z'/%3E%3C/svg%3E");
}

.wp-block-column[style*="flex-basis:33.33%"]
  lii:hover
  a[target="_blank"]:not([href$=".pdf"])::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-box-arrow-up-right' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}

table.yhteystiedot {
  width: 100%;
}
table.yhteystiedot tr {
  border-bottom: 1px solid #a5a5a5;
}

.wp-block-buttons {
  margin-bottom: 1em;
}

/* change button width on mobile */
@media (max-width: 992px) {
  .wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
    width: calc(50% - var(--wp--style--block-gap, 0.5em) * 0.75);
  }
}

/* this is trying to fix a weird hover bug */
.is-style-outline > :where(.wp-block-button__link):hover,
:where(.wp-block-button__link).is-style-outline:hover {
  border: 2px solid;
  padding: 0.667em 1.333em;
}

.wp-block-button__link:hover {
  padding-top: calc(0.1em + 2px);
  max-height: 55px;
}

/* hover features on frontpage */
.frontpage-feature {
  margin-top: 2em;
  margin-bottom: 1em;
}

.frontpage-feature:hover.has-vaaleanpunainen-hover-color {
  background-color: #eddce4;
}
.frontpage-feature:hover.has-huurre-hover-color {
  background-color: #e4f4f7;
}
.frontpage-feature:hover.has-marjapuuro-hover-color {
  background-color: #efe1e1;
}

/* linkkilista on mobile */
ul.linkkilista {
  display: block;
  margin-right: 1.5em;
  padding-bottom: 50px;
  padding-left: 0;
  list-style-type: none;
  width: 100%;
}
#linkkilista--toggle {
  display: none;
}

ul.linkkilista li {
  display: block;
  line-height: 3;
  border-bottom: 1px solid #ebebeb;
  background-color: #fff;
  transition:
    background-color 0.3s,
    border-bottom 0.3s;
}

ul.linkkilista li:hover {
  background-color: #171717;
  border-bottom-color: #171717;
}

ul.linkkilista li a {
  display: block;
  color: var(--wp--preset--color--musta);
  text-decoration: underline;
}

ul.linkkilista li:hover a {
  color: var(--wp--preset--color--valkoinen);
  padding-left: 1rem;
  background-color: #171717;
  transition: 0.3s;
}

@media (max-width: 768px) {
  ul.linkkilista {
    display: none;
  }
  #linkkilista--toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background-color: var(--wp--preset--color--huurre);
    border: none;
    cursor: pointer;
    padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
    color: var(--wp--preset--color--musta);
    font-size: var(--wp--preset--font-size--text-s);
    font-weight: 600;
    font-family: inherit;
  }
}

/* letm accordion styling */
.wp-block-letm-blocks-accordion {
  margin-right: 1em;
}

.accordion-content {
  border: 1px solid #ebebeb !important;
  border-top: 0;
}

/* footer nav */
footer ul.menu {
  list-style-type: none;
}

footer ul.menu li {
  margin-left: -2em;
}

footer {
  margin-top: auto !important;
}

.c-lang-and-search div {
  display: inline-block;
}

@media (max-width: 1000px) {
  .c-lang-and-search {
    margin-top: 0.5rem;
    width: 100%;
  }
}

/* Section Headers  */

@media only screen and (min-width: 768px) {
  .section-header {
    max-width: 650px !important;
    width: 650px !important;
    margin-left: 0 !important;
  }
}

@media only screen and (max-width: 768px) {
  .section-header {
    max-width: 100% !important;
    width: 100% !important;
  }
}

.front-page-tapahtuma-query .wp-block-post > .wp-block-group,
.front-page-posts-query .wp-block-post > .wp-block-group {
  height: 100%;
}

.front-page-tapahtuma-query figure > img {
  margin-top: -1px;
}

@media only screen and (max-width: 768px) {
  .front-page-tapahtuma-query .wp-block-post > .wp-block-group,
  .front-page-posts-query .wp-block-post > .wp-block-group {
    height: auto;
  }
}