/* Gallery Specific Styles */

/* Gallery Hero Section */
.gallery-hero {
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('../images/hero-about5.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    margin-top: 120px;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.gallery-hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: 'Times New Roman', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-style: italic;
    animation: slideInLeft 1s ease 0.3s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    opacity: 0.9;
    animation: slideInRight 1s ease 0.6s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Gallery Filters */
.gallery-filters {
    padding: 3rem 0 2rem;
    background: #f8f9fa;
    animation: fadeIn 1s ease 1s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #4BAC24;
    background: transparent;
    color: #4BAC24;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #4BAC24;
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 172, 36, 0.3);
}

/* Gallery Section */
.gallery-section {
    padding: 3rem 0 5rem;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Gallery Items */
.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    animation: fadeInScale 0.8s ease both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(75, 172, 36, 0.9),
        rgba(44, 62, 80, 0.9)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    padding: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-content {
    transform: translateY(0);
}

.gallery-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Times New Roman', serif;
}

.gallery-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.view-btn {
    padding: 10px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-btn:hover {
    background: white;
    color: #4BAC24;
    transform: translateY(-2px);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: lightboxFadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.close-lightbox:hover {
    color: #4BAC24;
    transform: rotate(90deg);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxSlideIn 0.4s ease;
}

@keyframes lightboxSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-info {
    padding: 2rem;
    text-align: center;
}

.lightbox-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-family: 'Times New Roman', serif;
}

.lightbox-info p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(75, 172, 36, 0.8);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: #4BAC24;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* Filter Animation */
.gallery-item.filtering-out {
    animation: filterOut 0.5s ease both;
}

.gallery-item.filtering-in {
    animation: filterIn 0.5s ease both;
}

@keyframes filterOut {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes filterIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Animation */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4BAC24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive Gallery */
@media (max-width: 768px) {
    .gallery-hero {
        height: 50vh;
        margin-top: 100px;
    }
    
    .gallery-hero-title {
        font-size: 2.5rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        margin: 0 10px;
    }
    
    .gallery-image {
        height: 250px;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .lightbox-content {
        max-width: 95%;
        margin: 20px;
    }
    
    .lightbox-info {
        padding: 1rem;
    }
    
    .close-lightbox {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .lightbox-nav {
        padding: 10px 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-hero-title {
        font-size: 2rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1rem;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
    }
}