/*
    Theme Name: Makler Friesen
    Theme URI: 
    Author: 
    Author URI: 
    Description: Eigenes WordPress Theme für Makler Friesen
    Version: 1.0.0
    Requires at least: 6.0
    Tested up to: 6.7
    Requires PHP: 8.2
    Text Domain: makler-friesen
    Domain Path: /languages
*/

/* Roboto Font */
@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/roboto/Roboto-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/roboto/Roboto-Italic-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Button";
  src: url("assets/fonts/roboto/Roboto-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;

  ascent-override: 90%;
  descent-override: 20%;
  line-gap-override: 0%;
}

/* CSS Variables */
:root {
  --maincolor: #31b7bc;
}

html {
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 8px;
}

body {
  font-family:
    "Roboto",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 17px;
  display: block;
  margin: 0;
}

.container {
  width: 1170px;
  padding: 0 20px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

img {
  max-width: 100%;
}

a {
  display: inline-block;
}

span {
  display: inline-block;
}

section {
  display: inline-block;
  width: 100%;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6,
a {
  transition: color 0.3s ease;
}

h1,
h2.slide-title {
  font-size: 52px;
  line-height: normal;
  margin-bottom: 35px;
  text-transform: uppercase;
  font-weight: 700;
}

h2 {
  font-size: 38px;
  line-height: normal;
  margin-bottom: 35px;
  text-transform: uppercase;
  font-weight: 700;
}

h3 {
  font-size: 21px;
  line-height: normal;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h2.wp-block-heading {
  font-size: 26px;
  margin-bottom: 20px;
  text-transform: none;
}

h3.wp-block-heading {
  font-size: 18px;
  text-transform: none;
  margin-bottom: 20px;
}

p {
  margin-bottom: 20px;
}

p:last-child {
  margin-bottom: 0;
}

iframe {
  width: 100%;
}

form {
  input {
    accent-color: var(--maincolor);
  }
  font-size: 15px;
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    width: 100%;
    /* max-width: 350px; */
    padding: 9px;
  }
  textarea {
    height: 130px;
  }
  p {
    margin-bottom: 28px;
  }
}

/* spacing */
section.block-layout-container {
  > section.block-layout-container:not(
      :has(+ section.block-layout-container)
    ):not(section.block-layout-container + section.block-layout-container) {
    padding-top: 70px;

    > .container:last-child {
      padding-bottom: 70px;
    }
  }
}

main {
  section + .container,
  section + *:not(section) {
    padding-top: 70px;
  }
  > .container:last-child {
    padding-bottom: 70px;
  }
}

/* wp specific */
.wp-block-image figure,
.wp-block-image img {
  width: 100%;
  margin: 0;
}

.wp-block-buttons {
  gap: 20px;

  .wp-element-button,
  .wp-block-button__link {
    font-size: 18px;
    padding: 20px;
  }

  &.is-content-justification-space-between .wp-block-button {
    flex: 1 1 0;
  }

  button.wp-block-button__link.wp-element-button {
    border-radius: 5px;
    border-color: #ff7276;
    background-color: #ff7276;
    font-weight: bold;

    &:hover {
      color: #fff;
      background-color: #ff7276;
    }
  }
}

form.wpcf7-form {
  span,
  label {
    width: 100%;
  }
  .wpcf7-spinner {
    display: none;
  }
  .wpcf7-list-item {
    margin: 0;
  }
  .wpcf7-acceptance {
    margin: 12px 0;
    label {
      display: flex;
      gap: 5px;
      align-items: center;
    }
  }
  input[type="submit"] {
    text-transform: uppercase;
  }
}

/* helpers */

.box-title,
.textcontent {
  word-break: break-word;
}

button,
input[type="submit"],
.button-link {
  font-family: "Roboto Button";
  font-size: 16px;
  background-color: var(--maincolor);
  border: 2px solid var(--maincolor);
  color: #fff;
  background-color: #31b7bc;
  padding: 13px 25px;
  border-radius: 29px;
  text-decoration: none;
  line-height: 1;
  text-align: center;
  font-weight: 700;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;

  &:hover {
    background-color: #fff;
    color: var(--maincolor);
  }

  &.wpcf7-submit,
  &.square {
    border-radius: 5px;
    padding: 10px 25px;
    font-size: 15px;
  }

  svg {
    margin-right: 5px;
  }
}

button.scroll-to-top {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #fff;
  outline: 1px solid black;
  font-size: 12px;
  text-align: center;
  padding: 0;
  z-index: 2;

  svg {
    margin-right: 0;
    height: 20px;
    margin-bottom: -5px;
    margin-top: -5px;
  }

  &:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
    outline-color: #fff;
  }

  &:focus {
    outline: 1px solid black;
  }

  &:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
  }
}

.breadcrumbs {
  a {
    color: #fff;
    &:hover {
      color: var(--maincolor);
    }
  }
}

section.block-layout-container > .container,
main > .container,
.textcontent {
  a:not(.button-link) {
    color: var(--maincolor);
  }
}

[class$="-overlay"] {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 0;
  left: 0;
}

.slick-slider {
  .slick-prev,
  .slick-next {
    z-index: 10;
    width: 48px;
    height: 48px;

    &::before,
    &::after {
      display: none;
    }
  }

  .slick-dots li button {
    width: 10px;
    height: 10px;
  }
  .slick-dots li button:before {
    width: 10px;
    height: 10px;
    font-size: 10px;
    color: #fff;
  }

  .slick-dots li.slick-active button:before {
    color: #fff;
    opacity: 1;
  }

  ul.slick-dots {
    bottom: 10px;
  }

  .slick-dots li {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }

  &.slick-dotted {
    margin-bottom: 0;
  }

  .slick-prev {
    left: 10px;
    transform: rotate(180deg);
  }

  .slick-next {
    right: 10px;
  }
}

/* header */

header {
  background-color: rgb(0, 0, 0, 0.6);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  z-index: 999;

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
  }

  li {
    display: inline-block;
    position: relative;
  }

  .header-content {
    height: fit-content;
    min-height: 125px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    gap: 30px;

    .menu-group {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 30px;
    }

    .logo-group {
      align-self: end;
      padding-bottom: 10px;
    }
    img.logo {
      height: 70px;
    }

    nav.main-navigation {
      padding: 0;
      position: relative;
      display: inline-block;
      text-transform: uppercase;

      > ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 30px;
      }

      li.current-menu-item > a,
      li > a:hover {
        color: var(--maincolor);
      }

      a {
        color: #fff;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        transition: color 0.3s ease;
      }

      .sub-menu {
        position: absolute;
        top: calc(100% + 15px);
        left: 0;

        display: flex;
        flex-direction: column;
        gap: 10px;

        background-color: rgba(0, 0, 0, 0.6);
        padding: 20px 12px;
        min-width: 200px;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-10px);
        transition:
          opacity 0.3s ease,
          transform 0.3s ease,
          visibility 0s linear 0.3s;
      }

      .sub-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -15px;
        height: 15px;
      }

      li:hover .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);

        transition-delay: 0s;
      }
    }
  }

  .mobile-menu {
    .top-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: space-between;
      -webkit-justify-content: space-between;
      align-items: center;
      padding: 20px 35px;

      .icon-wrap {
        position: relative;

        svg {
          height: 20px;
        }
        &::before {
          content: "";
          height: calc(100% + 20px);
          width: 1px;
          background-color: #fff;
          display: block;
          position: absolute;
          left: -10px;
          top: -10px;
        }
      }
    }

    .bottom-row {
      display: none;
      width: calc(100% - 40px);
      margin-left: 20px;
      padding: 10px 15px;
      max-height: calc(100vh - 65px);
      overflow: auto;
    }
    ul {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }
    ul.sub-menu {
      margin-top: 15px;
      gap: 10px;
      padding-left: 20px;

      a:before {
        content: "\00BB \00a0";
        top: 0;
        left: 0;
        background: 0 0;
        font-size: 1.4em;
      }
    }
    a {
      color: #fff;
      text-transform: uppercase;
      text-decoration: none;
    }
    li.current-menu-item > a {
      color: var(--maincolor);
    }
  }
}

footer {
  color: #979797;
  font-size: 15px;

  .row {
    row-gap: 80px;
  }

  .footer-top {
    padding-top: 70px;
    padding-bottom: 55px;
    background-color: #161616;

    .contact-info {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .contact-info > div {
      display: flex;
      gap: 20px;
    }

    img.icon {
      height: 18px;
      width: auto;
      margin-top: 2px;
    }

    p {
      margin-bottom: 20px;
    }

    h3 {
      color: #fff;
      margin-bottom: 35px;
      font-size: 28px;
      font-weight: 400;
      text-transform: unset;
    }

    nav a {
      display: flex;
      align-items: center;
      width: fit-content;

      &::before {
        content: "";
        background-image: url("assets/frontend/icons/angle-right-grey.svg");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        width: 16px;
        height: 16px;
        margin-right: 16px;
        display: inline-block;
      }
      &:hover::before {
        background-image: url("assets/frontend/icons/angle-right-primary.svg");
      }
    }

    a {
      color: inherit;
      text-decoration: none;
      transition: color 0.3s ease;

      &:hover {
        color: var(--maincolor);
      }
    }

    ul {
      padding: 0;
      list-style: none;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .memberships {
      display: flex;
      flex-direction: column;
      gap: 10px;
      img {
        width: 100%;
        height: auto;
      }
    }
  }
  .footer-bottom {
    padding: 30px 0;
    background-color: #101010;
  }
}

/* template parts */

section.block-slider {
  .slider-container,
  .slick-list,
  .slick-track {
    height: 100%;
  }

  .slide-item {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
  }

  .slide-content {
    width: 100%;
    text-align: center;
    height: 100%;
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 60px;

    h1,
    h2.slide-title {
      margin-bottom: 30px;
      color: #fff;
    }
  }

  .slide-image {
    position: absolute;
    inset: 0;

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
}

section.block-three-boxes {
  padding: 70px 0 120px 0;

  .box-item {
    text-decoration: none;
    color: inherit;
    text-align: center;
    position: relative;
    padding: 50px 15px;

    .box-image {
      margin-bottom: 20px;
    }

    &::before {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      border: 2px dashed var(--maincolor);
      content: "";
      opacity: 0;
      -webkit-transition:
        opacity 0.35s,
        -webkit-transform 0.35s;
      transition:
        opacity 0.35s,
        transform 0.35s;
      -webkit-transform: scale(0);
      transform: scale(0);
      height: 100%;
      width: 100%;
    }
    &:hover::before {
      opacity: 1;
      -webkit-transform: scale(1);
      transform: scale(1);
    }
    &:hover .box-title {
      color: var(--maincolor);
    }
  }
}

section.block-testimonials,
section.block-parallax-image {
  position: relative;

  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;

  display: flex;
  align-items: center;
  overflow: hidden;

  .parallax-background {
    display: none;
  }

  .parallax-content {
    position: relative;
    z-index: 2;
    width: 100%;
    color: #fff;
  }

  &.block-parallax-image {
    .parallax-content {
      padding: 70px 0;
    }
  }
}

section.block-four-icon-boxes {
  padding-top: 70px;
  padding-bottom: 110px;
  .box-item {
    width: 100%;
    text-decoration: none;
    color: inherit;

    .box-icon img {
      height: 75px;
      width: auto;
      margin-bottom: 15px;
    }
    .box-title {
      font-weight: 400;
      transition: color 0.3s ease;
    }

    &:hover .box-title {
      color: var(--maincolor);
    }
  }
}

section.block-testimonials {
  padding: 70px 0 45px 0;

  .block-title {
    text-align: center;
    margin-bottom: 0;
  }

  .reviews-slider {
    margin-left: -25px;
    margin-right: -25px;

    .slick-slide {
      padding-left: 25px;
      padding-right: 25px;
      margin-top: 60px;
      margin-bottom: 85px;
    }
  }

  .author-info {
    margin-top: 35px;
    display: flex;
    align-items: start;
    gap: 25px;
    text-transform: uppercase;
    letter-spacing: 3px;
  }

  .review-text {
    color: #d1d1d1;
  }

  .review-image {
    width: 70px;
    height: 70px;
    border: 3px solid var(--maincolor);

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .review-author {
    padding-top: 10px;
  }
}

section.block-process-steps {
  padding: 70px 0;
  background-color: #f5f5f5;

  h2 {
    text-align: center;
  }
  .process-step-item {
    position: relative;

    &:nth-child(odd)::after {
      content: "";
      position: absolute;
      top: 50px;
      right: -25%;
      width: 25%;
      height: 1px;
      background: #d2d2d2;
    }

    &:nth-child(even)::after {
      content: "";
      position: absolute;
      top: 50px;
      left: -25%;
      width: 25%;
      height: 1px;
      background: #d2d2d2;
    }
    &:nth-child(odd)::before {
      content: "";
      position: absolute;
      top: 50px;
      right: -25%;
      width: 1px;
      height: calc(100% + 20px);
      background: #d2d2d2;
    }

    &:nth-last-child(1)::before,
    &:nth-last-child(2)::before {
      display: none;
    }
    .process-step-icon {
      width: 100px;
      height: 100px;
      border: 1px solid #d2d2d2;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1;
      transition: all 0.5s ease;

      svg,
      img {
        height: 42px;
        width: auto;
      }
    }
    a {
      text-decoration: none;
      color: inherit;

      display: flex;
      flex-direction: column;
      justify-content: start;
      gap: 20px;

      &:hover {
        .process-step-icon {
          -webkit-transform: scale(1.2);
          -moz-transform: scale(1.2);
          -ms-transform: scale(1.2);
          -o-transform: scale(1.2);
          transform: scale(1.2);
          background-color: var(--maincolor);
          color: #fff;
        }

        h2,
        h3 {
          color: var(--maincolor);
        }
        svg path {
          fill: #fff;
        }
      }
    }
    &:nth-of-type(odd) a {
      text-align: right;
      align-items: end;
    }
  }
  .process-steps-items {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    column-gap: 20%;
  }
}

section.block-header-banner {
  padding-top: 265px;
  padding-bottom: 75px;
  color: #fff;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  .row {
    align-items: end;
  }

  .textcontent {
    width: 643px;
    max-width: 100%;
  }

  h1 {
    font-size: 40px;
  }

  h1,
  .breadcrumbs {
    margin-bottom: 0;
    padding-bottom: 10px;
    font-weight: 400;
    border-bottom: 3px solid var(--maincolor);
  }

  .breadcrumbs {
    border-width: 1px;
  }
}

section.block-layout-container {
  padding: 70px 0;

  .container .container {
    max-width: 100%;
    padding: 0;
  }
}
section.block-layout-container + section.block-layout-container {
  padding-top: 0;
}

section.block-buttons {
  .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;

    &.justify-content-stretch a {
      flex: 1 1 0;
    }
  }
}

.container + section.block-buttons,
section.block-buttons + *:not(section) {
  padding-top: 20px;
}

section.block-icon-text-grid {
  .row {
    --bs-gutter-x: 85px;
    --bs-gutter-y: 50px;
  }
  .icon {
    margin-bottom: 20px;

    svg {
      width: auto;
      height: 50px;

      path {
        fill: #7a7a7a;
      }
    }
  }
  a.grid-item.grid-item--link {
    color: inherit;
    text-decoration: none;
    width: 100%;

    &:hover {
      svg path {
        fill: var(--maincolor);
      }
    }
  }
}

section.block-contacts {
  .row {
    row-gap: 40px;
  }
  .contact {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  img.contact__image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    object-position: top;
  }
}

section.block-google-reviews {
    padding: 70px 0;
}

@media (max-width: 992px) {
  h1,
  h2.slide-title {
    font-size: 38px;
  }

  h2 {
    font-size: 30px;
  }

  header {
    background-color: transparent;

    .top-row {
      background-color: #000;
    }

    .bottom-row {
      background-color: #1a1a1a;
    }
  }
  footer {
    .footer-top {
      h3 {
        font-size: 25px;
      }
    }
  }

  section.block-icon-text-grid {
    .row {
      --bs-gutter-x: 1.5rem;
      --bs-gutter-y: 0;
      row-gap: 50px;
    }
  }
  section.block-header-banner {
    padding-top: 245px;
    padding-bottom: 60px;
    h1 {
      font-size: 25px;
    }
    .textcontent {
      width: 428px;
    }
  }
}

@media (max-width: 768px) {
  .wp-block-buttons {
    &.is-content-justification-space-between {
      flex-direction: column;
    }
  }
  section.block-four-icon-boxes {
    .row {
      row-gap: 65px;
    }
    .box-item {
      text-align: center;
    }
  }
  section.block-header-banner {
    .textcontent {
      width: 100%;
      text-align: center;
    }
    h1 {
      font-size: 20px;
    }
  }
  section.block-buttons {
    .buttons {
      flex-direction: column;
      .button-link {
        width: fit-content;
      }
    }
    .buttons.justify-content-stretch .button-link {
      width: 100%;
    }
  }
  section.block-process-steps {
    .process-steps-items {
      grid-template-columns: 1fr;
      row-gap: 40px;
    }
    .process-step-item {
      &:nth-child(odd)::after,
      &:nth-child(even)::after,
      &:nth-child(odd)::before {
        display: none;
      }
    }
  }
}
