/* Theme style reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

#root,
#__next {
  isolation: isolate;
}

/* Theme global styles */
* {
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  width: 100%;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.25rem;
  line-height: 1.2;
}

h3 {
  font-size: 2rem;
  line-height: 1.2;
}

h4 {
  font-size: 1.5rem;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.5rem;
  }

  h4 {
    font-size: 2rem;
    line-height: 1.3;
  }
}

a {
  text-decoration: none;
  color: var(--wp--preset--color--primary);
}
a:hover {
  text-decoration: underline;
}

html {
  max-width: 100vw;
}

/* WP wrapes all block content inside a div with class .wp-site-blocks */
body .wp-site-blocks {
  min-height: 100vh;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
}

body.admin-bar .wp-site-blocks {
  min-height: calc(100vh - 32px);
}

body .wp-site-blocks > footer {
  margin-top: auto;
}

.main-nav__button--to-right {
  margin-left: auto;
}

@media (max-width: 1023px) {
  .hide-on-mobile {
    display: none !important;
  }

  .hide-on-desktop {
    display: block;
  }
}
@media (min-width: 1024px) {
  .hide-on-mobile {
    display: block;
  }

  .hide-on-desktop {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .crstd__footer-menu {
    flex-direction: column;
    align-items: start;
  }
}

.crstd__footer-contact textarea {
  resize: none;
  width: 100%;
  rows: 4;

  @media (min-width: 1024px) {
    height: 110px;
  }
}

.crstd__footer-contact input,
.crstd__footer-contact textarea {
  padding: 12px;
  font-size: 16px;
  font-weight: 400;
  border-radius: 4px;
}

.crstd__footer-contact form p {
  margin-bottom: 16px;
}
.crstd__footer-contact form p:last-of-type {
  margin-bottom: 0;
}

.crstd__footer-contact .wpcf7-spinner {
  display: none;
}

.crstd__footer-contact .wpcf7-response-output {
  margin: 0 auto;
  width: 100%;
  max-width: 330px;
}
.crstd__footer-contact input {
  width: 100%;
}

.crstd__footer-contact input[type="submit"] {
  display: inline-block;
  width: 100%;
  border: 1px solid var(--wp--preset--color--white);
  color: var(--wp--preset--color--white);
  background-color: var(--wp--preset--color--primary);
  cursor: pointer;
  @media (min-width: 1024px) {
    width: auto;
    padding: 12px 24px;
  }
}

.crstd__footer-contact input[type="submit"]:hover {
  display: inline-block;
  width: 100%;
  border: 1px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
  background-color: var(--wp--preset--color--white);
  @media (min-width: 1024px) {
    width: auto;
    padding: 12px 24px;
  }
}

/* Asymetric Header Pattern START */
.asymetric-header {
  margin-top: 64px !important;
  margin-bottom: 48px !important;

  @media (min-width: 1024px) {
    margin-top: 112px !important;
    margin-bottom: 80px !important;
  }

  & .asymetric-header__row {
    flex-direction: column;

    @media (max-width: 1024px) {
      gap: 40px;
    }

    @media (min-width: 1024px) {
      flex-direction: row;
    }
  }

  & .asymetric-header__col {
    flex-basis: 42%;
    @media (min-width: 1024px) {
    }
  }
  & .asymetric-header__col--right {
    @media (max-width: 1024px) {
      padding-left: 16px;
      padding-right: 16px;
    }

    & .wp-block-buttons {
      @media (max-width: 385px) {
        gap: 12px;
      }
    }
  }
}
/* Asymetric Header Pattern END */

.achievements {
  & .hide-on-desktop {
    flex-direction: column;

    & div:nth-child(2) {
      width: 100%;
    }
  }
}

.partner-companies__logos {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(100px, 1fr));
  justify-content: center;
  align-items: center;

  @media (min-width: 600px) {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  @media (min-width: 732px) {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }

  @media (min-width: 1024px) {
    display: flex !important;
    justify-content: space-between;
  }

  & figure {
    height: 150px !important;
    margin: 0 auto !important;

    @media (min-width: 600px) {
      width: 100% !important;
    }

    @media (min-width: 1024px) {
      height: 100px !important;
      width: 18% !important;
    }

    & img {
      width: 100% !important;
      height: 100% !important;
      object-fit: contain;
      object-position: center;
    }
  }
}

.general-cta {
  @media (max-width: 762px) {
    & .wp-block-group {
      width: 100% !important;
      max-width: 100% !important;
    }
  }
}

/* 3 cols Pattern START */
.three-stack {
  & .wp-block-group:has(h2) {
    width: 100%;
    & h2 {
      width: 100%;
      -ms-hyphens: auto;
      -moz-hyphens: auto;
      -webkit-hyphens: auto;
      hyphens: auto;
    }
  }

  & .three-stack__items {
    flex-direction: column;
    gap: 48px;
    align-items: center;

    @media (min-width: 1024px) {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 32px;
      align-items: center;
    }
  }

  & .three-stack__item {
    flex-basis: 100%;
    max-width: 430px;

    @media (min-width: 1024px) {
      display: flex;
      flex-basis: 30%;
      max-width: 100%;
      height: 100%;

      & p:first-of-type {
        margin-top: auto;
      }
    }

    @media (min-width: 1200px) {
      justify-content: space-between;
    }
  }
}
/* 3 cols Pattern END */

/* custom tailwind-like css classes START */
.inline-block {
  display: inline-block;
}
.border-t-1 {
  border-top: 1px solid;
}
.w-full {
  width: 100%;
}
.sm\:w-\[490px\] {
  @media (min-width: 640px) {
    width: 490px;
  }
}
/* custom tailwind-like css classes END */

/* Case Study Loop Pattern styles START */
.cs-loop {
  & .cs-loop__cards {
    @media (min-width: 600px) and (max-width: 850px) {
      grid-template-columns: repeat(2, 1fr);
    }

    & .cs-loop__card {
      height: 100%;

      & .wp-block-group:has(.cs-loop__to-post-btn) {
        display: flex;
        flex: 1;

        & .wp-block-post-excerpt {
          margin-bottom: 2rem;
        }

        & .cs-loop__to-post-btn {
          margin-top: auto;
          position: relative;
          display: inline-block;
          padding-right: 24px;

          &:after {
            content: "";
            position: absolute;
            top: 50%;
            right: 0px;
            transform: translateY(-50%);
            width: 8px;
            height: 12px;
            background-image: url("/wp-content/themes/corestad/assets/imgs/svg/arrow.svg");
            background-size: contain;
            background-repeat: no-repeat;
          }
        }
      }
    }
  }

  & .cs-loop__to-archive-btn a {
    margin-top: auto;
    position: relative;
    display: inline-block;
    padding-right: 42px;

    &:after {
      content: "";
      position: absolute;
      top: 50%;
      right: 18px;
      transform: translateY(-50%);
      width: 8px;
      height: 12px;
      background-image: url("/wp-content/themes/corestad/assets/imgs/svg/arrow.svg");
      background-size: contain;
      background-repeat: no-repeat;
    }
  }
}
/* Case Study Loop Pattern styles END */

.long-button {
  display: inline-block;
  width: 100%;
  max-width: 350px;
  & a {
    display: inline-block;
    width: 100%;
  }
}

.hide-summary-marker {
  & summary {
    list-style: none;

    &::marker,
    &::-webkit-details-marker {
      display: none;
    }
  }
}

/* General FAQS Pattern START */
.general-faqs {
  & details {
    width: 100%;
    padding-top: 22px;
    border-top: 1px solid var(--wp--preset--color--primary);

    &:last-of-type {
      padding-bottom: 22px;
      border-bottom: 1px solid var(--wp--preset--color--primary);
    }

    & summary {
      display: block;
      position: relative;
      width: 100%;
      padding-right: 55px;

      &:after {
        content: "";
        position: absolute;
        top: 50%;
        right: 18px;
        transform: translateY(-50%) rotate(180deg);
        transition: transform 0.3s;
        width: 17px;
        height: 10px;
        background-image: url("/wp-content/themes/corestad/assets/imgs/svg/chevron.svg");
        background-size: contain;
        background-repeat: no-repeat;
      }
    }

    &[open] {
      & summary {
        &:after {
          transform: translateY(-50%) rotate(0deg);
        }
      }
    }
  }
}
/* General FAQS Pattern END */

/* Case Study Archive START */
.case-study-archive__query-loop {
  & ul li {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--wp--preset--color--primary);

    &:last-of-type {
      padding-bottom: 0;
      border-bottom: none;
    }
  }

  & .case-study-archive__to-post-btn {
    margin-top: auto;
    position: relative;
    display: inline-block;
    padding-right: 42px;

    &:after {
      content: "";
      position: absolute;
      top: 50%;
      right: 18px;
      transform: translateY(-50%);
      width: 8px;
      height: 12px;
      background-image: url("/wp-content/themes/corestad/assets/imgs/svg/arrow.svg");
      background-size: contain;
      background-repeat: no-repeat;
    }
  }

  & .wp-load-more__button {
    /* copy of the secondary button style */
    background: transparent none;
    background-color: var(--wp--preset--color--white);
    border-color: currentColor;
    border-width: 2px;
    border-style: solid;
    color: var(--wp--preset--color--secondary);
    padding-top: 0.667em;
    padding-right: 1.33em;
    padding-bottom: 0.667em;
    padding-left: 1.33em;
    & .wp-block-query-pagination__arrow:empty {
      display: none;
    }
  }
}
/* Case Study Archive END */

/* Single Case Study START */
.single-case-study {
  /* styles not shown in the Template editor from this class */
}
.single-case-study__body {
  & .single-case-study__back-to-archive a {
    margin-top: auto;
    position: relative;
    display: inline-block;
    padding-left: 26px;

    &:before {
      content: "";
      position: absolute;
      top: 50%;
      left: 0px;
      transform: translateY(-50%) rotate(180deg);
      width: 8px;
      height: 12px;
      background-image: url("/wp-content/themes/corestad/assets/imgs/svg/arrow.svg");
      background-size: contain;
      background-repeat: no-repeat;
    }
  }

  & figure figcaption {
    display: inline-block;
    padding-left: 12px;
    border-left: 2px solid var(--wp--preset--color--primary);
    font-size: 14px;
  }

  & .single-case-study__get-in-touch-form {
    & p {
      margin-bottom: 16px;
      &:last-of-type {
        margin-bottom: 0;
      }
    }

    & input {
      padding: 12px;
      font-size: 16px;
      font-weight: 400;
      border-radius: 4px;
      border: 1px solid var(--wp--preset--color--primary);
    }

    & .wpcf7-spinner {
      display: none;
    }
    & .wpcf7-response-output {
      margin: 0 auto;
      width: 100%;
      max-width: 330px;
    }
    & input {
      width: 100%;
    }
  }

  & input[type="submit"] {
    display: inline-block;
    width: 100%;
    border: 1px solid var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--secondary);
    cursor: pointer;
    @media (min-width: 1024px) {
      width: 100%;
      padding: 12px 24px;
    }

    &:hover {
      display: inline-block;
      width: 100%;
      border: 1px solid var(--wp--preset--color--secondary);
      color: var(--wp--preset--color--secondary);
      background-color: var(--wp--preset--color--white);
      @media (min-width: 1024px) {
        width: auto;
        padding: 12px 24px;
      }
    }
  }
}
/* Single Case Study END */

/* Contact us page */
.contact-us-page__form {
  & p {
    margin-bottom: 16px;
    &:last-of-type {
      margin-bottom: 0;
    }
  }

  & input,
  textarea, select {
    padding: 12px;
    font-size: 16px;
    font-weight: 400;
    border-radius: 4px;
    border: 1px solid var(--wp--preset--color--primary);
    width: 100%;
  }

  & .wpcf7-spinner {
    display: none;
  }
  & .wpcf7-response-output {
    margin: 0 auto;
    width: 100%;
    max-width: 330px;
  }
  & input {
    width: 100%;
  }

  & input[type="submit"] {
    display: inline-block;
    width: auto;
    border: 1px solid var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
    background-color: var(--wp--preset--color--secondary);
    cursor: pointer;
    @media (min-width: 1024px) {
      width: auto;
      padding: 12px 24px;
    }

    &:hover {
      display: inline-block;
      width: auto;
      border: 1px solid var(--wp--preset--color--secondary);
      color: var(--wp--preset--color--secondary);
      background-color: var(--wp--preset--color--white);
      @media (min-width: 1024px) {
        width: auto;
        padding: 12px 24px;
      }
    }
  }

  & input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
  }
}

/* Blog Archive START */
.blog-archive {
  & .wp-load-more__button {
    /* copy of the secondary button style */
    background: transparent none;
    background-color: var(--wp--preset--color--white);
    border-color: currentColor;
    border-width: 2px;
    border-style: solid;
    color: var(--wp--preset--color--secondary);
    padding-top: 0.667em;
    padding-right: 1.33em;
    padding-bottom: 0.667em;
    padding-left: 1.33em;
    & .wp-block-query-pagination__arrow:empty {
      display: none;
    }
  }
}

/* Blog Archive END */

/* Single Blog Post START */
.single-blog-post {
  & .single-blog-post__back-to-archive a {
    margin-top: auto;
    position: relative;
    display: inline-block;
    padding-left: 26px;

    &:before {
      content: "";
      position: absolute;
      top: 50%;
      left: 0px;
      transform: translateY(-50%) rotate(180deg);
      width: 8px;
      height: 12px;
      background-image: url("/wp-content/themes/corestad/assets/imgs/svg/arrow.svg");
      background-size: contain;
      background-repeat: no-repeat;
    }
  }
}
/* Single Blog Post END */

.wp-site-blocks {
  & header.wp-block-template-part {
    width: 100vw;
  }
}
