/**
 * Modern Gallery Styles
 * Enhanced styling for modern, user-friendly gallery experience
 */

/* Gallery Hero Section */
.gallery-hero-section {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.1)"/></svg>') repeat-x;
    background-size: 600px 120px;
    animation: wave 15s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(600px); }
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gallery-hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.gallery-hero-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.gallery-hero-breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.gallery-hero-breadcrumb a:hover {
    opacity: 0.8;
}

.gallery-hero-breadcrumb span {
    opacity: 0.8;
}

/* Gallery Area Enhancements */
.gallery-area {
    background: #f8f9fa;
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #0066cc, #0052a3);
    border-radius: 2px;
}

.section-title p {
    font-size: 18px;
    color: #666;
    margin-top: 20px;
}

/* Gallery Tabs - Modern Style */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 12px 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gallery-tab:hover {
    border-color: #0066cc;
    color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.gallery-tab.active {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

/* Gallery Content */
.gallery-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.gallery-content.active {
    display: block;
}

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

/* Modern Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    cursor: pointer;
    animation: slideUp 0.6s ease-out;
}

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

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

.gallery-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.85), rgba(0, 82, 163, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-item-overlay-icon {
    color: white;
    font-size: 48px;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-item-caption {
    padding: 15px;
    background: white;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-caption {
    background: #f0f0f0;
    color: #0066cc;
}

/* Enhanced Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

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

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lightbox-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 32px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 102, 204, 0.8);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 102, 204, 1);
    transform: scale(1.15);
}

.lightbox-caption {
    padding: 15px;
    background: #f5f5f5;
    text-align: center;
    color: #666;
    font-size: 15px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }

    .gallery-hero-content h1 {
        font-size: 40px;
    }

    .gallery-hero-content p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }

    .gallery-item-image {
        height: 180px;
    }

    .gallery-hero-section {
        padding: 60px 0;
    }

    .gallery-hero-content h1 {
        font-size: 32px;
    }

    .gallery-hero-content p {
        font-size: 16px;
    }

    .gallery-tabs {
        gap: 10px;
    }

    .gallery-tab {
        padding: 10px 20px;
        font-size: 14px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 95vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }

    .section-title h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item-image {
        height: 200px;
    }

    .gallery-hero-section {
        padding: 40px 0;
    }

    .gallery-hero-content h1 {
        font-size: 26px;
    }

    .gallery-hero-content p {
        font-size: 14px;
    }

    .gallery-tabs {
        flex-direction: column;
    }

    .gallery-tab {
        width: 100%;
        text-align: center;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .section-title p {
        font-size: 16px;
    }
}

/* Loading Animation */
.gallery-item-image.lazy {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gallery-item-image.lazy.loaded {
    animation: none;
    background: none;
}
