/**
 * @file
 * Base styles for Swiper carousels (.init-carousel-swiper).
 *
 * Equivalents of the generic Owl Carousel rules (owl.carousel.css and the
 * .owl-* rules in gavias_daudo/css/template.css), mapped as follows:
 *   .owl-carousel / .init-carousel-owl -> .init-carousel-swiper
 *   .owl-stage-outer                   -> .swiper
 *   .owl-stage                         -> .swiper-wrapper
 *   .owl-item                          -> .swiper-slide
 *   .owl-item.active                   -> .swiper-slide-visible
 *   .owl-nav / .owl-prev / .owl-next   -> .carousel-nav / .carousel-prev / .carousel-next
 *   .owl-dots / .owl-dot               -> .carousel-dots / .carousel-dot
 * Rendering-specific rules live next to the rendering's other rules in
 * style.css.
 */

/* owl.carousel.css */
.init-carousel-swiper {
  display: none;
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.init-carousel-swiper.carousel-loading {
  display: block;
  opacity: 0;
}
.init-carousel-swiper.carousel-loaded {
  display: block;
}
/* Like .owl-stage-outer: no z-index, so later controls paint on top. */
.init-carousel-swiper > .swiper {
  z-index: auto;
}
.init-carousel-swiper .swiper-wrapper {
  z-index: auto;
  align-items: flex-start;
}
.init-carousel-swiper .swiper-slide {
  height: auto;
  min-height: 1px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}
.init-carousel-swiper .swiper-slide img {
  display: inline-block;
  width: auto;
}
.init-carousel-swiper .carousel-nav[hidden],
.init-carousel-swiper .carousel-dots[hidden] {
  display: none;
}
.init-carousel-swiper .carousel-prev,
.init-carousel-swiper .carousel-next,
.init-carousel-swiper .carousel-dot {
  cursor: pointer;
  user-select: none;
}

/* Gutters (template.css .init-carousel-owl). */
.init-carousel-swiper {
  margin-left: -15px;
  margin-right: -15px;
  width: auto;
}
.init-carousel-swiper .swiper-slide > .item {
  padding-left: 15px;
  padding-right: 15px;
}
.init-carousel-swiper.carousel-no-padding,
.init-carousel-swiper.no-padding,
.init-carousel-swiper[data-items*="1"] {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.init-carousel-swiper.carousel-no-padding .swiper-slide > .item,
.init-carousel-swiper.no-padding .swiper-slide > .item,
.init-carousel-swiper[data-items*="1"] .swiper-slide > .item {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Arrows (template.css .owl-nav). */
.init-carousel-swiper .carousel-nav {
  opacity: 0;
  transition: opacity 0.3s;
}
/* :focus-within shows the arrows while one holds the keyboard focus. */
.init-carousel-swiper:hover .carousel-nav,
.init-carousel-swiper:focus-within .carousel-nav {
  opacity: 1;
  background: #fff;
}
.init-carousel-swiper .carousel-nav > button {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  margin-top: -20px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #fff;
  color: #788592 !important;
  font: inherit;
  font-size: 14px;
  line-height: 45px;
  text-align: center;
  border: 1px solid #dee2e6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}
.init-carousel-swiper .carousel-nav > button:hover {
  background: #3B7EFF;
}
.init-carousel-swiper .carousel-nav > button:hover i {
  color: #fff;
}
.init-carousel-swiper .carousel-nav > .carousel-prev {
  right: auto !important;
  left: 0 !important;
}
.init-carousel-swiper .carousel-nav > .carousel-next {
  left: auto !important;
  right: 0 !important;
}
.init-carousel-swiper:hover .carousel-nav .carousel-next,
.init-carousel-swiper:focus-within .carousel-nav .carousel-next {
  margin-left: 30px;
}
.init-carousel-swiper:hover .carousel-nav .carousel-prev,
.init-carousel-swiper:focus-within .carousel-nav .carousel-prev {
  margin-right: 30px;
}

/*
 * Dots (template.css .owl-dots).
 *
 * Each dot is a transparent button of at least 24x24px (WCAG 2.5.8). The
 * visible dot is drawn by ::before with the size and colors the dot had on
 * Owl. Negative vertical margins keep the row as tall as the visible dots.
 */
.init-carousel-swiper .carousel-dots {
  margin-top: 15px;
  text-align: center;
  width: 100%;
  display: block;
}
.init-carousel-swiper .carousel-dot {
  --dot-width: 16px;
  --dot-height: 6px;
  --dot-gap: 10px;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
  width: max(24px, var(--dot-width));
  height: max(24px, var(--dot-height));
  margin: calc((var(--dot-height) - max(24px, var(--dot-height))) / 2) calc((max(25px, var(--dot-width) + var(--dot-gap)) - max(24px, var(--dot-width))) / 2);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  opacity: 1;
}
/* As specific as Owl's ".owl-carousel .owl-dots .owl-dot", which beats the
   round shape style.css gives every dot. */
.init-carousel-swiper .carousel-dots .carousel-dot::before {
  content: "";
  display: block;
  width: var(--dot-width);
  height: var(--dot-height);
  background: #ADB2B5;
  border-radius: 4px;
  transition: background 0.35s;
}
.init-carousel-swiper .carousel-dot.active::before {
  background: #3B7EFF;
}
.init-carousel-swiper.pagination-right .carousel-dots {
  position: absolute;
  right: -30px;
  top: 50%;
  margin-top: 0;
  transform: translateY(-50%);
  width: 10px;
  height: auto;
}
.init-carousel-swiper.pagination-right .carousel-dot {
  display: flex;
  margin: 10px 0;
}
.init-carousel-swiper.pagination-left .carousel-dots {
  float: left;
  width: auto;
  margin-top: 15px;
  text-align: left;
}
.init-carousel-swiper.white .carousel-dot::before {
  background: #AAABAC;
}
.init-carousel-swiper.white .carousel-dot.active::before {
  background: #fff;
}

/*
 * Rendering-specific rules ported from gavias_daudo/css/template.css, which
 * loads in the same cascade position as this file.
 */

/* Page-builder gallery (gva_gallery). */
.gsc-our-gallery .carousel-nav .carousel-prev {
  bottom: 15px;
  left: 15px;
}
.gsc-our-gallery .carousel-nav .carousel-next {
  bottom: 15px;
  left: 60px;
  right: auto;
}

/* Portfolio images (field templates). */
.portfolio-single .portfolio-images .carousel-nav .carousel-prev {
  left: 20px !important;
}
.portfolio-single .portfolio-images .carousel-nav .carousel-next {
  right: 20px !important;
}
.portfolio-single .portfolio-images .carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
}

/* Banner view. */
.banner-carousel .init-carousel-swiper {
  margin-left: 0;
  margin-right: 0;
}
.banner-carousel .init-carousel-swiper .item {
  padding: 0;
  border-left: 0;
  text-align: center;
  position: relative;
}

/* Cards inside carousels. */
.init-carousel-swiper .post-block,
.init-carousel-swiper .post-block.teaser-2 {
  margin-bottom: 0 !important;
}
.init-carousel-swiper .portfolio-v1,
.init-carousel-swiper .portfolio-v2,
.init-carousel-swiper .service-block-3 {
  margin-bottom: 0;
}
.init-carousel-swiper .testimonial-node-1 {
  margin-bottom: 20px;
}
.init-carousel-swiper .swiper-slide.center .testimonial-node-1 {
  box-shadow: 0px 6px 21px 3px rgba(0, 0, 0, 0.08);
}
.init-carousel-swiper .swiper-slide.center .service-block-3 {
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
.init-carousel-swiper .swiper-slide.center .service-block-3 .service-images:after {
  background: rgba(0, 0, 0, 0.3);
}
.init-carousel-swiper .swiper-slide.center .service-block-3 .service-images .image-popup {
  opacity: 1;
  transform: translateX(0);
}
.init-carousel-swiper .swiper-slide.center .service-block-3 .service-content .service-icon {
  transform: translateY(-200px);
}
.init-carousel-swiper .swiper-slide.center .service-block-3 .service-content .title {
  transform: translateY(35px);
  color: #fff;
}
.init-carousel-swiper .swiper-slide.center .service-block-3 .service-content .title a {
  color: #fff;
}
.init-carousel-swiper .swiper-slide.center .service-block-3 .service-content .read-more {
  transform: translateY(0);
}

/* Page-builder service carousel (gva_services_carousel). */
.gsc-service-carousel .init-carousel-swiper .swiper-slide.center .content-inner {
  box-shadow: 0px 6px 21px 3px rgba(0, 0, 0, 0.1);
  background: #3B7EFF;
  border-color: transparent;
}
.gsc-service-carousel .init-carousel-swiper .swiper-slide.center .content-inner .icon,
.gsc-service-carousel .init-carousel-swiper .swiper-slide.center .content-inner .title,
.gsc-service-carousel .init-carousel-swiper .swiper-slide.center .content-inner .title a,
.gsc-service-carousel .init-carousel-swiper .swiper-slide.center .content-inner .desc {
  color: #fff;
}
.gsc-service-carousel .init-carousel-swiper .swiper-slide.center .content-inner .desc:after {
  background: #fff;
  width: 45px;
}
