/* Gallery Page Styles */

.page-header {
    background: var(--gradient);
    color: white;
    padding: 6rem 0 3rem;
    margin-top: 70px;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Filter Bar */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Results Info */
.results-info {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Gallery Grid */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: var(--light);
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .image-wrapper img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.image-overlay p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
}

.image-info {
    padding: 1rem 1.5rem;
}

.image-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.image-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results h3 {
    margin: 1rem 0;
    color: var(--text);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.75rem 1.25rem;
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.page-dots {
    padding: 0.75rem 0.5rem;
    color: var(--text-light);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox .close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 300;
    line-height: 1;
}

.lightbox .close:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-btn.prev {
    left: 2rem;
}

.lightbox-btn.next {
    right: 2rem;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 12px;
    max-width: 80%;
}

.lightbox-caption h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lightbox-caption p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 5rem 0 2rem;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box,
    .filter-group select {
        width: 100%;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .lightbox-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .lightbox-btn.prev {
        left: 1rem;
    }
    
    .lightbox-btn.next {
        right: 1rem;
    }
    
    .lightbox-caption {
        bottom: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .lightbox .close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        font-size: 0.9rem;
    }
    
    .page-btn {
        padding: 0.5rem 1rem;
    }
}
