/*
Theme Name: NEXEC
Theme URI: https://nexecconsulting.com.au/
Author: New Best Friend
Author URI: https://newbestfriend.com.au
Requires at least: 6
Tested up to: 6.9.0
Requires PHP: 8.0
Version: 1.0
Text Domain: nexec
*/

:root {
  --wp--preset--shadow--deep: 0 50px 100px #00000010;
}

footer {
  margin-top: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-size: 1rem;
  line-height: 1.4;
}

.has-large-font-size,
.has-x-large-font-size {
  line-height: 1.25;
}

main.wp-block-group {
  margin-top: 0 !important;
}

img {
  display: block;
}

input::placeholder {
  opacity: 0.5;
}

/*prevent annoying ios form zooming */
input,
textarea,
select {
  font-size: 16px !important;
}

.hide-on-mobile {
  @media (max-width: 781px) {
    & {
      display: none !important;
    }
  }
}
.hide-on-tablet {
  @media (min-width: 782px) and (max-width: 1009px) {
    & {
      display: none !important;
    }
  }
}
.hide-on-desktop {
  @media (min-width: 1010px) {
    & {
      display: none !important;
    }
  }
}
.d-none {
  display: none !important;
}
.d-block {
  display: block !important;
}

/*
 * CHANGE CONTENT ORDER
 */
.order-1 {
  order: 1;
}
.order-2 {
  order: 2;
}
.order-3 {
  order: 3;
}
@media (max-width: 781px) {
  .order-mobile-1 {
    order: 1;
  }
  .order-mobile-2 {
    order: 2;
  }
  .order-mobile-3 {
    order: 3;
  }

  .align-mobile-start {
    justify-content: flex-start;
  }
}

.w-100 {
  width: 100%;
}

.is-position-sticky {
  top: 0;
  z-index: 1;
  &.bottom {
    top: unset !important;
    bottom: 0;
  }
}


/* Fix rotated text for mobile */
@media (max-width: 785px) {
  *.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]) {
    rotate: 0deg !important;
    text-align: left !important;
    writing-mode: initial !important;
  }
}

.is-layout-grid {
  @media (max-width: 900px) {
    & {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }   
  }

  @media (max-width: 500px) {
    & {
      grid-template-columns: repeat(1, minmax(0, 1fr));
    }   
  }  
}


@media (max-width: 781px) {
  .wp-block-buttons.is-content-justification-center {
    justify-content: flex-start;
  }
  .has-text-align-center {
    text-align: left !important;
  }
}


/* anchor box marker */
.is-style-anchor {
  position: relative;
}

.is-style-anchor::before {
  content: "";
  position: absolute;

  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  background: transparent;
  backdrop-filter: blur(10px);
  translate: -50%;
  left: calc(30vw - var(--anchor-offset));
  top: -1em;

  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  transform: translateY(var(--anchor-parallax, 0px)) scale(var(--anchor-scale, 1));
  opacity: var(--anchor-opacity, 1);
}

@media (max-width: 781px) {
  .is-style-anchor::before {
    display: none !important;
  }
}


.wp-block-cover__inner-container:has(.alignfull) {
  padding-inline: 0 !important;
}


.no-animate,
.no-animate * {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}

[data-component="stagger"] [data-item] {
  opacity: 0;
  will-change: transform, opacity;
}

[data-component="stagger"].is-ready [data-item] {
  transition:
    transform 1s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 2s ease;
}

[data-component="stagger"].is-visible [data-item] {
  opacity: 1;
}

[data-component="stagger"] h1[data-item],
[data-component="stagger"] h2[data-item],
[data-component="stagger"] h3[data-item],
[data-component="stagger"] p[data-item] {
  transform: none;
}

[data-component="stagger"] .animate-element[data-item],
[data-component="stagger"] img[data-item],
[data-component="stagger"] svg[data-item],
[data-component="stagger"] .wp-block-button {
  transform: translateY(30px);
  transition-duration: 3s;
}

[data-component="stagger"].is-visible .animate-element[data-item],
[data-component="stagger"].is-visible img[data-item],
[data-component="stagger"].is-visible svg[data-item],
[data-component="stagger"].is-visible .wp-block-button {
  transform: translateY(0);
}