/* --- Grid Items (Original Project/List Layout) --- */
.grid-item {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
}

.item-header {
    border-top: var(--line-thickness) solid var(--color-text-main);
    padding-top: 1.25rem;
}

.item-image {
    height: 37.5rem;
    overflow: hidden;
}

.item-image.small {
    height: 25rem;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.item-image:hover img {
    transform: scale(1.05);
}

.heading-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.project-image {
    width: 40%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.image-wrapper img:first-child {
    opacity: 1;
}

/* --- Brand Items --- */
.brand-item {
    display: flex;
    flex-direction: column;
}

.brand-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--color-bg-dark);
}

/* When explicit height is set, disable aspect-ratio to prevent conflicts */
.brand-image-wrap[class*="h-"] {
    /* aspect-ratio: unset */
}

.brand-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.brand-item:hover .brand-image-wrap img {
    transform: scale(1.05);
}

.brand-image-square {
    height: 15rem;
    width: 15rem;
    margin-top: 4rem;
}

.icon-xs {
    width: 0.875rem;
    height: 0.875rem;
}

.group:hover .group-hover\:translate-y-1 {
    transform: translateY(0.25rem);
}

/* --- Parallax Image System --- */
[data-parallax] {
    overflow: hidden;
    position: relative;
}

[data-parallax] img {}

/* Disable hover scale on parallax images (parallax handles transform) */
.brand-item:hover [data-parallax] img {
    transform: none;
}

.text-over-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 991px) {
    .col-span-2.brand-item {
        grid-column: span 6;
    }
}