/**
 * 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: 99;
  width: 100%;
  background-color: rgba(245, 245, 245, 0);
  transition: background-color 300ms linear;
}

/* header.wp-block-template-part.scroll .desctop-header-block,
header.wp-block-template-part.scroll .mobile-header-block {
  background-color: var(--wp--preset--color--custom-nasa);
  transition: background-color 300ms linear;
} */

.desktop-header {
  display: none;
}

@media screen and (max-width: 781px) {
  .home-page-banner h1 {
    font-size: 2.8rem !important;
  }

  .home-page-banner .heading-top-text {
    font-size: 0.9rem !important;
  }

  h2 {
    font-size: 1.7rem !important;
  }

  h2.has-large-font-size {
    font-size: 1.7rem !important;
  }

  .wp-block-spacer {
    max-height: 1rem;
  }

  .hide-on-mobile {
    display: none;
  }

  .is-layout-flex.mobile-flex-column-reverse {
    flex-direction: column-reverse;
  }

}

.wp-block-column.is-vertically-aligned-bottom,
.wp-block-column.is-vertically-aligned-center,
.wp-block-column.is-vertically-aligned-top {
  width: auto;
}


@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;
  }
}

header .desktop-header .wp-block-navigation-item {
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

header .desktop-header .wp-block-navigation-item:hover,
header .desktop-header .wp-block-navigation-item:focus,
header .desktop-header .wp-block-navigation-item:active,
header .desktop-header .wp-block-navigation-item.current-menu-item {
  text-shadow:
    0.015em 0 0 currentColor,
    -0.015em 0 0 currentColor,
    0 0.015em 0 currentColor,
    0 -0.015em 0 currentColor;
  border-bottom-color: var(--wp--preset--color--custom-vaaka-oranssi);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  transition: filter 180ms ease, background-color 180ms ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--custom-vaaka-oranssi);
  filter: brightness(110%);
}

.link-with-icon a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile Menu */

.mobile-menu-canvas .wp-block-navigation__container,
.mobile-menu-canvas .wp-block-navigation-item,
.mobile-menu-canvas .wp-block-navigation-item__content {
  width: 100%;
}

.mobile-menu-canvas .wp-block-navigation-item__content {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-canvas .wp-block-navigation .wp-block-navigation-item__label {
  display: flex;
  justify-content: space-between;
}

.mobile-menu-canvas .wp-block-navigation .wp-block-navigation-item__label::after {
  content: '→';
  font-size: 1.1rem;
}


/* Home page banner and sub page banners */

.home-page-banner>.wp-block-column:first-child,
.sub-page-banner>.wp-block-column:first-child {
  margin-left: var(--wp--style--root--padding-left);
  margin-right: var(--wp--style--root--padding-left);
}

.home-page-banner>.wp-block-column:nth-child(2) figure,
.sub-page-banner>.wp-block-column:nth-child(2) figure {
  min-height: 100%;
  overflow: hidden;
}

.home-page-banner>.wp-block-column:nth-child(2) figure img,
.sub-page-banner>.wp-block-column:nth-child(2) figure img {
  object-fit: cover;
}

@media screen and (max-width: 781px) {

  .sub-page-header-banner {
    min-height: 250px !important;
  }

  .home-page-banner .wp-block-button,
  .sub-page-header-banner .wp-block-button {
    width: 100%;
  }

  .sub-page-header-banner h1 {
    font-size: 2.5rem;
  }
}

@media screen and (min-width: 782px) {

  .home-page-banner>.wp-block-column:nth-child(2) figure img,
  .sub-page-banner>.wp-block-column:nth-child(2) figure img {
    min-height: 720px;
  }
}

@media screen and (min-width: 1330px) {

  .home-page-banner {
    max-height: 720px;
  }

  .home-page-banner>.wp-block-column,
  .sub-page-banner>.wp-block-column {
    /* flex-basis: initial !important; */
  }

  .home-page-banner>.wp-block-column:first-child,
  .sub-page-banner>.wp-block-column:first-child {
    margin-left: calc((100% - var(--wp--style--global--wide-size))/2);
  }

  .home-page-banner>.wp-block-column:first-child {
    max-width: 450px;
  }

  .home-page-banner>.wp-block-column:nth-child(2) figure,
  .sub-page-banner>.wp-block-column:nth-child(2) figure {
    max-height: 100%;
  }
}

/* - */

.border-right {
  border-right: 3px solid white;
}

.overflow-hidden {
  overflow: hidden;
}

.img-max-height-110 img {
  max-height: 110px;
  width: auto;
}

.img-max-height-80 img {
  max-height: 80px;
  width: auto;
}


/* 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%;
  height: 100dvh;
  right: 0;
  overflow-y: scroll;
  background-color: var(--wp--preset--color--custom-vaaka-tumma-sininen) !important;
}

.mobile-search-canvas .wp-block-column {
  overflow-wrap: normal;
  word-break: normal;
}

/* Components */

.flex-service-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.flex-service-card .link-with-icon {
  margin-top: auto;
}




/* footer */

footer {
  margin-top: 0;
}

footer a {
  text-decoration: none;
}


/* 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;
}

/* Yoast breadcrumbs  */

.yoast-breadcrumbs {
  font-family: var(--wp--preset--font-family--ibm-plex-mono) !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22px;
}

/* WP Forms */

.wpforms-field-container label.wpforms-field-label {
  margin-bottom: 0.5rem !important;
  font-family: var(--wp--preset--font-family--ibm-plex-mono);
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
}

.wpforms-submit-container button.wpforms-submit {
  background-color: var(--wp--preset--color--custom-vaaka-oranssi);
  padding: 0.75rem 1.5rem !important;
  font-family: var(--wp--preset--font-family--albert-sans) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 4px !important;
  font-size: 13px !important;
  font-style: normal !important;
}

.wpforms-submit-container button.wpforms-submit:hover {
  background: transparent !important;
  background-color: var(--wp--preset--color--custom-vaaka-oranssi) !important;
  filter: brightness(110%) !important;
}

/* TranslatePress */

.sivu-language-switcher {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  color: var(--wp--preset--color--custom-vaaka-vaalea-harmaa);
  font-family: var(--wp--preset--font-family--ibm-plex-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 6%;
}

.sivu-language-switcher a {
  text-decoration: none;
  color: var(--wp--preset--color--custom-vaaka-vaalea-harmaa);
}