/**
 * Styles for the blocks on the editor and the frontend.
 */

/* Header block template styles */

header .wp-block-site-logo img {
  height: auto;
  max-width: 100%;
  /* filter: brightness(200); */
}

header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  background-color: white;
  transition: background-color 300ms linear;
}

body.page-template-map header.wp-block-template-part {
  position: fixed;
  background-color: transparent;
}

header.wp-block-template-part.scroll {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

/* header.wp-block-template-part.scroll .desktop-header-block, */
header.wp-block-template-part.scroll .mobile-header-block {
  background-color: white;
  /* background-color: var(--wp--preset--color--custom-tumma-blues); */
  transition: background-color 300ms linear;
}

.desktop-header {
  display: none;
}

@media screen and (max-width: 768px) {
  .home-page-banner h1 {
    font-size: 2.8rem !important;
  }

  h2.has-large-font-size {
    font-size: 1.6rem !important;
  }

  .wp-block-spacer {
    max-height: 1rem;
  }

}


@media screen and (min-width: 1025px) {
  .mobile-header {
    display: none;
  }

  .desktop-header {
    display: block;
  }
}

@media screen and (max-width: 1024px) {
  .desktop-header {
    display: none;
  }

  .mobile-header {
    display: block;
  }
}

.desktop-header a.wp-block-navigation-item__content {
  padding: 0.2rem 0.5rem;
  border-bottom: 2px solid transparent;
}

.desktop-header a.wp-block-navigation-item__content:hover {
  border-bottom: 2px solid var(--wp--preset--color--custom-sivu-sininen);
}

.desktop-header .header-top a.wp-block-navigation-item__content {
  border-bottom: 1px solid transparent;
}

.desktop-header .header-top a.wp-block-navigation-item__content:hover {
  border-bottom: 1px solid var(--wp--preset--color--custom-light-gray);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: #316c31;
}

nav.contacts-nav {
  border-left: 1px solid var(--wp--preset--color--custom-light-gray);
  padding-left: 1rem;
}

/* hr */

.wp-block-separator {
  width: 66px;
  border-top: 3px solid;
}

.border-right {
  border-right: 3px solid white;
}

/* mobile-full-width */

@media screen and (max-width: 1024px) {

  /* .wp-block-group.is-layout-constrained.mobile-full-width,
  figure.wp-block-post-featured-image.mobile-full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  } */
}



/* Search canvas and Menu canvas */

.mobile-search-canvas,
.mobile-menu-canvas {
  width: 100%;
  position: fixed;
  z-index: 999;
  top: 0;
  right: -100%;
  overflow-x: hidden;
  transition: 0.1s;
}

.mobile-search-canvas.open,
.mobile-menu-canvas.open {
  width: 100%;
  right: 0;
  overflow-y: scroll;
  /* background-color: var(--wp--preset--color--custom-light-gray); */
  background-color: #fff;
  background-image: url('/wp-content/uploads/2025/09/kalaan-pirkanmaalle-kansi.jpg');
  background-size: cover;
  background-position: center;
  z-index: 999;
}

.mobile-search-canvas .wp-block-column {
  overflow-wrap: normal;
  word-break: normal;
}

/* .mobile-menu-canvas.open .wp-block-site-logo img {
  filter: brightness(200);
} */

/* main */

.entry-content {
  padding-bottom: 5rem;
}

.wp-block-template-part {
  margin-block-start: 0;
}

main:has(.article-card) {
  padding-top: 2rem;
  background-color: #f2f2f2;
}

@media screen and (min-width: 920px) {

  main:has(.article-card) {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* footer */

footer a {
  text-decoration: none;
}

@media screen and (max-width: 600px) {
  footer {
    text-align: center;
  }
}

/* Relevanssi AJAX search */

div.rlv-has-spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #D37E2E;
  border-right-color: transparent !important;
}

div.rlv-has-spinner::after {
  background-color: #19892c !important;
}

.rlv-has-spinner::after {
  display: none;
}

div.relevanssi-live-search-result,
div.relevanssi-live-search-result-status {
  padding: 1rem;
  border-bottom: 1px solid #ccc;
}

div.relevanssi-live-search-result p,
div.relevanssi-live-search-result-status p {
  margin: 0;
  padding: 0;
  border: none;
}

div.relevanssi-live-search-result a {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  color: #333;
  text-decoration: none;
}

/* Posts from same term carousel block */

.sivu-post-carousel__post-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sivu-post-carousel__post-terms .sivu-post-term,
.sivu-post-carousel__post-terms .sivu-post-type-label {
  padding: 0.1rem 0.5rem;
  background-color: antiquewhite;
  border-radius: 0.4rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Poppins';
}

.sivu-post-carousel__post-terms .sivu-post-type-label {
  background-color: #8df8cb;
}