/* Flex: дозволити прокрутку тексту в колонці однакової висоти (BS + TW) */
/* Flex column: allow inner scroll in equal-height grid */
.portfolio-v8-item {
    min-height: 0;
}

.portfolio-v8-box {
    min-height: 0;
}

.portfolio-v8-tech {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portfolio-v8-tech:hover {
    transform: scale(1.05);
}

/* Card hover: lift up + scale */
.portfolio-item-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item-hover:hover {
    transform: translateY(-0.5rem) scale(1.05);
}

/* Image: zoom on card hover */
.portfolio-item-hover .portfolio-img-hover {
    transition: transform 0.5s ease;
}
.portfolio-item-hover:hover .portfolio-img-hover {
    transform: scale(1.1);
}

/* min-width: 0 — довгий текст/флекс у колонці не роздуває рядок */
.content-col-grow {
    min-width: 0;
}

.content-stack-col--text {
    overflow-wrap: anywhere;
}

.content-stack-col--text > :first-child {
    width: 100%;
    max-width: 65ch;
    margin-inline: auto;
}

/* gap лише для Tailwind (grid). У Bootstrap — відступи через g-* у component (row-cols + g-3), без CSS gap на .row */
.content-grid-gap:not(.row) {
    gap: 1rem;
}

.content-full-frame {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.content-section-pad {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Третина рядка: стабільна висота прев’ю, без height:100% від сусіднього тексту */
.content-img-fullheight {
    display: block;
    width: 100%;
    max-width: min(100%, 28rem);
    margin-inline: auto;
    min-width: 0;
    aspect-ratio: 3 / 4;
    max-height: 28rem;
    height: auto;
    flex-shrink: 1;
    object-fit: cover;
    object-position: center;
}

.gallery-masonry__card {
    transition: all 0.3s ease;
}

.gallery-masonry__card:hover {
    transform: scale(1.05);
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
}

.gallery-masonry__img {
    transition: transform 0.3s ease;
}

.gallery-masonry__card:hover .gallery-masonry__img {
    transform: scale(1.05);
}

.gallery-masonry__overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2), transparent);
}

.gallery-masonry__card:hover .gallery-masonry__overlay {
    opacity: 1;
}

/* Bootstrap Grid Fallbacks */
.gallery-masonry__grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .gallery-masonry__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-masonry__card--large {
    grid-row: span 2;
    height: 100%;
}

.gallery-masonry__media--square {
    aspect-ratio: 1 / 1;
}

.gallery-masonry__media--full {
    height: 100%;
    min-height: 100%;
}

/* Декор картки + великі лапки — позиціонування; розміри медіа в @sem */
.quote-decor-a {
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  transform: translate(4rem, -4rem);
  opacity: 0.3;
}

.quote-decor-b {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 6rem;
  height: 6rem;
  transform: translate(-3rem, 3rem);
  opacity: 0.3;
}

.quote-mark {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 6rem;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  opacity: 0.2;
}

