/*
Theme Name: SFBH
Theme URI: 
Author: GI Merijn
Author URI: 
Description: 
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sfbh
Tags: 
*/

:root {
  --shadow-size: 11px;
}

* {
  box-sizing: border-box;
}

p strong {
  font-weight: 600;
}

.wp-block-site-logo {
  min-width: 79px;
  max-width: 79px;
}

.wp-site-blocks > header + .wp-block-group,
.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* Mega menu */
div > .mega-menu > li > .mega-sub-menu {
  /* box-shadow: var(--wp--preset--shadow--shadow-1) !important; */
}

.mega-menu-row > ul > li > ul > li {
  padding: 1rem !important;
}

.mega-menu-row + .mega-menu-row > *,
.mega-menu-item-type-widget.widget_text > * {
  max-width: 30rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: unset !important;
}

.mega-menu-item-type-widget.widget_text {
  background-color: var(--wp--preset--color--custom-primary) !important;
  color: #fff !important;
  font-size: 1.125rem !important;
  padding-block: 2rem !important;
}

.mega-current-page-parent > a,
.mega-current-menu-item > a,
.current-menu-item > a,
.current-menu-ancestor > a {
  /* font-weight: 600 !important; */
}

.mega-indicator {
  color: #f5aa0d !important;
  transform: translateY(3px) !important;
}

#mega-menu-max_mega_menu_1 > li:last-child {
  margin-inline-end: 0 !important;
}

.wp-block-group:has(.max-mega-menu) {
  transition: border-bottom-color 0.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0s;
}

header .wp-block-group:has(.mega-toggle-on) {
  border-bottom-color: #002533 !important;
}

.mobile-navigation {
  align-self: center;
  gap: 0 !important;
  padding-inline-start: 0;

  .current-menu-item > a {
    color: white !important;
  }

  /* lvl 1 */
  & > li {
    font-size: 1.4rem;
    width: 100%;
    border-block-end: 1px solid #fff;
    padding-block: 0.5rem !important;

    & > a {
      margin-block: 0.5rem;
      font-weight: 600 !important;
    }

    /* lvl 2 */
    & > ul {
      padding-block: 0.5rem !important;
      padding-inline-start: 0 !important;

      & > li {
        font-size: 1.1rem;
        line-height: 2em !important;

        /* lvl 3 */
        & > ul {
          padding-block: 0.5rem !important;

          & > li {
            font-size: 1rem;
            line-height: 2em !important;
            margin-block: 0.3em !important;

            & > a {
              line-height: 1.3em !important;
              position: relative;

              &::before {
                content: '-';
                position: absolute;
                left: calc(var(--wp--style--block-gap) * -0.8);
              }
            }
          }
        }
      }
    }
  }
}

.is-menu-open .mobile-navigation {
  align-self: flex-start;
}

.hide-mobile {
  @media all and (max-width: 979px) {
    display: none !important;
    visibility: none !important;
  }
}

.hide-desktop {
  @media all and (min-width: 980px) {
    display: none !important;
    visibility: none !important;
  }
}

body .wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}
body
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(
    .is-menu-open
  ) {
  display: none !important;
}

@media (min-width: 980px) {
  body .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }
  body
    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(
      .is-menu-open
    ) {
    display: block !important;
  }
}

.header-heading-wrapper {
  --header-element-bottom-offset: 180px;

  .wp-block-cover:has(&) {
    overflow: visible;
  }

  display: grid;
  grid-template-columns: min-content 64px 1fr 70px;
  grid-template-rows: min-content min-content 70px 30px var(
      --header-element-bottom-offset
    );
  transform: translateY(var(--header-element-bottom-offset));

  & h1,
  & h2 {
    display: inline-block;
  }

  & h1 {
    grid-column: 1 / 2;
  }
  & h2 {
    grid-column: 1 / 3;
    grid-row: 2 / 5;
  }

  & h2::after {
    content: '';
    background-color: var(--wp--preset--color--custom-accent);
    width: 0.25em;
    height: 0.25em;
    display: inline-block;
    margin-inline-start: 0.2ch;
  }

  & .white-mask-1,
  & .white-mask-2,
  & .white-mask-3 {
    position: relative;
    background-color: white;
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;

    /* box-shadow: 15px 15px 0 0 #000; */
  }

  & .white-mask-1,
  & .white-mask-2 {
    @media (min-width: 980px) {
      &::before {
        content: '';
        width: var(--shadow-size);
        height: calc(100% - var(--shadow-size));
        position: absolute;
        left: 100%;
        top: var(--shadow-size);
        background-color: var(--wp--preset--color--custom-primary);
      }
    }
  }

  & .white-mask-1 {
    grid-column: 2 / 4;
    grid-row: 3 / 4;
  }

  & .white-mask-2 {
    grid-column: 2 / 5;
    grid-row: 4 / 6;
  }

  & .white-mask-3 {
    grid-column: 2 / 2;
    grid-row: 3 / 6;

    &::before {
      content: '';
      position: absolute;
      display: block;
      height: 100%;
      width: 9999em;
      top: 0;
      right: 0;
      background-color: white;
      z-index: -1;
    }
  }

  @media (max-width: 979px) {
    --header-element-bottom-offset: 2rem;

    .wp-block-group:has(> &) {
      padding-inline: 0 !important;
    }

    grid-template-columns: min-content 1fr 0 0;
    grid-template-rows: min-content min-content 30px 30px var(
        --header-element-bottom-offset
      );

    & h1 {
      font-size: 1.2rem !important;
    }
    & h2 {
      font-size: 2.2rem !important;
    }

    & .white-mask-3::before {
      transform: translateX(1rem);
    }
  }
}

@media (max-width: 979px) {
  .intro-content-wrapper {
    padding-inline: calc(var(--wp--preset--spacing--50) + 1rem) 1rem !important;

    & > .wp-block-group {
      margin-block-start: 0 !important;
      border-inline-end: 6px solid var(--wp--preset--color--custom-primary);
      padding-inline-end: 2rem;
    }
  }

  .news-square-outline {
    padding: 1.5rem 1.5rem 1.5rem 0.75rem !important;
    margin-inline-start: 0.75rem !important;

    &::before {
      bottom: 0 !important;
      width: var(--shadow-size) !important;
    }
  }
}

.content-grid {
  padding-right: 0;
  gap: 0;

  & > *:first-child {
    grid-column: span 12;
    order: 2;
  }
  & > *:last-child {
    grid-column: span 12;
    order: 1;
  }

  & main {
    padding: 2rem 1rem 2rem 1rem !important;
  }

  @media all and (min-width: 980px) {
    gap: var(--wp--preset--spacing--70);
    /* padding-right: var(--wp--preset--spacing--60); */

    & > *:first-child {
      grid-column: span 4;
      order: 1;
    }
    & > *:last-child {
      grid-column: span 8;
      order: 2;
    }

    /* & > * {
      padding-block-start: 2.5rem;
    } */

    & main {
      padding: 2.5rem 5.25rem 5.25rem 2.5rem !important;
    }
  }

  @media all and (min-width: 1280px) {
    & > *:first-child {
      grid-column: span 3;
    }
    & > *:last-child {
      grid-column: span 9;
    }
  }
}

.wp-site-blocks > div.wp-block-group:has(.content-grid) {
  @media all and (max-width: 979px) {
    padding-inline: 0 !important;
  }
}

.mobile-flat-grid {
  @media all and (max-width: 979px) {
    column-gap: 0 !important;
    & > * {
      grid-column: span 12 !important;
    }
  }
}

.news-square-outline {
  position: relative;
  background-color: white;

  &::before {
    content: '';
    position: absolute;
    left: calc(var(--shadow-size) * -1);
    bottom: calc(var(--shadow-size) * -1);
    height: 100%;
    width: 75%;
    background-color: var(--wp--preset--color--custom-background-light);
    z-index: -1;
  }

  & ul li {
    position: relative;
    padding-inline-start: 1.5em;

    &::before {
      content: '';
      position: absolute;
      left: 0;
      top: 7px;
      background-color: var(--wp--preset--color--custom-accent);
      width: 12px;
      height: 12px;
      display: inline-block;
      margin-inline-end: 0.2ch;
    }
  }

  & .wp-block-post-date a {
    text-decoration: none;
    font-weight: 600;
  }
}
