/*
Theme Name: SVEC Child Theme
Template: gutenify-nox
Version: 1.0
*/

/* ===== Car Gallery ===== */

/* Desktop / tablet layout: 5 columns */

/* Center the gallery */
.gtfy-car-gallery,
.nfd-wb-gallery__gallery-19 {
  margin-left: auto !important;
  margin-right: auto !important;
}

.gtfy-car-gallery .wp-block-columns.is-layout-flex,
.nfd-wb-gallery__gallery-19 .wp-block-columns.is-layout-flex {
  justify-content: center !important;
}


.nfd-wb-gallery__gallery-19 .wp-block-columns.is-layout-flex,
.gtfy-car-gallery .wp-block-columns.is-layout-flex {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin: 0 !important;
}

.nfd-wb-gallery__gallery-19 .wp-block-columns > .wp-block-column,
.gtfy-car-gallery .wp-block-columns > .wp-block-column {
    flex: 0 0 calc(20% - 4px) !important;
    max-width: calc(20% - 4px) !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    margin: 0 !important;
}

.nfd-wb-gallery__gallery-19 .wp-block-image,
.gtfy-car-gallery .wp-block-image {
    position: relative !important;
    margin: 0 !important;
    width: 100% !important;
}

.nfd-wb-gallery__gallery-19 .wp-block-image img,
.gtfy-car-gallery .wp-block-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
}

/* Vertical spacing inside columns */
.nfd-wb-gallery__gallery-19 .wp-block-column > *,
.gtfy-car-gallery .wp-block-column > * {
    margin-block-start: 5px !important;
    margin-block-end: 0 !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
}

.nfd-wb-gallery__gallery-19 .wp-block-column > *:first-child,
.gtfy-car-gallery .wp-block-column > *:first-child {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}

/* Mobile only: 2 columns */
@media (max-width: 781px) {
    .nfd-wb-gallery__gallery-19 .wp-block-columns > .wp-block-column,
    .gtfy-car-gallery .wp-block-columns > .wp-block-column {
        flex: 0 0 calc(50% - 3px) !important;
        max-width: calc(50% - 3px) !important;
    }
}

/* ===== Theme crawl (readable scroll, full width, theme styling) ===== */
.theme-crawl {
  position: relative;
  width: 100%;
  max-width: none;
  height: 50vh;
  min-height: 320px;
  max-height: 720px;
  margin: 0;
  overflow: hidden;
  background: transparent;
  color: inherit;
  font-family: inherit;
}

.theme-crawl__perspective {
  position: absolute;
  inset: 0;
  perspective: 400px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 0 2rem;
  box-sizing: border-box;
}

.theme-crawl__content {
  position: relative;
  top: 100%;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 2rem;
  box-sizing: border-box;
  text-align: justify;
  transform-origin: 50% 100%;
  transform: rotateX(12deg);
  animation: theme-crawl 35s linear infinite !important;
  color: inherit;
  font-family: inherit;
  font-size: 1.1em;
  font-weight: 600; /* semi-bold */
  line-height: 1.45;
}

.theme-crawl__title {
  text-align: center;
  margin-bottom: 1.5em;
}

.theme-crawl__title p {
  margin: 0 0 0.4em;
  font-size: 0.95em;
  font-weight: 600;
  opacity: 0.85;
}

.theme-crawl__title h2 {
  margin: 0 0 1.25em;
  font-size: 1.4em;
  font-weight: 600;
  text-transform: none;
  color: inherit;
}

.theme-crawl__content p {
  margin: 0 0 1.1em;
  color: inherit;
  font-weight: 600;
}

@keyframes theme-crawl {
  0% {
    top: 100%;
  }
  100% {
    top: -120%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .theme-crawl__content {
    animation: none;
    top: 10%;
    transform: none;
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 781px) {
  .theme-crawl {
    height: 50vh;
  }

  .theme-crawl__perspective {
    padding: 0 1.25rem;
  }

  .theme-crawl__content {
    animation-duration: 40s;
    padding: 0 1.25rem;
    transform: rotateX(10deg);
  }
}