/* Opinie klientów: zachowujemy wejście kart po pojawieniu się sekcji w widoku. */
.home-contact-cta h2 em {
  color: #e96658;
}

.faq-intro h2 {
  margin-top: 42px;
}

/* Delikatnie podnosi wyłącznie lewą treść realizacji Calabrii. */
.case-study-modal--calabria .case-study-modal__copy {
  transform: translateY(-14px);
}

.portfolio-gallery__slot:has(img) {
  background: #e7e9e8;
  border-color: transparent;
}

.portfolio-gallery__slot:has(img)::before,
.portfolio-gallery__slot:has(img)::after {
  display: none;
}

.portfolio-gallery__slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease;
}

.portfolio-gallery__slot:has(img):hover img {
  transform: scale(1.035);
}

.portfolio-gallery__slot:has(img) span {
  color: #fff;
  text-shadow: 0 2px 10px rgb(0 0 0 / 55%);
}

@media (width <= 760px) {
  .case-study-modal--calabria .case-study-modal__copy {
    transform: translateY(-10px);
  }
}

.case-study-modal__gallery--interior .case-study-modal__gallery-grid figure,
.case-study-modal__gallery--social .case-study-modal__gallery-grid figure {
  flex: 0 0 calc(28.5714% - 10.2857px);
  min-height: 224px;
}

.case-study-modal--illegal-night .case-study-modal__gallery-grid figure,
.case-study-modal--aezakmi .case-study-modal__gallery-grid figure {
  flex: 0 0 calc(28.5714% - 10.2857px);
  height: auto;
  min-height: 224px;
}

/* Dyskretna podpowiedź, że kafelek otwiera podgląd galerii. */
@media (hover: hover) and (pointer: fine) {
  .case-study-modal__gallery-grid figure:has(img)::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    content: "";
    pointer-events: none;
    opacity: 0;
    background-color: rgb(24 32 29 / 78%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='5.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid rgb(255 255 255 / 50%);
    border-radius: 50%;
    box-shadow: 0 7px 22px rgb(0 0 0 / 18%);
    transform: translate(-50%, -50%) scale(.88);
    transition: opacity .22s ease, transform .28s cubic-bezier(.2, .8, .2, 1), background-color .22s ease;
  }

  .case-study-modal__gallery-grid figure:has(img):hover::after,
  .case-study-modal__gallery-grid figure:has(img):focus-within::after {
    opacity: 1;
    background-color: rgb(24 32 29 / 88%);
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (width <= 740px) {
  .case-study-modal__gallery--interior .case-study-modal__gallery-grid figure,
  .case-study-modal__gallery--social .case-study-modal__gallery-grid figure {
    flex-basis: calc(66.6667% - 6.66667px);
    min-height: 224px;
  }

  .case-study-modal--illegal-night .case-study-modal__gallery-grid figure,
  .case-study-modal--aezakmi .case-study-modal__gallery-grid figure {
    flex-basis: calc(66.6667% - 6.66667px);
    min-height: 224px;
  }
}

.testimonials-section .testimonial-card {
  animation: none;
  filter: none;
  will-change: opacity, transform;
  transition: box-shadow .48s, border-color .48s !important;
}

.testimonials-section.testimonials-reveal-ready .testimonial-card {
  opacity: var(--testimonial-opacity, 0) !important;
  transform: translateY(calc((1 - var(--testimonial-progress, 0)) * 54px)) scale(calc(.98 + var(--testimonial-progress, 0) * .02)) !important;
}
