
/* alkasbah/assets/css/gallery-masonry.css */
.gallery-masonry {
   /* background: var(--bg-color, #f8f8f8);*/
    padding: 4rem 0;
}

.masonry-grid {
    columns: 4 300px;
    column-gap: 1.5rem;
    padding: 1.5rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transform: translateZ(0);
}

.item-content {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.item-content img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-btn {
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.zoom-btn i {
    color: #333;
    font-size: 1.2rem;
}

/* Hover effects */
.item-content:hover {
    transform: translateY(-5px);
}

.item-content:hover .item-overlay {
    opacity: 1;
}

.item-content:hover .zoom-btn {
    transform: scale(1);
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 1200px;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-next,
.lightbox-prev {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    padding: 1rem;
    font-size: 2rem;
    transition: color 0.3s ease;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox button:hover {
    color: #ddd;
}

.caption-container {
    color: white;
    padding: 1rem;
    text-align: center;
}

/* Animaciones */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.masonry-item {
    animation: fadeUp 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .masonry-grid {
        columns: 2 200px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        columns: 1;
    }
}