/**
 * @file
 * Photo Gallery Component styles for NextDC theme.
 */

/* Teal background for the photo gallery container */
.nextdc-photogallery-container .photogallery--container-background {
  background-color: #3BB7B3;
  /* Teal color */
  height: auto;
  min-height: 240px;
  position: absolute;
  width: 100%;
  z-index: -1;
  top: 0;
}

/* Header section with title, description, and button */
.nextdc-photogallery-header {
  padding: 96px 120px 0;
  position: relative;
  z-index: 1;
}

.nextdc-photogallery-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

/* Title section (left side) */
.nextdc-photogallery-title-section {
  flex: 1;
  min-width: 300px;
}

.nextdc-photogallery-title-section .label {
  font-family: "Jost", sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 120%;
  letter-spacing: 0.032em;
  color: #201850 !important;
  margin-bottom: 3rem;
}

/* Description text */
.nextdc-photogallery-description {
  font-family: "Jost", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
  letter-spacing: 0.032em;
  vertical-align: middle;
  color: #201850 !important;
}

.nextdc-photogallery-description p {
  font-family: "Jost", sans-serif !important;
  font-weight: 400 !important;
  font-size: 18px !important;
  line-height: 140% !important;
  letter-spacing: 0.032em !important;
  vertical-align: middle;
  color: #201850 !important;
}

/* Button section (right side) */
.nextdc-photogallery-button {
  flex-shrink: 0;
  align-self: flex-end;
  margin-top: 0;
  @media screen and (max-width: 768px) {
    align-self: flex-start;
  }
}

.nextdc-photogallery-button a {
  display: inline-block;
  padding: 14px 32px;
  background-color: #201850;
  color: #ffffff;
  font-family: "Jost", sans-serif;
  font-size: 16px;
  line-height: 130%;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.032em;
  border: 2px solid #201850;
  border-radius: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.nextdc-photogallery-button a:hover,
.nextdc-photogallery-button a:focus {
  background-color: #ffffff;
  color: #201850;
  text-decoration: none;
  border: none;
}

.nextdc-photogallery-button a:hover::before,
.nextdc-photogallery-button a:focus::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background-color: transparent;
  border: 2px solid #201850;
}

/* Gallery slider section */
.nextdc-photogallery-container .slider__cards-carousel-wrapper {
  padding: 40px 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Swiper slider styles */
.nextdc-photogallery-container .photogallery--slider.swiper {
  overflow: hidden;
  width: 100%;
}

.nextdc-photogallery-container .photogallery--slider .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.nextdc-photogallery-container .photogallery--slider .swiper-slide {
  height: auto;
  display: flex;
  width: auto;
  flex-shrink: 0;
}

.nextdc-photogallery-container .photogallery--slider .swiper-slide .fancybox-image-container {
  width: 100%;
  display: block;
}

.nextdc-photogallery-container .photogallery--slider .swiper-slide .fancybox-image-container a {
  display: block;
  width: 100%;
}

/* Image sizing - Desktop */
@media screen and (min-width: 1025px) {
  .nextdc-photogallery-container .photogallery--slider .swiper-slide  img {
    height: 330px;
    width: auto;
    max-width: 440px;
    object-fit: cover;
    display: block;
  }

  /* Slide width matches image width */
  .nextdc-photogallery-container .photogallery--slider .swiper-slide {
    width: auto;
  }
}

/* Image sizing - Mobile */
@media screen and (max-width: 1024px) {
  .nextdc-photogallery-container .photogallery--slider .swiper-slide  img {
    height: 264px;
    width: auto;
    max-width: 352px;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
  }

  /* Slide width matches image width */
  .nextdc-photogallery-container .photogallery--slider .swiper-slide {
    width: auto;
  }
}

/* Responsive styles */
@media screen and (max-width: 1024px) {
  .nextdc-photogallery-header {
    padding: 40px 60px 0;
  }

  .nextdc-photogallery-title-section .label {
    font-size: 40px;
  }

  .nextdc-photogallery-container .slider__cards-carousel-wrapper {
    padding: 32px 0px;
  }
}

@media screen and (max-width: 768px) {
  .nextdc-photogallery-header {
    padding: 48px 21px 0;
  }

  .nextdc-photogallery-header-content {
    flex-direction: column;
    gap: 24px;
    text-align: left;
  }

  .nextdc-photogallery-title-section {
    min-width: 100%;
  }

  .nextdc-photogallery-title-section .label {
    font-size: 32px;
    margin-bottom: 1.5rem;
  }

  .nextdc-photogallery-description {
    font-size: 16px;
    margin-top: 12px;
  }

  .nextdc-photogallery-button {
    width: auto;
  }

  .nextdc-photogallery-button a {
    width: auto;
    text-align: center;
  }

  .nextdc-photogallery-container .slider__cards-carousel-wrapper {
    padding: 24px 0px;
  }

  .nextdc-photogallery-container .photogallery--container-background {
    min-height: 200px;
  }
}

@media screen and (max-width: 576px) {

  .nextdc-photogallery-title-section .label {
    font-size: 28px;
  }

  .nextdc-photogallery-description {
    font-size: 14px;
  }

  .nextdc-photogallery-container .slider__cards-carousel-wrapper {
    padding: 20px 0px;
  }
}