/*
HEADER
*/

/*Mobile Menu: to show sooner and line up with header*/
@media screen and (max-width: 991px) {
  /* hamburger button */
  .wp-block-navigation__responsive-container-open:not(.always-shown)  {
    display: block !important;
  }
  /* full menu */
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none !important;
  }
  .wp-block-navigation .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
    padding: .5em;
    margin-top: .5em;
    margin-bottom: .5em;
  }
  .wp-block-navigation .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
    background: var(--tertiary-nav-background)!important;
  }
}
.wp-block-navigation__responsive-container.is-menu-open {
  padding-top:var(--wp--preset--spacing--minus-2);
}
.wp-block-navigation__responsive-container-close {
  top: 1px;
}

/*
BLOG
*/

/*Blog grid: break sooner and add seperator*/
@media (min-width: 601px) and (max-width: 992px) {
  .query-three-columns .wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 601px) {
  .query-three-columns .wp-block-post,
  .query-two-columns .wp-block-post {
    border-right: 1px solid rgba(0,0,0,.1);
  }
}
@media (min-width: 601px) and (max-width: 992px) {
  .query-three-columns .wp-block-post:nth-child(2n+2), .query-three-columns .wp-block-post:last-child {
    border-right: 0;
  }
  .query-two-columns .wp-block-post:nth-child(2n+2), .query-two-columns .wp-block-post:last-child {
    border-right: 0;
  }
}
@media (min-width: 991px) {
  .query-three-columns .wp-block-post:nth-child(3n+3), .page-template-blog .wp-block-post:last-child {
    border-right: 0;
  }
  .query-two-columns .wp-block-post:nth-child(2n+2), .query-two-columns .wp-block-post:last-child {
    border-right: 0;
  }
}
/*Links: styling needed*/
.query-three-columns .wp-block-post-excerpt__more-text {
  margin-top: .5rem;
}
/*Blog article: to prevent a floating image*/
.single-post .wp-block-post-featured-image img {
  object-position: left;
}

/*
FOOTER
*/

/*Links: styling needed*/
footer.wp-block-template-part .wp-block-social-links a svg {
  transition-duration: .3s;
}
footer.wp-block-template-part .wp-block-social-links a:hover svg {
  color: var(--footer-social-hover)!important;
  fill: var(--footer-social-hover)!important;
}

/*
MAIN
*/

*, :after, :before {
  box-sizing: border-box;
}
/*Remove pesky space before template parts*/
.wp-block-template-part {
  margin-top: 0;
}
/*Buttons: discrepancies in theme.json capabilities*/
.is-style-outline.wp-element-button:hover, .is-style-outline .wp-block-button__link:hover {
  color: var(--button-ouline-color)!important;
  background-color: var(--button-ouline-background-color)!important;
  border-color: var(--button-ouline-border-color)!important;
}
/*Links: A smoother hover, fixing colors, and only want links underlined in main body text*/
a:hover, input[type=submit]:hover {
  transition: color .3s;
}
.page-template-blog .wp-block-post h2 a, .page-template-blog .wp-block-post-excerpt__more-text a, .page-template-blog .wp-block-query-pagination a,
#sidebar-blog a,
header.wp-block-template-part a, footer.wp-block-template-part a {
  text-decoration: none;
}
/*Seperator: make thinner*/
.wp-block-separator {
  border-top-width: 1px;
}
/*Sudo headings*/
.h1 { font-size: var(--wp--custom--heading--1)!important; }
.h2 { font-size: var(--wp--custom--heading--2)!important; }
.h3 { font-size: var(--wp--custom--heading--3)!important; }
.h4 { font-size: var(--wp--custom--heading--4)!important; }
.h5 { font-size: var(--wp--custom--heading--5)!important; }
.h6 { font-size: var(--wp--custom--heading--6)!important; }

/*Show/Hide*/
@media (min-width: 992px) {
  .desktop-hide { display: none!important; }
}
@media (max-width: 991px) {
  .mobile-hide { display: none!important; }
}
/*Reversed text*/
.text-reversed,
.text-reversed em,
.text-reversed a:not(.btn):not(.wp-block-button__link),
.text-reversed h1,
.text-reversed h1 a,
.text-reversed .h1,
.text-reversed .h1 a,
.text-reversed h2,
.text-reversed h2 a,
.text-reversed .h2,
.text-reversed .h2 a,
.text-reversed h3,
.text-reversed h3 a,
.text-reversed .h3,
.text-reversed .h3 a,
.text-reversed h4,
.text-reversed h4 a,
.text-reversed .h4,
.text-reversed .h4 a,
.text-reversed h5,
.text-reversed h5 a,
.text-reversed .h5,
.text-reversed .h5 a,
.text-reversed h6,
.text-reversed h6 a,
.text-reversed .h6,
.text-reversed .h6 a {
  color: var(--wp--preset--color--base);
}
.text-reversed hr {
  border-color: var(--wp--preset--color--base);
}
/*Break columns earlier*/
@media (max-width: 991px) {
  .wp-block-column,
  .wp-block-column:not(:only-child) {
    flex-basis: 100% !important;
  }
  .wp-block-columns {
    display: flex!important;
    flex-wrap: wrap!important;
  }
  .wp-block-column:empty {
    display: none;
  }
}
@media (min-width: 600px) and (max-width: 781px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile)
    > .wp-block-column:not(:only-child) {
    flex-basis: 100% !important;
  }
}

/*Scrolling*/
#site-header {
  height: var(--header-mobile-offset);
}
:target {
  scroll-margin-top: var(--header-mobile-offset);
}
@media (min-width: 992px) {
  #site-header {
    height: var(--header-desktop-offset);
  }
  :target {
    scroll-margin-top: var(--header-desktop-offset);
  }
}

/* Global smooth scrolling */
html {
  scroll-behavior: smooth;
}

/*
FORMS
*/

input.form-control, textarea.form-control, select.form-control  {
  display: block;
  max-width: 100%;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--wp--preset--color--contrast);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--wp--preset--color--base);
  background-clip: padding-box;
  border: var(--form-border-width) solid var(--form-border-color);
  border-radius: var(--form-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  input.form-control, textarea.form-control, select.form-control {
    transition: none;
  }
}
.form-control[type=file] {
  overflow: hidden;
}
.form-control[type=file]:not(:disabled):not([readonly]) {
  cursor: pointer;
}
.form-control:focus {
  color: var(--wp--preset--color--contrast);
  background-color: var(--wp--preset--color--base);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.075);
}
.form-control::-webkit-date-and-time-value {
  min-width: 85px;
  height: 1.5em;
  margin: 0;
}
.form-control::-webkit-datetime-edit {
  display: block;
  padding: 0;
}
.form-control::placeholder {
  color: var(--form-placeholder-color);
  opacity: 1;
}
.form-control:disabled {
  background-color: var(--form-disabled-bg);
  opacity: 1;
}
.form-control::-webkit-file-upload-button {
  padding: 0.375rem 0.75rem;
  margin: -0.375rem -0.75rem;
  -webkit-margin-end: 0.75rem;
  margin-inline-end: 0.75rem;
  color: var(--wp--preset--color--contrast);
  background-color: var(--form-file-bg);
  pointer-events: none;
  border-color: inherit;
  border-style: solid;
  border-width: 0;
  border-inline-end-width: var(--form-border-width);
  border-radius: 0;
  -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control::file-selector-button {
  padding: 0.375rem 0.75rem;
  margin: -0.375rem -0.75rem;
  -webkit-margin-end: 0.75rem;
  margin-inline-end: 0.75rem;
  color: var(--wp--preset--color--contrast);
  background-color: var(--form-file-bg);
  pointer-events: none;
  border-color: inherit;
  border-style: solid;
  border-width: 0;
  border-inline-end-width: var(--form-border-width);
  border-radius: 0;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .form-control::-webkit-file-upload-button {
    -webkit-transition: none;
    transition: none;
  }
  .form-control::file-selector-button {
    transition: none;
  }
}
.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
  background-color: var(--form-disabled-bg);
}
.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
  background-color: var(--form-disabled-bg);
}
textarea.form-control {
  height: calc(1.5em + 0.75rem + calc(var(--form-border-width) * 2) + 3em);/*last number for three lines*/
}
select.form-control {
  --form-select-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--wp--preset--color--contrast);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--wp--preset--color--base);
  background-image: var(--form-select-bg-image);
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: var(--form-border-width) solid var(--form-border-color);
  border-radius: var(--form-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  select.form-control {
    transition: none;
  }
}
select.form-control:focus {
  outline: 0;
}
select.form-control[multiple], select.form-control[size]:not([size="1"]) {
  padding-right: 0.75rem;
  background-image: none;
}
select.form-control:disabled {
  background-color: var(--form-disabled-bg);
}
select.form-control:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 var(--wp--preset--color--contrast);
}
.form-control .wpcf7-list-item.first {
  margin-left: 0;
}
.form-control [type=checkbox],
.form-control [type=radio] {
  --form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  flex-shrink: 0;
  width: 1.4em;
  height: 1.4em;
  margin-top: 0.375em;
  vertical-align: top;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--wp--preset--color--base);
  background-image: var(--form-check-bg-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: var(--form-border-width) solid var(--form-border-color);
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
  print-color-adjust: exact;
}
.form-control [type=checkbox] {
  border-radius: 0.25em;
}
.form-control [type=radio] {
  border-radius: 50%;
}
.form-control [type=checkbox]:active,
.form-control [type=radio]:active {
  filter: brightness(90%);
}
.form-control [type=checkbox]:focus,
.form-control [type=radio]:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.form-control [type=checkbox]:checked,
.form-control [type=radio]:checked {
  background-color: var(--form-check-bg);
  border-color: var(--form-check-bg);
}
.form-control [type=checkbox]:checked {
  --form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-control [type=radio]:checked {
  --form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}
.form-control [type=checkbox]:disabled,
.form-control [type=radio]:disabled {
  pointer-events: none;
  filter: none;
  opacity: 0.5;
}
