.mgm-gallery-container {
    width: 100%;
    margin: 20px 0;
}

.mgm-gallery {
    width: 100%;
    margin-bottom: 30px;
}

.mgm-gallery-grid {
    width: 100%;
    position: relative;
}

.mgm-gallery-item {
    float: left;
    box-sizing: border-box;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mgm-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.mgm-gallery-item img,
.mgm-gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

.mgm-gallery-item a {
    display: block;
    text-decoration: none;
}

.mgm-item-info {
    padding: 15px;
    background: #fff;
}

.mgm-item-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mgm-item-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 767px) {
    .mgm-gallery-item {
        width: 100% !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .mgm-gallery[data-columns="3"] .mgm-gallery-item,
    .mgm-gallery[data-columns="4"] .mgm-gallery-item,
    .mgm-gallery[data-columns="5"] .mgm-gallery-item,
    .mgm-gallery[data-columns="6"] .mgm-gallery-item {
        width: calc(50% - 10px) !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .mgm-gallery[data-columns="4"] .mgm-gallery-item,
    .mgm-gallery[data-columns="5"] .mgm-gallery-item,
    .mgm-gallery[data-columns="6"] .mgm-gallery-item {
        width: calc(33.333% - 10px) !important;
    }
}

/* Loading State */
.mgm-gallery-grid.loading {
    opacity: 0.5;
}

.mgm-gallery-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Video Styles */
.mgm-gallery-item video {
    background: #000;
}

.mgm-gallery-item video::-webkit-media-controls {
    z-index: 1;
}

/* Clearfix */
.mgm-gallery-grid::after {
    content: '';
    display: table;
    clear: both;
}