/* Modern Causes Gallery Styling - Forest Green Theme */

/* Gallery Category Container */
.gallery-category {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #BBF7D0;
    margin-bottom: 3rem;
    overflow: hidden;
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #22C55E 0%, #86EFAC 100%);
    color: white;
    margin-bottom: 0;
    border-bottom: none;
}

.category-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    padding-left: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title::before {
    display: none;
}

.category-title i {
    font-size: 1.25rem;
}

.category-title .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation Controls */
.category-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.control-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem;
    margin-bottom: 0;
    max-width: 100%;
}

.gallery-item {
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    background: #ffffff;
    border: 1px solid #BBF7D0;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 4/3;
}

.gallery-item-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95);
}

.gallery-item-wrapper:hover .gallery-image {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8) 0%, rgba(134, 239, 172, 0.8) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: #ffffff;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-wrapper:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.view-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* Gallery Caption */
.gallery-caption {
    padding: 1rem;
    background: #ffffff;
    border-top: 1px solid #BBF7D0;
}

.gallery-caption h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    font-family: 'Poppins', sans-serif;
}

.gallery-caption p {
    font-size: 0.85rem;
    margin: 0;
    color: #6b7280;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

/* Pagination */
.gallery-pagination {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #BBF7D0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.dot:hover {
    background: #22C55E;
    transform: scale(1.2);
}

.dot.active {
    background: #22C55E;
    border-color: #15803D;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    transform: scale(1.2);
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #bbb;
}

#lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 20px 25px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    text-align: center;
    max-width: 80%;
    backdrop-filter: blur(10px);
}

#lightbox-caption-text {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

#lightbox-counter {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .category-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem 1.5rem;
    }
    
    .category-controls {
        justify-content: center;
    }
    
    .gallery-image {
        height: 150px;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .gallery-image {
        height: 180px;
    }
    
    .category-title {
        font-size: 1.125rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Video Gallery Specific Enhancements */
.video-item .overlay-content i {
    color: #ff0000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-item:hover .overlay-content i {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
