/* Gallery Groups Styles */
.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-group {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.gallery-group:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Group Header */
.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #eb8525;
}

.group-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #eb8525;
    margin: 0;
}

.image-count {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: normal;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-wrapper:hover img {
    transform: scale(1.1);
}

.image-wrapper.hidden {
    display: none;
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 12px;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

/* Toggle Button */
.toggle-button {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.toggle-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

.toggle-button:active {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: 300;
    line-height: 1;
}

.close-lightbox:hover {
    color: #ef4444;
}

.lightbox-caption {
    color: white;
    font-size: 1.1rem;
    margin-top: 16px;
    text-align: center;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

.lightbox-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

.lightbox-nav button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lightbox-nav button:hover {
    background: white;
    color: #af3b1e;
}

.image-counter {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .images-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .group-title {
        font-size: 1.25rem;
    }

    .gallery-group {
        padding: 16px;
    }

    .toggle-button {
        font-size: 0.9rem;
        padding: 10px 16px;
    }

    .lightbox-nav button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: 1fr;
    }

    .group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .group-title {
        font-size: 1.1rem;
    }

    .image-count {
        font-size: 0.85rem;
    }

    .lightbox-content {
        max-width: 95%;
    }

    .close-lightbox {
        font-size: 32px;
        top: -35px;
    }

    .lightbox-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .lightbox-nav button {
        flex: 1;
        min-width: 100px;
    }
}

/* Animation for expanding/collapsing */
.image-wrapper {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

