/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Design Tokens */
:root {
  /* Colors */
  --geoproof-color-primary: #2d2330;
  --geoproof-color-secondary: #736d75;
  --geoproof-color-background: #f0f0f0;
  --geoproof-color-white: #fff;
  --geoproof-color-border: #f7f7f7;
  --geoproof-color-hover: rgb(0 0 0 / 6%);

  /* Typography */
  --geoproof-font-size-xxl: 32px;
  --geoproof-font-size-xl: 24px;
  --geoproof-font-size-lg: 18px;
  --geoproof-font-size-md: 16px;
  --geoproof-font-size-sm: 14px;
  --geoproof-font-weight-normal: 400;
  --geoproof-font-weight-medium: 500;
  --geoproof-font-weight-semibold: 600;
  --geoproof-font-weight-bold: 700;
  --geoproof-line-height: 1.5;

  /* Spacing */
  --geoproof-spacing-xxl: 70px;
  --geoproof-spacing-xl: 34px;
  --geoproof-spacing-lg: 30px;
  --geoproof-spacing-md: 25px;
  --geoproof-spacing-sm: 18px;
  --geoproof-spacing-xs: 16px;
  --geoproof-spacing-xxs: 10px;
  --geoproof-spacing-tiny: 5px;

  /* Border Radius */
  --geoproof-radius-lg: 12px;
  --geoproof-radius-md: 10px;
  --geoproof-radius-sm: 6px;

  /* Container */
  --geoproof-container-width: 1180px;
  --geoproof-container-padding: 20px;

  /* Component Specific */
  --geoproof-map-height: 170px;
  --geoproof-thumbnail-size: 50px;
  --geoproof-gallery-main-width: 72%;
  --geoproof-gallery-thumb-width: 28%;
}

/* Main wrapper - full width */
.geoproof-wrapper {
  width: 100%;
  background-color: var(--geoproof-color-background);
  padding: var(--geoproof-spacing-xxl) 0;
}

/* Main container */
.geoproof-content {
  margin: 0 auto;
  padding: 0 var(--geoproof-container-padding);
  max-width: var(--geoproof-container-width);
  width: 100%;
}

/* Map styles */
.geoproof-map {
  margin-bottom: var(--geoproof-spacing-lg);
  border-radius: var(--geoproof-radius-lg);
  border: var(--geoproof-spacing-xxs) solid var(--geoproof-color-border);
}

.geoproof-map-title {
  color: var(--geoproof-color-primary) !important;
  font-size: var(--geoproof-font-size-xxl) !important;
  letter-spacing: -0.04em !important;
  line-height: 1.3 !important;
  text-align: center;
  margin-top: 0;
  margin-bottom: var(--geoproof-spacing-lg);
}

/* Grid Layout Styles */
.geoproof-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--geoproof-spacing-lg);
}

/* Slider Layout Styles */
.geoproof-slider-layout {
  position: relative;
  padding: 0 var(--geoproof-spacing-md);
  margin-bottom: var(--geoproof-spacing-lg);
}

.geoproof-slider-layout .swiper-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding-bottom: var(--geoproof-spacing-xl); /* Add space for pagination */
}

.geoproof-slider-layout .swiper-slide {
  height: auto; /* Allow slides to determine their own height */
  display: flex; /* For equal height */
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.7;
}

.geoproof-slider-layout .swiper-slide-active,
.geoproof-slider-layout .swiper-slide-next {
  opacity: 1;
}

.geoproof-slider-layout .swiper-slide .geoproof-item {
  width: 100%; /* Ensure the item takes full width of the slide */
  display: flex;
  flex-direction: column;
  height: 100%; /* Take full height of the slide */
}

.geoproof-slider-layout .geoproof-item h3 {
  flex-shrink: 0; /* Prevent title from shrinking */
}

.geoproof-slider-layout .geoproof-item time {
  flex-shrink: 0; /* Prevent date from shrinking */
}

.geoproof-slider-layout .geoproof-content-wrapper {
  /* flex-grow: 1; Allow content to grow and fill space */
}

.geoproof-slider-layout .geoproof-description {
  /* margin-top: auto; Push description to bottom if content is shorter */
}

/* Navigation Arrows */
.geoproof-slider-layout .swiper-button-next,
.geoproof-slider-layout .swiper-button-prev {
  color: var(--geoproof-color-primary);
  background-color: var(--geoproof-color-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: -20px;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.geoproof-slider-layout .swiper-button-next:hover,
.geoproof-slider-layout .swiper-button-prev:hover {
  opacity: 1;
  transform: scale(1.05);
}

.geoproof-slider-layout .swiper-button-next:after,
.geoproof-slider-layout .swiper-button-prev:after {
  font-size: 18px;
  font-weight: bold;
}

/* Pagination */
.geoproof-slider-layout .swiper-pagination {
  position: absolute;
  bottom: 0 !important;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.geoproof-slider-layout .swiper-pagination-bullet {
  background: var(--geoproof-color-secondary);
  opacity: 0.5;
  margin: 0 5px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.geoproof-slider-layout .swiper-pagination-bullet:hover {
  opacity: 0.8;
}

.geoproof-slider-layout .swiper-pagination-bullet-active {
  background: var(--geoproof-color-primary);
  opacity: 1;
  transform: scale(1.2);
}

/* Listings styles - shared between grid and slider */
#geoproof-list {
  margin-bottom: var(--geoproof-spacing-lg);
}

.geoproof-item {
  background: var(--geoproof-color-white);
  border-radius: var(--geoproof-radius-lg);
  padding: var(--geoproof-spacing-xl);
  transition: transform 0.2s ease;
}

.geoproof-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 35px 0 var(--geoproof-color-hover);
}

.geoproof-item h3 {
  margin-top: 0 !important;
  font-size: var(--geoproof-font-size-xl) !important;
  line-height: var(--geoproof-font-size-xl) !important;
  font-weight: var(--geoproof-font-weight-bold) !important;
  color: var(--geoproof-color-primary) !important;
  margin-bottom: 3px !important;
}

.geoproof-item time {
  font-size: var(--geoproof-font-size-sm);
  font-weight: var(--geoproof-font-weight-normal);
  line-height: 2;
  color: var(--geoproof-color-secondary);
  margin-bottom: var(--geoproof-spacing-md);
  display: block;
}

.geoproof-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--geoproof-spacing-xs);
  margin-bottom: var(--geoproof-spacing-md);
}

.geoproof-content-wrapper:last-child {
  margin-bottom: 0;
}

/* Image styles */
.geoproof-image-container {
  display: flex;
  gap: var(--geoproof-spacing-sm);
  margin-bottom: 0;
}

.geoproof-image,
.geoproof-image-container > picture > img,
.geoproof-image-container > picture > source + img {
  width: var(--geoproof-gallery-main-width);
  height: var(--geoproof-map-height);
  object-fit: cover;
  border-radius: var(--geoproof-radius-md);
}

/* Make sure picture element doesn't break layout */
.geoproof-image-container > picture {
  width: var(--geoproof-gallery-main-width);
  display: block;
}

.geoproof-thumbnails {
  width: var(--geoproof-gallery-thumb-width);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, var(--geoproof-thumbnail-size));
  grid-gap: var(--geoproof-spacing-xxs);
  margin-top: 0;
}

.geoproof-thumbnails img,
.geoproof-thumbnails picture img,
.geoproof-thumbnails picture source + img {
  width: 100%;
  height: var(--geoproof-thumbnail-size);
  object-fit: cover;
  border-radius: var(--geoproof-radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

/* Picture element container for thumbnails */
.geoproof-thumbnails picture {
  display: block;
  width: 100%;
  height: var(--geoproof-thumbnail-size);
}

.geoproof-thumbnails img:hover,
.geoproof-thumbnails picture img:hover {
  border-color: var(--geoproof-color-primary-light);
}

.geoproof-thumbnails img.active,
.geoproof-thumbnails picture img.active {
  border-color: var(--geoproof-color-primary);
  box-shadow: 0 0 0 1px var(--geoproof-color-primary);
}

/* Location map styles */
.geoproof-map-container {
  width: 100%;
}

.geoproof-single-map {
  height: var(--geoproof-map-height);
  border-radius: var(--geoproof-radius-md);
  border: none;
  width: 100%;
}

/* Description styles */
.geoproof-description {
  font-size: var(--geoproof-font-size-md);
  color: var(--geoproof-color-primary);
  position: relative;
  padding: 12px 0 0 0;
}

.geoproof-description:before,
.geoproof-description:after {
  content: "";
  position: absolute;
  width: 30px;
  height: 20px;
  z-index: 0;
  background-size: contain;
  background-repeat: no-repeat;
}

.geoproof-description:before {
  left: 0;
  top: 0;
  background-image: url("../images/quote-start.svg");
}

.geoproof-description:after {
  right: 0;
  bottom: 5px;
  background-image: url("../images/quote-end.svg");
}

.geoproof-description p {
  margin: 0;
  position: relative;
  z-index: 1;
  line-height: 1.8 !important;
  color: var(--geoproof-color-secondary) !important;
  font-weight: var(--geoproof-font-weight-normal) !important;
}

/* Loader styles */
#geoproof-loader {
  text-align: center;
  padding: var(--geoproof-container-padding);
}

#geoproof-loader .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--geoproof-color-primary);
  border-radius: 50%;
  animation: geoproof-spin 1s linear infinite;
  margin-right: var(--geoproof-spacing-xxs);
  vertical-align: middle;
}

@keyframes geoproof-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive styles for small screens */
@media (max-width: 768px) {
  :root {
    --geoproof-map-height: 150px;
    --geoproof-spacing-xl: 25px;
  }

  .geoproof-grid-layout {
    grid-template-columns: 1fr;
  }

  .geoproof-image-container {
    flex-direction: column;
  }

  .geoproof-image,
  .geoproof-image-container > picture,
  .geoproof-image-container > picture > img,
  .geoproof-image-container > picture > source + img {
    width: 100%;
    margin-bottom: var(--geoproof-spacing-xxs);
  }

  .geoproof-thumbnails {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  /* Responsive slider adjustments */
  .geoproof-slider-layout .swiper-button-next,
  .geoproof-slider-layout .swiper-button-prev {
    width: 30px;
    height: 30px;
    margin-top: -15px;
  }

  .geoproof-slider-layout .swiper-button-next:after,
  .geoproof-slider-layout .swiper-button-prev:after {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --geoproof-spacing-xl: 20px;
    --geoproof-font-size-xl: 20px;
  }

  .geoproof-thumbnails {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, var(--geoproof-thumbnail-size));
  }

  .geoproof-description {
    padding: 0 var(--geoproof-spacing-xs);
  }

  /* Smaller screens slider adjustments */
  .geoproof-slider-layout {
    padding: 0;
  }

  .geoproof-slider-layout .swiper-button-next,
  .geoproof-slider-layout .swiper-button-prev {
    display: none;
  }
}

/* Lightbox styles */
.geoproof-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 999999;
  justify-content: center;
  align-items: center;
}

.geoproof-lightbox.active {
  display: flex;
}

.geoproof-lightbox-content {
  max-width: 90%;
  max-height: 90%;
}

.geoproof-lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--geoproof-radius-sm);
}

.geoproof-lightbox-close {
  position: absolute;
  top: var(--geoproof-spacing-xs);
  right: var(--geoproof-container-padding);
  color: var(--geoproof-color-white);
  font-size: var(--geoproof-spacing-lg);
  cursor: pointer;
}

.geoproof-lightbox-prev,
.geoproof-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--geoproof-color-white);
  font-size: var(--geoproof-spacing-lg);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.geoproof-lightbox-prev {
  left: var(--geoproof-container-padding);
}

.geoproof-lightbox-next {
  right: var(--geoproof-container-padding);
}
