/* Gallery Page Specific Styles */

/* Page Header */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('../images/hero/gallery.jpeg') center/cover;
    color: var(--white);
    padding: 8rem 5%;
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-header p {
    font-size: 1.3rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Gallery Filter */
.gallery-filter {
    padding: 3rem 5%;
    background: var(--light-bg);
    text-align: center;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-tab {
    padding: 0.8rem 2rem;
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--light-bg);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Gallery Grid */
.gallery-section {
    padding: 5rem 5%;
}

.project-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px; /* Offset for smooth scroll navigation */
    padding-top: 2rem;
    transition: all 0.3s ease;
}

.project-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    aspect-ratio: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Masonry Layout Option */
.gallery-grid.masonry {
    display: block;
    column-count: 3;
    column-gap: 1.5rem;
}

.masonry .gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    aspect-ratio: auto;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-close:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-nav:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-info {
    position: absolute;
    bottom: -70px;
    left: 0;
    right: 0;
    color: var(--white);
    text-align: center;
}

.lightbox-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.lightbox-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Gallery Stats */
.gallery-stats {
    padding: 4rem 5%;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-box {
    padding: 2rem;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding: 3rem 0;
}

.load-more-btn {
    padding: 1rem 3rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 2px solid var(--light-bg);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.view-btn:hover,
.view-btn.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
    display: none;
}

.no-results.active {
    display: block;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid.masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 5rem 3%;
        min-height: 50vh;
    }
    
    .page-header h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .page-header p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .gallery-grid.masonry {
        column-count: 1;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tab {
        width: 100%;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-info {
        position: relative;
        bottom: auto;
        margin-top: 1rem;
    }
    
    .lightbox-close {
        top: 10px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 4rem 3%;
        min-height: 40vh;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
