/* Gallery Page Styles - Unique classes to avoid conflicts */

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

.gallery-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.gallery-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.gallery-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.gallery-hero-subtitle {
    font-size: 1.3rem;
     
    line-height: 1.6;
    opacity: 0.9;
}

/* Gallery Filter Section */
.gallery-filter-section {
    background: #f8f9fa;
    padding: 60px 0;
    border-bottom: 1px solid #e9ecef;
}

.gallery-filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.gallery-filter-title {
    font-size: 2.5rem;
     
    color: #2c3e50;
    margin-bottom: 40px;
}

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

.gallery-filter-btn {
    background: white;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 12px 24px;
    border-radius: 25px;
     
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.gallery-active {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Gallery Grid Section */
.gallery-grid-section {
    background: white;
    padding: 80px 0;
    min-height: 60vh;
}

.gallery-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

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

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

.gallery-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-lazy-image {
    filter: blur(2px);
    opacity: 0.8;
}

.gallery-loaded-image {
    filter: none;
    opacity: 1;
}

.gallery-error-image {
    filter: grayscale(50%);
    opacity: 0.7;
}

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

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

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

.gallery-item-info {
    color: white;
    width: 100%;
}

.gallery-item-title {
    font-size: 1.1rem;
     
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.gallery-item-category {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.gallery-modal-content {
    position: relative;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.gallery-modal-close:hover {
    color: #3498db;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.gallery-modal-info {
    background: white;
    padding: 25px;
    margin-top: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.gallery-modal-title {
    font-size: 1.5rem;
     
    color: #2c3e50;
    margin-bottom: 10px;
}

.gallery-modal-description {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

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

.gallery-modal-nav {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.gallery-modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Loading Spinner */
.gallery-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.gallery-loading.gallery-show {
    display: flex;
}

.gallery-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: gallery-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes gallery-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gallery-loading p {
    font-size: 1.1rem;
    color: #666;
     
}

/* Partners Section */
.gallery-partners-section {
    background: #f8f9fa;
    padding: 80px 0;
    border-top: 1px solid #e9ecef;
}

.gallery-partners-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.gallery-partners-title {
    font-size: 2.5rem;
     
    color: #2c3e50;
    margin-bottom: 15px;
}

.gallery-partners-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-partner-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

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

.gallery-partner-image {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.gallery-partner-item:hover .gallery-partner-image {
    filter: grayscale(0%);
}

/* Filter Animation */
.gallery-item.gallery-fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item.gallery-fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero-title {
        font-size: 2.5rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-filter-title {
        font-size: 2rem;
    }
    
    .gallery-filter-buttons {
        justify-content: center;
    }
    
    .gallery-filter-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-item-image {
        height: 200px;
    }
    
    .gallery-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .gallery-modal-close {
        top: -40px;
        font-size: 28px;
    }
    
    .gallery-modal-info {
        padding: 20px;
        margin-top: 15px;
    }
    
    .gallery-modal-title {
        font-size: 1.3rem;
    }
    
    .gallery-modal-navigation {
        padding: 0 10px;
    }
    
    .gallery-modal-nav {
        font-size: 20px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .gallery-hero-section {
        padding: 100px 0 60px;
    }
    
    .gallery-hero-title {
        font-size: 2rem;
    }
    
    .gallery-filter-section {
        padding: 40px 0;
    }
    
    .gallery-filter-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .gallery-grid-section {
        padding: 60px 0;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .gallery-item-image {
        height: 180px;
    }
    
    .gallery-filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .gallery-partners-section {
        padding: 60px 0;
    }
    
    .gallery-partners-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .gallery-partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
    }
    
    .gallery-partner-item {
        padding: 15px;
        min-height: 100px;
    }
    
    .gallery-partner-image {
        max-height: 60px;
    }
}