/* Gallery Page Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #6A1B9A 0%, #26C6DA 100%);
    color: white;
    padding: 20px 0 20px;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Content */
.gallery-content {
    padding: 60px 0;
    background: #f8f9fa;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #BDBDBD;
    background: white;
    color: #6A1B9A;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: #6A1B9A;
    background: #6A1B9A;
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #6A1B9A;
    color: white;
    border-color: #6A1B9A;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 12px 45px 12px 15px;
    border: 2px solid #BDBDBD;
    border-radius: 25px;
    width: 250px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #6A1B9A;
    box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: #6A1B9A;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: rgba(106, 27, 154, 0.1);
}

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

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

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

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

.gallery-image {
    position: relative;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.gallery-image svg {
    display: block;
    width: 100%;
    height: 200px;
}

.mineral-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    object-fit: cover;
    z-index: 2;
    border-radius: 0;
    transition: opacity 0.3s ease;
}

.mineral-photo:hover {
    opacity: 0.9;
}

/* Fallback when image fails to load */
.mineral-photo:not([src]),
.mineral-photo[src=""] {
    display: none;
}

.gallery-info {
    padding: 20px;
}

.gallery-info h3 {
    color: #6A1B9A;
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.mineral-formula {
    color: #26C6DA;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.mineral-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.mineral-properties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property {
    background: #f8f9fa;
    color: #6A1B9A;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    margin-bottom: 15px;
    padding: 12px 30px;
    font-size: 1rem;
}

.gallery-count {
    color: #666;
    font-size: 0.9rem;
}

.gallery-count span {
    font-weight: 600;
    color: #6A1B9A;
}

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

.gallery-item.show {
    animation: fadeInUp 0.5s ease forwards;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    color: #6A1B9A;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-results p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.no-results .btn-primary {
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .search-box {
        justify-content: center;
    }
    
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-item {
        margin: 0 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-content {
        padding: 40px 0;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .gallery-info {
        padding: 15px;
    }
    
    .gallery-info h3 {
        font-size: 1.1rem;
    }
    
    .mineral-description {
        font-size: 0.85rem;
    }
    
    .property {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}