/**
 * Event Gallery Frontend Styles
 */

/* Events List */
.eg-events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.eg-no-events {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Event Card */
.eg-event-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.eg-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.eg-event-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.eg-event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.eg-event-card:hover .eg-event-card-image img {
    transform: scale(1.05);
}

.eg-image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.eg-event-card-content {
    padding: 20px;
}

.eg-event-card-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.3;
}

.eg-event-card-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.eg-event-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.eg-view-gallery-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.eg-view-gallery-btn:hover {
    background: #135e96;
}

/* Single Event Gallery */
.eg-event-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.eg-event-header {
    margin-bottom: 30px;
}

.eg-event-title {
    margin: 0 0 15px;
    font-size: 2rem;
}

.eg-event-meta {
    display: flex;
    gap: 20px;
    color: #666;
    margin-bottom: 15px;
}

.eg-event-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.eg-event-description {
    line-height: 1.7;
    color: #444;
}

/* Gallery Grid - Static */
.eg-gallery {
    display: grid;
    gap: 15px;
}

.eg-gallery-static {
    grid-template-columns: repeat(var(--eg-columns, 4), 1fr);
}

.eg-gallery-static .eg-gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
}

.eg-gallery-static .eg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.eg-gallery-static .eg-gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Grid - Masonry */
.eg-gallery-masonry {
    columns: var(--eg-columns, 4);
    column-gap: 15px;
}

.eg-gallery-masonry .eg-gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.eg-gallery-masonry .eg-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

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

/* Lightbox Link */
.eg-lightbox-trigger {
    display: block;
    position: relative;
}

.eg-lightbox-trigger::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
}

.eg-lightbox-trigger:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

/* Event Gallery Modal */
.eg-event-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
}

.eg-event-gallery-modal .eg-event-gallery {
    position: relative;
}

.eg-modal-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.eg-modal-close-btn:hover {
    background: #000;
}

/* Lightbox */
.eg-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eg-lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.eg-lightbox-container img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.eg-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
}

.eg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 30px;
    padding: 20px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.eg-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.eg-lightbox-prev {
    left: -60px;
}

.eg-lightbox-next {
    right: -60px;
}

.eg-no-images {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .eg-gallery-static {
        --eg-columns: 3;
    }
    
    .eg-gallery-masonry {
        columns: 3;
    }
}

@media screen and (max-width: 768px) {
    .eg-events-list {
        grid-template-columns: 1fr;
    }
    
    .eg-gallery-static {
        --eg-columns: 2;
    }
    
    .eg-gallery-masonry {
        columns: 2;
    }
    
    .eg-event-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .eg-lightbox-nav {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .eg-gallery-static,
    .eg-gallery-masonry {
        --eg-columns: 1;
        columns: 1;
    }
}
