/* Gallery Styles */

/* Gallery Hero */
.gallery-hero {
    background: linear-gradient(135deg, rgba(3, 57, 166, 0.9) 0%, rgba(191, 144, 4, 0.85) 100%),
                url('https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    padding: 120px 0 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gallery-hero .container {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    max-width: 800px;
    margin: 0 auto;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.gallery-stats .stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.gallery-stats .stat i {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Filter Section */
.gallery-filter {
    background: #f8f9fa;
    padding: 30px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 70px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(248, 249, 250, 0.95);
}

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

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.2);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.3);
}

.filter-btn i {
    font-size: 0.9rem;
}

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

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    grid-auto-flow: dense;
    grid-auto-rows: minmax(300px, auto);
}

/* Gallery Items */
.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
    min-height: 300px;
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

.gallery-item.horizontal {
    grid-column: span 2;
    min-height: 350px;
}

.gallery-item.vertical {
    grid-row: span 2;
    min-height: 600px;
}

.gallery-item.square {
    aspect-ratio: 1;
    min-height: 300px;
}

.gallery-card {
    height: 100%;
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f0f0f0;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.gallery-image img[style*="opacity: 1"] + ::before {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.3) 50%, 
        rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.overlay-content {
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.overlay-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.overlay-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.overlay-tags span {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Process Section */
.gallery-process {
    background: #f8f9fa;
    padding: 80px 0;
}

.process-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.process-card {
    background: white;
    padding: 35px 25px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.process-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 20px;
}

.process-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
}

.process-card p {
    color: #666;
    line-height: 1.6;
}

/* Gallery CTA */
.gallery-cta {
    background: linear-gradient(135deg, rgba(3, 57, 166, 0.92) 0%, rgba(191, 144, 4, 0.88) 100%),
                url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover no-repeat;
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    background-attachment: fixed;
}

.gallery-cta .cta-content {
    background: rgba(0, 0, 0, 0.4);
    padding: 50px 40px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.gallery-cta h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-cta p {
    font-size: 1.1rem;
    margin-bottom: 35px;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-cta .cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-cta .btn {
    padding: 15px 35px;
    font-size: 1rem;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.gallery-cta .btn-primary {
    background: white;
    color: var(--primary-color);
}

.gallery-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-cta .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.gallery-cta .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Lightbox Modal (Future Enhancement) */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-item.horizontal {
        grid-column: span 1;
        min-height: 300px;
    }
    
    .gallery-item.vertical {
        grid-row: span 1;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-subtitle {
        font-size: 1rem;
    }
    
    .gallery-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-buttons {
        padding: 0 15px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .gallery-item {
        min-height: 250px;
    }
    
    .gallery-item.vertical {
        grid-row: span 1;
        min-height: 350px;
    }
    
    .gallery-item.horizontal {
        min-height: 250px;
    }
    
    .gallery-card,
    .gallery-image {
        min-height: 250px;
    }
    
    .process-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-cta h2 {
        font-size: 1.8rem;
    }
    
    .gallery-cta .cta-buttons {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .gallery-cta .btn {
        width: 100%;
        justify-content: center;
    }
}