/* Base container */
.group-collections {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
    background: #ffffff;
}

.group-collections__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.group-collections__content {
    position: relative;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: clamp(2rem, 4dvw, 4rem);
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 6dvh, 6rem);
}

/* Typography */
.group-collections__title {
    color: #253839;
    font-family: 'Adamina', serif;
    font-size: clamp(30px, 5vw, 80px);
    font-weight: 400;
    text-align: center;
    margin-bottom: clamp(2rem, 4dvh, 4rem);
    opacity: 0;
}

.group-collections__subtitle {
    color: #dcb77c;
    font-family: 'Tangerine', cursive;
    font-size: 23px;
    text-align: center;
    margin-bottom: 2rem;
}

/* Grid Layout - Desktop */
.group-collections__section {
    opacity: 0;
    margin-bottom: 4rem;
}

.group-collections__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 2vw, 2rem);
    padding: 0 clamp(1rem, 2vw, 2rem);
    width: 100%;
}

/* Desktop Image Sizes */
.group-collections__item {
    position: relative;
    border: 5px solid #155762;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

.group-collections__item--large {
    grid-column: span 4;
    height: clamp(500px, 70vh, 692px);
}

.group-collections__item--medium {
    grid-column: span 3;
    height: clamp(400px, 60vh, 517px);
}

.group-collections__item--small {
    grid-column: span 2;
    height: clamp(350px, 55vh, 511px);
}

.group-collections__item--tall {
    grid-column: span 3;
    height: clamp(450px, 65vh, 536px);
}

.group-collections__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Styles */
@media screen and (max-width: 767px) {
    .group-collections__content {
        padding: 1rem;
        gap: 2rem;
    }

    .group-collections__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    /* Hide fourth image in each grid */
    .group-collections__grid .group-collections__item:nth-child(4) {
        display: none;
    }

    /* Adjust sizes for first row */
    .group-collections__item--large {
        grid-column: span 1;
        height: clamp(180px, 35dvh, 220px);
    }

    .group-collections__item--medium {
        grid-column: span 1;
        height: clamp(160px, 30dvh, 200px);
    }

    .group-collections__item--small {
        grid-column: span 1;
        height: clamp(140px, 25dvh, 180px);
    }

    .group-collections__item--tall {
        grid-column: span 1;
        height: clamp(170px, 32dvh, 210px);
    }

    .group-collections__item {
        border-width: 2px;
    }

    /* Ensure proper section spacing */
    .group-collections__section {
        margin-bottom: 2rem;
    }
}

/* Additional fine-tuning for smaller screens */
@media screen and (max-width: 375px) {
    .group-collections__grid {
        gap: 0.5rem;
    }

    .group-collections__item--large {
        height: clamp(150px, 30dvh, 180px);
    }

    .group-collections__item--medium {
        height: clamp(130px, 25dvh, 160px);
    }

    .group-collections__item--small {
        height: clamp(120px, 22dvh, 150px);
    }

    .group-collections__item--tall {
        height: clamp(140px, 28dvh, 170px);
    }
}
/* RTL Support */
[dir="rtl"] .group-collections__content {
    direction: ltr; /* Maintain grid layout */
}

[dir="rtl"] .group-collections__title,
[dir="rtl"] .group-collections__subtitle {
    text-align: center; /* Maintain center alignment */
    direction: rtl;
}

[dir="rtl"] .group-collections__section {
    direction: rtl;
}

@media screen and (min-width: 1025px) {
    [dir="rtl"] .group-collections__grid {
        direction: rtl;
    }
}
/* Add these new rules to your existing CSS */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

.group-collections__item {
    background-color: #f5f5f5; /* Light grey placeholder while loading */
}