/* Gallery Page Specific Styles */

/* Use Matemasie font for gallery text - no more "Personal Use Only" issue! */
.gallery-item-overlay h3,
.gallery-item-overlay p,
.modal-info h3,
.modal-info p {
    font-family: inherit !important;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    /* Override main.css slideshow styles that interfere with gallery grid */
    aspect-ratio: unset !important;
    overflow: visible !important;
    height: auto !important;
    position: static !important;
}

.gallery-filters {
    margin-bottom: 2rem;
    text-align: center;
}

.filter-btn {
    background-color: var(--dark-color);
    color: var(--light-color);
    border: none;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    cursor: pointer;
    border-radius: 25px;
    transition: all var(--transition-speed) ease;
    font-family: inherit;
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn:focus {
    background-color: var(--secondary-color);
    outline: none;
    transform: translateY(-2px);
}

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

.filter-btn.disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.filter-btn.disabled:hover {
    background-color: #ccc;
    transform: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
    /* Ensure all rows are visible */
    width: 100%;
    min-height: auto;
    overflow: visible;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
    background: var(--light-color);
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

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

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: all var(--transition-speed) ease;
}

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

.gallery-item-overlay h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.gallery-item-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    padding: 2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-info {
    text-align: center;
    color: white;
    margin-top: 1rem;
    max-width: 600px;
}

.modal-info h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.modal-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    padding: 0 2rem;
}

.modal-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
    pointer-events: auto;
}

.modal-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Loading States */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.gallery-error {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
    background: rgba(255, 107, 107, 0.1);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.gallery-no-results {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    padding: 3rem 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--box-shadow);
    border: 2px dashed var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-container {
        padding: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .modal-close {
        top: -2rem;
        font-size: 2rem;
        width: 40px;
        height: 40px;
    }
    
    .modal-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .modal-controls {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .gallery-filters {
        margin-bottom: 1rem;
    }
    
    .filter-btn {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
    }
} 