/*
 * Case Studies Module
 * ========================================================================
 * Styles for displaying case study listings and individual case study items
 * Includes responsive layouts and interactive elements for better user experience
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.case-study-section {
  padding: 3.75rem 0;
}

@media (max-width: 61.99875rem) {
  .case-study-section {
    padding: 3.125rem 0;
  }
  .case-study-section .button-wrapper .btn {
    width: 100%;
  }
}

.case-study-column-layout {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
.case-study-row-layout {
  display: flex;
  flex-direction: row;
  gap: 2.25rem;
}
.case-study-tag-name {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.25rem;
  text-transform: uppercase;
}

.case-study-title {
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 3.438rem;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 400;
    font-size: 2.5rem;
    line-height: 3.438rem;
    margin-bottom: 0;
  }
  p {
    margin-bottom: 0;
  }
  span {
    color: var(--bs-primary);
  }

  .font-serif {
    font-size: 3.438rem;
    line-height: 3.438rem;
    font-weight: 400;
  }
}
.title-wrapper {
  display: flex;
  gap: 1.875rem;
  flex: 0 0 auto;
}
.title-content {
  flex: 0 0 auto;
}
.case-study-column-layout {
  color: var(--bs-gray-800);
  .case-study-tag-name {
    color: var(--bs-primary-900);
  }
  .case-study-title {
    color: var(--bs-gray-800);
    span {
      color: var(--bs-primary);
    }
  }
  .title-wrapper {
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    .title-content {
      width: 66.66666667%;
    }
  }
  .case-study-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}
.case-study-row-layout {
  color: var(--bs-white);
  .case-study-tag-name {
    color: var(--bs-white);
  }
  .case-study-title {
    span {
      color: var(--bs-secondary);
    }
  }
  .title-wrapper {
    flex-direction: column;
    width: 41.66666667%;
  }
}

@media (max-width: 61.99875rem) {
  .case-study-title {
    font-size: 2.125rem;
    line-height: 2.75rem;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-size: 2.125rem;
      line-height: 2.75rem;
    }

    .font-serif {
      font-size: 2.875rem;
      line-height: 2.75rem;
    }
  }
  .case-study-column-layout {
    flex-direction: column;
    .title-wrapper {
      width: 100%;
      flex-direction: column;
      align-items: stretch;
      .title-content {
        width: 100%;
      }
    }
    .case-study-container {
      grid-template-columns: repeat(1, 1fr);
    }
  }
  .case-study-row-layout {
    flex-direction: column;
    .title-wrapper {
      width: 100%;
      flex-direction: column;
      .title-content {
        width: 100%;
      }
    }
  }
}
.case-study-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.case-study-item-category {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.25rem;
  text-transform: uppercase;
  color: var(--bs-gray-500);
}
.case-study-item-title {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.875rem;
  color: var(--bs-gray-800);
  margin-bottom: 0;
  a {
    color: var(--bs-gray-800);
  }
}

.case-study-item-date {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.25rem;
  color: var(--bs-primary-900);
  text-transform: uppercase;
  a {
    color: var(--bs-primary-900);
  }
}
.case-study-item-description {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.25rem;
  color: var(--bs-gray-600);
}

.case-study-slider-container {
  position: relative;
  width: 58.33333333%;

  @media (max-width: 61.99875rem) {
    margin: 0 -0.0625rem;
    flex-grow: 1;
    width: auto;
  }

  .case-study-slider-wrapper {
    width: 100%;
    height: 100%;
    max-width: 87.5rem;
    margin: 0 auto;
    padding-bottom: 2.875rem;
    overflow: hidden;
    @media (max-width: 61.99875rem) {
      max-width: 100%;
      padding-left: 1rem;
      padding-right: 1rem;
    }
  }
  .swiper-slide {
    padding: 0.75rem;
    height: auto;
    max-width: 16.5rem;
    width: 100%;
  }
  .case-study-card {
    border-radius: 1.25rem;
    box-shadow: 0 0 0 0.75rem rgba(var(--bs-white-rgb), 0.15);
    display: flex;
    flex-direction: column;
    background-color: var(--bs-white);
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.875rem 0.625rem;
    text-align: center;
    height: 100%;

    .case-study-item-title {
      font-size: 1.25rem;
      font-weight: 400;
      line-height: 1.875rem;
      color: var(--bs-gray-800);
      a {
        color: var(--bs-gray-800);
      }
    }
  }

  .case-study-slider-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    .swiper-pagination-bullet {
      margin: 0;
      width: 1.5rem;
      height: 0.625rem;
      border-radius: 0.125rem;
      background-color: var(--bs-primary-100);
      transition: var(--bs-transition-slow);
      opacity: 1;
    }
    .swiper-pagination-bullet-active {
      width: 3.375rem;
      background-color: var(--bs-primary);
    }
  }
}

.case-study-section[style*="background-color: #fff"] + .styled-card-section,
.case-study-section[style*="background-color:#fff"] + .styled-card-section,
.case-study-section[style*="background-color: #ffffff"] + .styled-card-section,
.case-study-section[style*="background-color:#ffffff"] + .styled-card-section {
  .container .styled-card {
    margin-top: 0;
  }
}
