/**
 * Styles for the blocks on the editor and the frontend.
 */

html {
  scroll-padding-top: 8rem;
  scroll-behavior: smooth;
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: 8rem;
  }
}

/* Header block template styles */

header .wp-block-site-logo img {
  height: auto;
  max-width: 100%;
  /* filter: brightness(200); */
}

header.wp-block-template-part {
  position: fixed;
  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: 768px) {

  .home-page-banner {
    min-height: 600px !important;
  }

  .home-page-banner,
  .home-page-banner>div,
  .home-page-banner .wp-block-group {
    padding-bottom: 0 !important;
  }

  h1,
  .home-page-banner h1 {
    font-size: 3rem !important;
  }

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

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

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

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

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

  .microcopy {
    font-size: 0.8rem;
  }
}


@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 {
  padding: 0.2rem 0.5rem;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

header .desktop-header .wp-block-navigation-item:has(a:hover) {
  border-bottom: 2px solid var(--wp--preset--color--custom-cool-steel-blue);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  transition: background-color 0.2s ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: #3f6884;
}

a.wp-block-button__link.wp-element-button:has(img) {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem;
}

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

/* Smaller separation margins for mobile */

@media screen and (max-width: 600px) {
  .wp-block-group {
    --wp--preset--spacing--80: 2rem;
  }
}

/* hr */

.wp-block-separator {
  width: 66px;
  border-top: 3px solid;
}

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

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

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