/**
 * Frontend styles for Image Gallery Rows
 */

.igr-gallery {
    margin: 20px 0;
}

.igr-gallery-title {
    margin-bottom: 10px;
    font-size: 1.5em;
}

.igr-gallery-description {
    margin-bottom: 20px;
    color: #666;
}

.igr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--igr-columns, 3), 1fr);
    gap: var(--igr-spacing, 10px);
    width: 100%;
}

/* Responsive columns */
@media (max-width: 1200px) {
    .igr-gallery-grid {
        grid-template-columns: repeat(min(var(--igr-columns, 3), 4), 1fr);
    }
}

@media (max-width: 992px) {
    .igr-gallery-grid {
        grid-template-columns: repeat(min(var(--igr-columns, 3), 3), 1fr);
    }
}

@media (max-width: 768px) {
    .igr-gallery-grid {
        grid-template-columns: repeat(min(var(--igr-columns, 3), 2), 1fr);
    }
}

@media (max-width: 480px) {
    .igr-gallery-grid {
        grid-template-columns: 1fr;
    }
}

.igr-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
    aspect-ratio: 1;
}

.igr-gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.igr-gallery-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.igr-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.igr-gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.igr-gallery-item:hover .igr-gallery-item-overlay {
    transform: translateY(0);
}

.igr-gallery-item-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
}

.igr-gallery-item-description {
    margin: 0;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Lightbox styles */
.igr-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.igr-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.igr-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
}

.igr-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.igr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.igr-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.igr-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 1000000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.igr-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.igr-lightbox-prev {
    left: 20px;
}

.igr-lightbox-next {
    right: 20px;
}

.igr-lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
    max-width: 80%;
    text-align: center;
}

