/* Gallery Page Specific Styles */

.gallery {
    padding: 80px 0;
    background: #f8fafc;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f1f9ff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3);
}

.filter-btn i {
    font-size: 1.1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #f1f9ff;
    aspect-ratio: 4 / 3;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item.hidden {
    display: none;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

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

.overlay-content {
    color: white;
    width: 100%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.overlay-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.overlay-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.view-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #22d3ee, #0891b2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(34, 211, 238, 0.4);
}

.view-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.6);
}

/* Image Modal Styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

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

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-info {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.modal-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.modal-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-navigation:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: -80px;
}

.modal-next {
    right: -80px;
}

/* Mobile Responsive for Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-filter {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
    }

    .overlay-content h3 {
        font-size: 1.1rem;
    }

    .overlay-content p {
        font-size: 0.85rem;
    }

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

    .modal-info {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .modal-navigation {
        position: fixed;
        top: 50%;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .modal-prev {
        left: 20px;
    }

    .modal-next {
        right: 20px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}