/* Gallery Container */
.c-gallery-container {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Masonry Grid Layout */
.c-gallery-grid {
    column-count: 4;
    column-gap: 0.5rem;
    width: 100%;
    max-width: none;
}

/* Gallery Items */
.c-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: transparent;
    cursor: pointer;
    break-inside: avoid;
    display: inline-block;
    margin-bottom: 0.35rem;
    width: 100%;
}

.c-gallery-item:hover {
    transform: none;
    box-shadow: none;
}

/* Image Styles */
.c-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 300ms ease-in-out;
    opacity: 0;
}

.c-gallery-image.c-loaded {
    opacity: 1;
    transition: transform 300ms ease-in-out, opacity 0.5s ease;
}

.c-gallery-item:hover .c-gallery-image {
    transform: scale(1.1);
}

/* Image Placeholder with Loader */
.c-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.c-loader {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #666666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive grid adjustments */
/* Extra large screens */
@media (min-width: 1400px) {
    .c-gallery-grid {
        column-count: 5;
    }
}

/* Large screens */
@media (min-width: 1200px) and (max-width: 1399px) {
    .c-gallery-grid {
        column-count: 4;
    }
}

/* Medium screens */
@media (min-width: 992px) and (max-width: 1199px) {
    .c-gallery-grid {
        column-count: 4;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .c-gallery-grid {
        column-count: 3;
    }
}

/* Mobile landscape */
@media (min-width: 576px) and (max-width: 767px) {
    .c-gallery-grid {
        column-count: 2;
    }
}

/* Mobile portrait */
@media (max-width: 575px) {
    .c-gallery-grid {
        column-count: 1;
    }
}