/**
 * Gallery Component Styles
 */

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.gallery-container {
    margin-top: 40px;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-grey);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-item-inner {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(255, 107, 107, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-zoom {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--primary-red);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-zoom:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Load More Button */
.gallery-load-more {
    text-align: center;
    margin-top: 40px;
}

.gallery-load-more .btn {
    min-width: 200px;
}

/* Gallery Modal (Lightbox) */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image-container img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Modal Navigation */
.gallery-modal-close,
.gallery-modal-prev,
.gallery-modal-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.gallery-modal-close {
    top: 20px;
    right: 20px;
}

.gallery-modal-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-modal-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-modal-close:hover,
.gallery-modal-prev:hover,
.gallery-modal-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: scale(1.1) translateY(-50%);
}

.gallery-modal-close:hover {
    transform: scale(1.1);
}

/* Modal Caption */
.gallery-modal-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

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

.gallery-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 12px;
    }

    .gallery-modal-close,
    .gallery-modal-prev,
    .gallery-modal-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gallery-modal-prev,
    .gallery-modal-next {
        background: rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item-inner {
        border-radius: 10px;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gallery-modal {
        background: rgba(0, 0, 0, 0.98);
    }

    .gallery-modal-close,
    .gallery-modal-prev,
    .gallery-modal-next {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.2);
    }
}