/*
Theme Name: Palmer Engineering Group
Theme URI: 
Author: Skyline Internet
Author URI: 
Description: 
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: palmer-engineering-group
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */

:root {
  --light-blue: #74beea;
  --green: #1aac69;
  --dark-blue: #003653;
  --light-grey: #84919942;
  --white: #fff;
  --sidebarWidth: 80dvw;
  --fontp: var(--wp--preset--font-family--roboto);
  --fontp_weight: 300;
}

a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
  outline: none;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation
  .wp-block-navigation-submenu
  .wp-block-navigation-item:not(:last-child) {
  margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation
  .wp-block-navigation-item
  .wp-block-navigation-item__content {
  outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation
  .wp-block-navigation-item
  ul.wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
  outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
  text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/

.more-link {
  display: block;
}

h1,
.projects h2,
.reviews h2,
.form h2 {
  background: linear-gradient(0.25turn, var(--light-blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Video */

.video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100vw;
  height: 56.25vw; /* Given a 16:9 aspect ratio, 9/16*100 = 56.25 */
  min-height: 100vh;
  min-width: 177.77vh; /* Given a 16:9 aspect ratio, 16/9*100 = 177.77 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.video,
.form {
  position: relative;
  z-index: 1;
}

/* About */

.about {
  position: relative;
  z-index: 2;
}

/* Services */

.services .wp-block-cb-slide-v2 .wp-block-group {
  height: 200px;
}

.services .wp-block-cb-slide-v2 .wp-block-group:hover,
.services .wp-block-group-is-layout-grid .wp-block-group:hover {
  background: var(--dark-blue);
  cursor: pointer;
}

.services .wp-block-cb-slide-v2 .wp-block-group:hover h3,
.services .wp-block-group-is-layout-grid .wp-block-group:hover h3,
.services .wp-block-cb-slide-v2 .wp-block-group:hover svg,
.services .wp-block-group-is-layout-grid .wp-block-group:hover svg {
  color: #fff !important;
}

.services .wp-block-cb-slide-v2 .wp-block-group svg,
.services .wp-block-group-is-layout-grid .wp-block-group svg {
  height: 2.5rem;
}

.wp-block-cb-carousel-v2[data-cb-pagination="true"] .swiper-horizontal {
  padding-bottom: 1em;
}

.services .link a {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 5;
}

/* Accreditations */

.accreditations img {
  filter: grayscale(100%);
  opacity: 0.5;
}

.accreditations img:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* Projects */

.projects .wp-block-post-title {
  min-height: 45px;
}

.projects .wp-block-query ul {
  gap: 1.1em;
}

/* Reviews */

.reviews .icon-container {
  width: 1.1em !important;
}

.reviews .icon-container svg {
  width: 1.5em;
}

.reviews .triangle {
  display: block;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 20px solid var(--white);
  float: left;
  margin-left: 1em !important;
  margin-top: -2px;
}

/* Form */

.wpcf7 input[type="text"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  border-width: 0 0 1px 0 !important;
  border-color: var(--light-grey);
  padding: 1em 0 0.4em 0 !important;
  font-family: var(--wp--preset--font-family--lato);
  font-size: 1.05rem;
  font-weight: 300;
  border-radius: 0;
  background: none;
  width: -webkit-fill-available;
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: var(--wp--preset--color--contrast);
}

.wpcf7 .wpcf7-submit {
  background: var(--dark-blue);
  color: #fff;
  border: none;
  padding: 15px 20px !important;
  transition: all 0.25s;
  text-transform: uppercase;
  font-weight: 300;
  width: fit-content;
  font-size: 1rem;
}

.wpcf7 .wpcf7-submit:hover {
  cursor: pointer;
  opacity: 0.85;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  outline-style: none !important;
}

.wpcf7-list-item {
  margin: 0 0 1em 0 !important;
}

.wpcf7-list-item-label {
  font-size: 0.75em;
}

/* Animations */

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(2rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-down {
  0% {
    opacity: 0;
    transform: translateY(-2rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-right {
  0% {
    opacity: 0;
    transform: translateX(2rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fade-left {
  0% {
    opacity: 0;
    transform: translateX(-2rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes grow {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}
.aos.fade-up {
  opacity: 0;
  transform: translateY(2rem);
}
.aos.fade-down {
  opacity: 0;
  transform: translateY(-2rem);
}
.aos.fade-right {
  opacity: 0;
  transform: translateX(-2rem);
}
.aos.fade-left {
  opacity: 0;
  transform: translateX(2rem);
}

.aos.grow {
  opacity: 0;
  transform: scale(0);
}

.animate.aos.fade-up {
  animation: fade-up 1s both cubic-bezier(0.215, 0.61, 0.355, 1);
}
.animate.aos.fade-down {
  animation: fade-down 1s both cubic-bezier(0.215, 0.61, 0.355, 1);
}
.animate.aos.fade-left {
  animation: fade-left 1s both cubic-bezier(0.215, 0.61, 0.355, 1);
}
.animate.aos.fade-right {
  animation: fade-right 1s both cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate.aos.grow {
  animation: grow 1s both cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animation-delay-1,
.animate-stagger .aos:nth-child(1) {
  animation-delay: calc(var(--baseDelay, 0.5s) + 0.25s) !important;
}
.animation-delay-2,
.animate-stagger .aos:nth-child(2) {
  animation-delay: calc(var(--baseDelay, 0.5s) + 0.5s) !important;
}
.animation-delay-3,
.animate-stagger .aos:nth-child(3) {
  animation-delay: calc(var(--baseDelay, 0.5s) + 0.75s) !important;
}
.animation-delay-4,
.animate-stagger .aos:nth-child(4) {
  animation-delay: calc(var(--baseDelay, 0.5s) + 1s) !important;
}

.animation-delay-5,
.animate-stagger .aos:nth-child(5) {
  animation-delay: calc(var(--baseDelay, 0.5s) + 1.25s) !important;
}

.animation-delay-6 {
  animation-delay: calc(var(--baseDelay, 0.5s) + 1.5s) !important;
}

.animation-delay-7 {
  animation-delay: calc(var(--baseDelay, 0.5s) + 1.75s) !important;
}

/* Initially slide the content out of view */
.group-contents-section,
.group-contents-section > div {
  opacity: 0;
  position: absolute;
  transform: translateX(-100%) scale(0); /* Slide out to the left */
  transition: transform 0.75s ease-in-out, opacity 0.75s ease-in-out;
}

.projects-wrapper {
  transition: transform 0.75s ease-in-out, opacity 0.75s ease-in-out !important;
}

/* Make the element visible and slide it in */
.visible {
  opacity: 1 !important;
  position: relative !important;
  transform: translateX(0) scale(1) !important; /* Slide in from the left */
}

/* Slide the element out and fade it out */
.hidden {
  opacity: 0 !important;
  pointer-events: none;
  transform: translateX(-100%) !important; /* Slide out to the left */
  transition: transform 0.75s ease, opacity 0.75s ease;
}

/* Optional: position shift for complete hidden state */
.hidden-complete {
  position: absolute !important;
  left: -9999px !important;
}

.wp-block-cb-carousel-v2.cb-carousel-block.reviews {
  width: 100% !important;
}

footer .hidden-form {
  display: none;
}

.form-placeholder svg {
  animation: spin 2s infinite;
  transform-origin: center center;
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

aside#sidebar {
  position: fixed;
  height: 100dvh;
  z-index: 99;
  background-color: #fff;
  left: 0;
  top: 0;
  min-width: 80dvw;
  transform: translateX(calc((var(--sidebarWidth, 80dvw) + 5rem) * -1));
  transition: all 0.25s;
}

aside#sidebar.open {
  transform: translate(0);
  z-index: 6;
}

body.sidebar-open {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body.sidebar-open:after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background-color: rgba(0, 0, 0, 0.5);
}

#sidebar [href="#closeSidebar"] {
  position: absolute;
  top: 1rem;
  right: 1rem;
  height: auto;
}

#sidebar > .wp-block-group {
  position: relative;
}

span.wpcf7-form-control-wrap,
span.wpcf7-form-control-wrap input,
span.wpcf7-form-control-wrap textarea {
  font-family: var(--fontp);
  font-weight: var(--fontp_weight);
}

form input[type="submit"] {
  text-transform: none !important;
  text-transform: none;
  text-transform: none;
  border-radius: 0;
}

form input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  text-transform: none !important;
  border-radius: 0;
}

form .wpcf7-not-valid-tip {
  font-size: 1em;
  font-weight: normal;
  display: block;
  box-sizing: content-box;
  line-height: 1rem;
  margin-top: 0.4rem;
  background-color: #ce4141;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.33rem 0.88rem;
}

.wpcf7-response-output {
  padding: 1rem;
  display: block;
  line-height: 0.95rem;
  font-size: 0.9rem;
  color: #fff;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  background-color: #ffb900;
}

.wpcf7 form.sent .wpcf7-response-output {
  background-color: #46b450; /* Green */
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  background-color: #dc3232; /* Red */
}

.wpcf7 form.spam .wpcf7-response-output {
  background-color: #f56e28; /* Orange */
}

/* Mobile  Generic*/
@media (max-width: 884px) {
  body .is-layout-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }

  body .wp-block-group.intro {
    padding: 1rem !important;
  }

  body .wp-block-group.collapse-on-mobile {
    flex-direction: column;
  }

  body .xs-text-center {
    text-align: center;
    justify-content: center;
    align-items: center;
  }

  .xs-pt-4 {
    padding-top: 2rem !important;
  }

  header > .wp-block-group > .wp-block-group {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .wp-block-cb-carousel-v2 {
    overflow-x: hidden;
  }

  .is-layout-constrained > .alignwide {
    padding: 1rem;
  }

  /*
  * Home video
  */
  body.home .video {
    margin-bottom: 0 !important;
  }

  body.home .video .wp-block-cover {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    min-height: unset !important;
    transform: translate();
    margin-left: 7.5% !important;
    transform: translateY(50%);
    margin-top: -3rem !important;
    margin-bottom: -3rem !important;
  }

  body main .wp-block-group.form {
    margin-bottom: 0;
  }

  body main .wp-block-group.form .wp-block-columns,
  body .wp-block-columns.reverse-on-mobile {
    flex-direction: column-reverse;
  }

  body .wp-block-columns.quirky-columns {
    margin-top: 1rem !important;
  }

  body main .wp-block-group.form .wp-block-columns > .wp-block-column {
    max-width: 100%;
    padding: 0 !important;
  }

  body main .wp-block-group.form .wp-block-columns > .wp-block-column img {
    aspect-ratio: 16 / 9 !important;
  }

  body main .wp-block-group.form .wp-block-columns > .wp-block-column figure {
    transform: translateY(4rem);
    margin-top: -4rem;
  }

  .form .wpcf7-list-item-label {
    font-size: 0.95rem;
    line-height: 1rem;
  }

  .form .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 0.5rem;
  }

  /*
  * Reset animation on animate stagger.
  */
  .animate-stagger .aos.animate {
    animation-delay: var(--baseDelay, 0.5s) !important;
  }

  body .wp-block-cb-carousel-v2 .swiper-horizontal {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body.home .about {
    flex-direction: column-reverse;
    margin-top: 1rem !important;
  }

  body.home .about-video-holder {
    padding-top: 10rem !important;
  }

  body.home .wp-block-cb-carousel-v2.alignwide.cb-carousel-block {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.home
    .wp-block-cb-carousel-v2.alignwide.cb-carousel-block
    .swiper-pagination {
    position: relative;
    bottom: unset;
    top: unset;
    margin-top: 1rem;
  }

  body .wp-block-group.projects {
    padding: 1rem !important;
  }

  body.home .reviews .cb-wrapper.swiper-wrapper {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) and (orientation: portrait) {
}

/* Mobile Landscape */
@media (max-width: 884px) and (orientation: landscape) {
}

/* Tablet Generic */
@media (min-width: 885px) and (max-width: 1366px) {
}

/* Tablet Portrait */
@media (min-width: 885px) and (max-width: 1024px) and (orientation: portrait) {
}

/* Tablet Landscape */
@media (min-width: 885px) and (max-width: 1366px) and (orientation: landscape) {
}
