/*
 * Community Module
 * ========================================================================
 * Styles for community content sections, including layout, animations,
 * and responsive behavior for highlighting key content.
 */

/* ==========================================================================
   Base Community Styles
   ========================================================================== */
.community-section {
  padding: 3.75rem 0;
  overflow: hidden;
}

.community-title {
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 3.438rem;
  margin-bottom: 1.875rem;

  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;
  }
}

/* Responsive Adjustments */
@media (max-width: 61.99875rem) {
  .community-section {
    padding: 2.5rem 0;
  }

  .community-title {
    font-size: 2.5rem;
    line-height: 3.438rem;
    margin-bottom: 1.25rem;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-size: 2.5rem;
      line-height: 3.438rem;
    }

    .font-serif {
      font-size: 3.438rem;
      line-height: 3.438rem;
    }
  }

  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}

.community-slider-container {
  position: relative;

  @media (max-width: 61.99875rem) {
    overflow: hidden;
  }

  .community-slider {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
  }

  .swiper-wrapper {
    display: flex;
  }

  .swiper-slide {
    box-sizing: border-box;
    width: 100%;
  }

  .community-slider-wrapper {
    width: 100%;
    height: 100%;
    max-width: 87.5rem;
    margin: 0 auto;
    padding-bottom: 1.875rem;
    overflow: hidden;
    box-sizing: border-box;
  }

  .community-card {
    border-radius: 1.25rem;
    border: 0.75rem solid rgba(var(--bs-primary-rgb), 0.05);
    display: flex;
    flex-direction: column;
  }
  .community-card-header {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 9.625rem;
    padding: 1.875rem 2.5rem;
    gap: 1.125rem;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    background: #dbdefb;
  }
  .community-card-header-image {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 0.625rem;
    object-fit: cover;
    object-position: center;
    flex: 0 0 auto;
  }
  .community-card-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
  }
  .community-card-title {
    font-weight: 400;
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: var(--bs-primary);
  }
  .community-card-position {
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: var(--bs-gray-600);
  }
  .community-card-content {
    padding: 1.875rem 1.375rem;
    background-color: var(--bs-white);
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
  }
  .community-card-description {
    display: flex;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.875rem;
    color: var(--bs-gray-800);
  }
  .community-card-description-icon {
    font-weight: 400;
    font-size: 3.438rem;
    line-height: 3.9375rem;
    color: var(--bs-primary);
  }
  .community-slider-button-next,
  .community-slider-button-prev {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 100%;
    padding: 0.375rem;
    border: 0.125rem solid var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bs-primary);
    &::after {
      font-size: 1.5rem;
      font-weight: 600;
    }
  }
  .community-slider-button-next {
    right: -4.375rem;
  }
  .community-slider-button-prev {
    left: -4.375rem;
  }
  @media (max-width: 93.75rem) {
    .community-slider-wrapper {
      width: 85%;
      overflow: hidden;
    }

    .community-slider-button-next {
      right: -1.375rem;
    }
    .community-slider-button-prev {
      left: -1.375rem;
    }
  }
  /* Hide navigation on tablet and mobile */
  @media (max-width: 61.99875rem) {
    .community-slider-wrapper {
      width: 100%;
      margin: 0;
      padding: 0;
      overflow: hidden;
      box-sizing: border-box;
    }
    .community-slider-button-next,
    .community-slider-button-prev {
      display: none;
    }
  }
  .community-slider-pagination {
    position: relative;
    bottom: 0;
    margin-top: 1.5rem;
    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);
    }
  }
}
