// GENERAL STYLE
// ------------------------
.ja-acm {
  h2 {
    margin: 0 0 $spacer;
  }

  h3 {
    font-size: $h4-font-size;
    margin: 0 0 $spacer;
  }
}


// ---------------------------
// HERO - STYLE
// ---------------------------
// Hero style 1
// ------------
.acm-hero.style-1 {
  .acm-hero-item {
    --body-text-color: rgba(255, 255, 255, 0.8);
    --headings-color: #fff;
    background-size: cover;
    position: relative;
    color: var(--body-text-color);

    // Mask Hero
    &::after {
      background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0));
      content: "";
      display: block;
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 50%;
    }

    &.mask-rtl:after {
      background: linear-gradient(to left, rgba(0,0,0,0.6), rgba(0,0,0,0));
      right: 0;
      left: auto;
    }

    &.mask-btt:after {
      background: linear-gradient(to top, var(--body-bg-color),transparent );
      width: 100%;
    }

    &.mask-normal:after {
      background: rgba(0,0,0,0.6);
      width: 100%;
    }

    // Hidden Mask
    &.no-mask:after {
      display: none;
    }
  }

  // Animation
  .owl-item {
    .hero-content-inner {
      > * {
        transform: translateY(45%) !important;
        -webkit-transform: translateY(45%) !important;
        opacity: 0 !important;
        transition: 2000ms all !important;

        &:nth-child(1) {
          transition-delay: 100ms !important;
        }

        &:nth-child(2) {
          transition-delay: 300ms !important;
        }

        &:nth-child(3) {
          transition-delay: 600ms !important;
        }

        &:nth-child(4) {
          transition-delay: 800ms !important;
        }
      }
    }

    &.active .hero-content-inner {
      > * {
        transform: translateY(0) !important;
        -webkit-transform: translateY(0) !important;
        opacity: 1 !important;
        transition: 2000ms all;
      }
    }
  }


  .hero-content {
    position: relative;
    z-index: 20;
  }

  .has-bg {
    .hero-content {
      min-height: 45rem;

      // Tablet view
      @include media-breakpoint-down(lg) {
        min-height: 30rem;
      }
    }
  }

  .sub-heading {
    h4 {
      font-size: var(--h6-font-size);
      font-weight: 600;
      letter-spacing: 1px;
      text-transform: uppercase;
    }
  }
}


// Hero style 2
// ------------
.acm-hero.style-2 {
  .hero-media-wrap {
    padding-bottom: 50%;
    position: relative;    

    @include media-breakpoint-up(md) {
      padding-bottom: 50%;
    }

    @include media-breakpoint-up(lg) {
      height: 100%;
      padding-bottom: 0;
    }
  }



  .hero-media {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .hero-content {
    padding: $grid-gutter-width * 5.5 $grid-gutter-width * 3;
    max-width: map-get($container-max-widths,xl) / 1.5;

    // Medium view
    @include media-breakpoint-down(xl) {
      padding: $grid-gutter-width * 2 $grid-gutter-width * 2;
    }

    // Tablet view
    @include media-breakpoint-down(md) {
      padding: $grid-gutter-width $grid-gutter-width / 2;
    }

    .hero-actions {
      margin-top: $grid-gutter-width * 2;

      // Medium view
      @include media-breakpoint-down(lg) {
        margin-top: $grid-gutter-width;
      }

      // Mobile view
      @include media-breakpoint-down(sm) {
        margin-top: $grid-gutter-width / 2;
      }
    }
  }

  // Has container
  .container & {
    .hero-content {
      padding-left: $grid-gutter-width;
      padding-right: $grid-gutter-width;
    }
  }
}

// -----------------------------
// FEATURES INTRO STYLE
// -----------------------------

// Style 1
// -----------------------------
.acm-features.style-1 {

  // Media right
  .media-right {
    flex-direction: row-reverse;

    .feature-ct {
      padding-left: 128px;
      padding-right: 0;
    }
  }

  .feature-ct {
    padding-right: 128px;
  }
}

// Style 2
// -----------------------------
.acm-features.style-2 {
  // Border Style
  .fd-border {
    .fd-item-inner {
      border: 1px solid var(--t4-border-color);
      border-radius: $border-radius;
    }
  }

  .fd-item-inner {
    display: flex;
    height: 100%;
    flex-flow: column wrap;
    gap: $spacer;
  }  


  .fd-item-content {
    flex: 1;
  }

  // Media alignment
  .media-left {
    .fd-item-inner {
      flex-flow: row wrap;
    }
  }

  .media-top-left {

  }

  .media-top-center {
    text-align: center;
  }

  .media-top-right {
    text-align: right;
  }

  .media-right {
    .fd-item-inner {
      flex-flow: row-reverse wrap;
      text-align: right;
    }
  }


  // Has background color
  .has-bg-color {
    padding: $grid-gutter-width * 2 $grid-gutter-width;

    // Tablet view
    @include media-breakpoint-down(xl) {
      padding: $grid-gutter-width;
    }
  }
}


// Style 3
// -----------------------------
.acm-features.style-3 {
  // Distance for module when sharing the same position 
  + .acm-features.style-3 {
    margin-top: $grid-gutter-width * 2;
  }

  .feature-media {
    img {
      border-radius: $border-radius-sm;
      width: 100%;
    }
  }

  // Sub Features
  .sub-features {
    // Align Left
    .media-align-left {
      display: flex;

      // Intro Image
      .fd-item-media {
        margin-right: $spacer;
      }
    }
  }
}


// Style 4
// -----------------------------
.acm-features.style-4 {
  // Owl Style
  div.owl-carousel {
    .owl-stage {
      display: flex;
    }

    .owl-item {
      display: flex;
      flex: 1 0 auto;
    }

    div.owl-nav {
      // Desktop view
      @include media-breakpoint-up(xl) {
        margin-top: 0;

        > button {
          position: absolute;
          top: 50%;
          right: 100%;
          margin-right: $grid-gutter-width;
          margin-top: -24px;

          &.owl-next {
            right: auto;
            left: 100%;
            margin-right: 0;
            margin-left: $grid-gutter-width;
          }
        }
      }
    }
  }

  // Item
  .fd-item {
    background: var(--tpl-base-100);

    .fd-item-inner {
      padding: $grid-gutter-width;
    }
  }
}

// -----------------------------
// TESTIMONIALS
// -----------------------------
.acm-testimonial {
  // Style 1
  &.style-1 {
    .testimonial-content-wrap {
      color: var(--body-text-color);
      padding: $grid-gutter-width * 5.5 $grid-gutter-width * 4;
      max-width: map-get($container-max-widths,xl) / 1.5;

      // Medium view
      @include media-breakpoint-down(xxl) {
        padding: $grid-gutter-width * 2 $grid-gutter-width * 2;
      }

      // Tablet view
      @include media-breakpoint-down(lg) {
        padding: $grid-gutter-width $grid-gutter-width / 2;
        text-align: center;
      }
    }

    .content-left {
      text-align: left;

      // Tablet view
      @include media-breakpoint-down(lg) {
        text-align: center;
      }
    }

    .content-center {
      text-align: center;
    }

    // Lead Image
    .testimonial-media {
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center center;
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;

      // Tablet view
      @include media-breakpoint-down(lg) {
        height: 320px;
        position: static;
        width: 100%;
      }
    }

    // Author Info
    .owl-item .testimonial-author {
      .author-image {
        display: inline-block;
        border-radius: 50%;
        height: 4rem;
        width: 4rem;
        overflow: hidden;

        img {
          width: auto;
        }
      }
    }

    // Has Container 
    .container & {
      .testimonial-content-wrap {
        padding-right: 0;
      }
    }
  }

  // Style 2
  // -----------------------
  &.style-2 {
    .testimonial-item-wrap {
      max-width: 780px;
      margin-left: auto;
      margin-right: auto;
      text-align: center;
    }

    // Avatar
    .testimonial-img {
      margin: auto;
      max-width: 96px;
    }

    // Name
    .testimonial-name {
      margin-top: $spacer-lg;
    }

    // Dot
    div.owl-carousel .owl-dots {
      position: static;
      margin-top: $spacer;
    }
  }
}

// -----------------------------
// STATSTICS
// -----------------------------
.acm-stats {
  // Style 1
  &.style-1 {
    text-align: center;

    @include media-breakpoint-up(xl) {
      padding-left: $grid-gutter-width * 2;
      padding-right: $grid-gutter-width * 2;
    }

    .row {
      @include media-breakpoint-up(xl) {
        margin-left: -$grid-gutter-width * 2;
        margin-right: -$grid-gutter-width * 2;
      }

      + .row {
        margin-top: $grid-gutter-width;
      }

      > div {
        @include media-breakpoint-up(xl) {
          padding-left: $grid-gutter-width * 2;
          padding-right: $grid-gutter-width * 2;
        }

        + div {
          border-left: 1px solid var(--t4-border-color);
        }
      }
    }

    // Number
    .stats-count {
      color: $yellow;
    }
  } 
}

// -----------------------------
// CLIENTS
// -----------------------------
.acm-clients {
  // Style 1
  &.style-1 {
    .client-image {
      transition: 500ms all;

      &:hover,&:focus,&:active {
        opacity: 1!important;
      }
    }
  }
}


// -----------------------------
// TIMELINE
// -----------------------------
.timeline-wrap {
  .timeline-item {
    padding: 0 0 $spacer 24px;
    position: relative;

    @include media-breakpoint-up(md) {
      padding: 0 0 $spacer 160px;
    }

    & + .timeline-item {
      padding-top: $spacer;
    }

   
    &::before,
    &::after {
      background: var(--t4-border-color);
      content: "";
      display: block;
      position: absolute;
      left: 4px;
      top: 0;
      bottom: 0;
      width: 1px;

      @include media-breakpoint-up(md) {
        left: 104px;
      }
    }

    &::after {
      background: var(--tpl-base-200);
      border: 3px solid var(--body-bg-color);
      border-radius: 50%;
      height: 18px;
      left: -4px;
      top: 24px;
      bottom: auto;
      width: 18px;

      @include media-breakpoint-up(md) {
        left: 95px;
        top: 16px;
      }
    }

    &:first-of-type {
      &::after {
        top: 8px;

        @include media-breakpoint-up(md) {
          top: 16px;
        }
      }
    }

    &:last-of-type {
      &::before {
        bottom: auto;
        height: 32px;
      }
    }

    .timeline-item-time {
      font-size: var(--h3-font-size);
      font-weight: $font-weight-bold;
      
      @include media-breakpoint-up(md) {
        font-size: var(--h2-font-size);
        position: absolute;
        left: 0;
        top: 0;
        text-align: right;
        width: 80px;
      }
    }

    .timeline-item-info {
      background: var(--tpl-base-100);
      border-radius: $border-radius;
      flex: 1;
    }

    .timeline-ct {
      padding: $spacer $spacer*1.5;
    }    
  }
}

// Pricing
.acm-pricing {
  &.style-1 {
    // Feature
    .pricing-features {
      --headings-color: #fff;
      --color-secondary: #fff;
      --body-text-color: rgba(255,255,255,0.9);
      --body-link-color: #fff;
      --body-link-hover-color: var(--color-primary);
      background-repeat: no-repeat;
      background-position: center center;
      background-size: cover;
      background-color: var(--gray-900);
      color: var(--body-text-color);
      padding: $grid-gutter-width;
      position: relative;
      height: 100%;

      // Tablet view
      @include media-breakpoint-down(xl) {
        padding: $spacer-lg;
      }

      @include media-breakpoint-down(lg) {
        background-image: none!important;
      }

      .feature-inner {
        position: relative;
        z-index: 2;
      }

      // Title
      h2 {
        font-size: var(--h1-font-size);
        margin-top: 0;
      }

      .pricing-desc {
        margin-top: $spacer-lg;
      }

      .pricing-action {
        margin-top: $grid-gutter-width;

        @include media-breakpoint-down(lg) {
          margin-top: $grid-gutter-width / 2;
        }
      }

      // Mask
      &:before {
        background: rgba(0,0,0,0.5);
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
      }
    }

    // Item Pricing
    .pricing-item {
      border: 1px solid var(--gray-900);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 48px;
      height: 100%;

      // Tablet view
      @include media-breakpoint-down(xl) {
        padding: $spacer-lg;
      }

      // Title
      .header-intro {
        align-items: center;
        display: flex;
      }

      // Image
      .img-intro {
        margin-right: $spacer;
        flex: 0 0 40px;
        width: 40px;
      }

      // Title
      .pricing-title-info h3 {
        margin: 0;
        font-size: var(--h2-font-size);
      }

      // Description
      .pricing-desc {
        color: var(--gray-600);
        margin-top: $spacer;
      }

      // List Feature
      .pricing-plan-list {
        color: $headings-color;
        margin-top: $grid-gutter-width;

        // Tablet view
        @include media-breakpoint-down(xl) {
          margin-top: $grid-gutter-width / 2;
        }

        ul {
          list-style: none;
          padding: 0;
          margin: 0;

          li {
            &:before {
              content: "\f058";
              font-family: 'Font Awesome 5 Free';
              font-weight: 400;
              margin-right: 12px;
            }

            + li {
              margin-top: $spacer;
            }
          }
        }
      }

      // Pricing
      .pricing-plan-price {
        border-top: 1px solid var(--gray-900);
        margin-top: $grid-gutter-width;
        padding-top: $grid-gutter-width;
        font-feature-settings: 'pnum' on, 'lnum' on;

        // Tablet view
        @include media-breakpoint-down(xl) {
          margin-top: $grid-gutter-width / 2;
          padding-top: $grid-gutter-width / 2;
        }

        span {
          font-size: var(--h4-font-size);
        }
      }

      // Btn
      .pricing-action {
        margin-top: $grid-gutter-width * 2;

        // Tablet view
        @include media-breakpoint-down(xl) {
          margin-top: $grid-gutter-width;
        }

        @include media-breakpoint-down(sm) {
          margin-top: $spacer-lg;
        }
      }
    }
  }
}

// Team
.acm-team {
  // Style 1
  &.style-1 {
    .picture img {
      width: 100%;
    }
  }
}


// -----------------------------
// GALLERY
// -----------------------------
.acm-gallery.style-1 {
  .item-inner {
    position: relative;

    .item-media {
      border: 1px solid var(--t4-border-color);
      border-radius: $border-radius-lg;
      overflow: hidden;
      transition: all .35s ease-in-out;
      
      img {
        border-radius: $border-radius-lg;
        transition: transform 1.5s ease-in-out;
        -webkit-transition: transform 1.5s ease-in-out;
      }

      &:hover {
        box-shadow: 0 3px 5px rgba(0,0,0,0.1);

        img {
          transform: scale(1.05);
        }
      }
    }

    .item-title {
      a {
        --body-link-color: var(--body-text-color);
      }
    }

    .link-mask {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
  }
}

// Gallery style 2
// -------------------
.acm-gallery.style-2 {
  .item-media {
    position: relative;
  }

  .item-desktop-image {
    border: 1px solid var(--t4-border-color);
    border-radius: $border-radius;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    margin-bottom: 2rem;
  }

  .browser-bar {
    background: var(--gray-300);
    border-radius: $border-radius $border-radius 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 .5rem;
    height: 1rem;

    span {
      background: rgba(0,0,0,0.1);
      border-radius: $border-radius-pill;
      display: block;
      height: 6px;
      width: 6px;
    }
  }

  .item-view-port {
    position: relative;
    border-radius: 0 0 $border-radius $border-color;
    padding-bottom: 75%;
    overflow: hidden;

    img {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      max-width: 100%;
    }
  }

  .item-mobile-image {
    border-radius: 6px;
    border: 2px solid #495057;
    position: absolute;
    bottom: -1rem;
    top: 33.33%;
    right: 1rem;
    overflow: hidden;
    width: 25%;
  }

  .item-desc {
    margin: 0 auto;
    @include media-breakpoint-up(md) {
      width: 75%;
    }
  }
}

// Keyframe
// -----------------------------
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


// RTL language
// -----------------------------
html[dir="rtl"] {
  // ACM Hero style 1
  .acm-hero.style-1 {
    .acm-hero-item {
      &::after {
        background: linear-gradient(to left, rgba(0,0,0,0.6), rgba(0,0,0,0));
      }  
    }  
  }
}