/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
    height: 500px; /* Increased height */
    background-image: url('../../images/image23.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    margin-top: 0; /* Start from top */
    padding-top: 90px; /* Add padding to push content below navigation */
    position: relative;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
}

.gallery-hero-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 16px;
    line-height: 1.2;
    text-wrap: balance;
    max-width: 100%;
}

.gallery-hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Section */
.gallery-filters {
    padding: 40px 0;
    background: #f8fafc;
    text-align: center;
}

.gallery-filters h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 32px;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

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

.filter-btn:hover,
.filter-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Gallery Grid */
.gallery-section {
    padding: 60px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    /* Fallback for older browsers */
    grid-gap: 20px;
    margin-bottom: 60px;
}

/* Fallback for browsers without grid support */
@supports not (display: grid) {
    .gallery-grid {
        display: flex;
        flex-wrap: wrap;
        margin: -10px;
    }
    
    .gallery-item {
        flex: 1 1 300px;
        margin: 10px;
    }
}

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

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    margin: 0;
    height: 0;
    overflow: hidden;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

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

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

/* Different sized items for variety */
.gallery-item.featured {
    grid-row: span 2;
}

.gallery-item.featured img {
    height: 520px;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall img {
    height: 350px;
}

.gallery-item.small img {
    height: 200px;
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

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

.overlay-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.zoom-icon {
    font-size: 2rem;
    display: block;
}

/* Badges */
.featured-badge,
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.new-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.load-more-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 12px 32px;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.gallery-note {
    color: #64748b;
    font-style: italic;
    font-size: 0.9rem;
}

/* Gallery CTA */
.gallery-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    /* Fallback for older browsers */
    justify-content: center;
    flex-wrap: wrap;
}

/* Fallback for browsers without gap support */
.cta-buttons > * + * {
    margin-left: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 14px 28px;
    border: 2px solid white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: white;
    color: #1e293b;
    transform: translateY(-2px);
}

/* Enhanced Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    cursor: pointer;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

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

.lightbox-info {
    color: white;
    margin-top: 20px;
    padding: 0 20px;
}

.lightbox-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.lightbox-info p {
    opacity: 0.8;
    font-size: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero {
        height: 420px; /* Keep same height */
        padding-top: 80px; /* Reduced padding to bring content up */
    }

    .gallery-hero-content h1 {
        font-size: 2rem; /* Reduced from 2.5rem */
        text-wrap: balance;
        max-width: 90%;
        margin-bottom: 12px; /* Reduced margin */
    }

    .gallery-hero-content p {
        font-size: 1rem; /* Reduced from 1.2rem */
        margin-bottom: 25px; /* Reduced margin */
    }

    .hero-stats {
        flex-direction: row; /* Changed back to row */
        gap: 15px; /* Reduced gap */
        align-items: center;
        justify-content: center;
        margin-top: 20px; /* Reduced margin */
    }

    .stat {
        flex-direction: column; /* Keep stats stacked vertically */
        gap: 4px; /* Reduced gap */
        text-align: center;
    }

    .stat-number {
        font-size: 1.8rem; /* Reduced from 2rem */
    }

    .stat-label {
        font-size: 0.75rem; /* Reduced from 0.9rem */
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        grid-gap: 16px;
    }

    .gallery-item.wide,
    .gallery-item.featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item.featured img,
    .gallery-item.tall img {
        height: 250px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons > * + * {
        margin-left: 0;
        margin-top: 12px;
    }

    .btn-primary,
    .btn-outline {
        width: 250px;
    }

    .lightbox-nav {
        display: none;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 2rem;
    }
}

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

    .gallery-item.wide {
        grid-column: span 2;
    }

    .hero-stats {
        gap: 40px;
    }
}