/* Post-cutover UI polish. Keep these overrides narrowly scoped so the existing layouts stay intact. */

/* Home: keep gallery presentation cards compact and deterministic.
   Every title occupies exactly one line and longer titles are truncated with
   an ellipsis. Since thumbnail, paddings and metadata are then identical,
   every gallery card gets the same natural height without stretching rows. */
#gallery .gallerySlider .swiper-slide {
  display: flex;
  height: auto;
}

#gallery .gallerySlider .card-gallery {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#gallery .gallerySlider .card-gallery-info {
  display: block;
  flex: 0 0 auto;
}

#gallery .gallerySlider .card-gallery-info h4,
#gallery .gallerySlider .card-gallery-info h3 {
  display: block;
  height: 24px;
  min-height: 24px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#gallery .gallerySlider .card-gallery-data {
  margin-top: 20px;
  padding-top: 0;
}

/* Home: reduce the double 80px + 80px gaps between consecutive sections. */
#possibilities.section-padding {
  padding-bottom: 48px;
}

#gallery.section-padding,
#tools.section-padding,
#cases.section-padding,
#statistics.section-padding,
#efficiency.section-padding {
  padding-top: 48px;
  padding-bottom: 48px;
}

#faq.faq-section.section {
  margin-top: 72px;
}

#join.trust-section {
  margin-top: 56px;
}

/* Home / Statistics: the world map is decorative background; users/avatars stay above it. */
#statistics .statistics-count,
#statistics .statistics-user {
  position: relative;
  z-index: 2;
}

#statistics .statistics-map {
  z-index: 1;
  pointer-events: none;
}

/* Home / Tools: use one predictable cover height without stretching the image. */
#tools .tools-photo {
  height: 292px;
  overflow: hidden;
  border-radius: 12px;
}

#tools .tools-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Catalog sort: anchors were inheriting browser link/visited colours (purple in dark mode). */
.sort-select .c-select-options li a {
  display: block;
  flex: 1 1 auto;
  color: var(--text-color);
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sort-select .c-select-options li.active a,
.sort-select .c-select-options li:hover a {
  color: var(--accent-color);
}

@media (max-width: 767px) {
  #gallery .gallerySlider .card-gallery-info h4,
  #gallery .gallerySlider .card-gallery-info h3 {
    height: 20px;
    min-height: 20px;
  }

  #possibilities.section-padding {
    padding-bottom: 40px;
  }

  #gallery.section-padding,
  #tools.section-padding,
  #cases.section-padding,
  #statistics.section-padding,
  #efficiency.section-padding {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  #faq.faq-section.section {
    margin-top: 48px;
  }

  #join.trust-section {
    margin-top: 48px;
  }
}

@media (max-width: 576px) {
  .sort-select .c-select-options li a {
    font-size: 14px;
    line-height: 18px;
  }
}
