/* Brand New Festival Gallery System - No Bootstrap, No Conflicts */
.new-gallery-for-festivals-section {
    margin: 3rem 0;
}

.new-gallery-for-festivals {
    margin-top: 2rem;
}

/* Gallery Grid - Completely Custom Responsive System */
.new-gallery-for-festivals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
}

/* Single image - centered and larger */
.new-gallery-for-festivals-grid:has(.new-gallery-for-festivals-item:only-child) {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Gallery Item - Modern Card Design */
.new-gallery-for-festivals-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 4/3;
    cursor: pointer;
    background: #f5f5f5;
}

.new-gallery-for-festivals-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Gallery Link */
.new-gallery-for-festivals-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

/* Gallery Thumbnail */
.new-gallery-for-festivals-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f0f0f0;
}

.new-gallery-for-festivals-item:hover .new-gallery-for-festivals-thumbnail {
    transform: scale(1.1);
}

/* Overlay Effect on Hover */
.new-gallery-for-festivals-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.new-gallery-for-festivals-item:hover .new-gallery-for-festivals-link::before {
    opacity: 1;
}

/* Zoom Icon */
.new-gallery-for-festivals-link::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.new-gallery-for-festivals-item:hover .new-gallery-for-festivals-link::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Loading State */
.new-gallery-for-festivals-thumbnail[src=""] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: new-gallery-loading 1.5s infinite;
}

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

/* Brand New Lightbox System */
.new-gallery-for-festivals-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    animation: new-gallery-fade-in 0.3s ease;
}

@keyframes new-gallery-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.new-gallery-for-festivals-lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.new-gallery-for-festivals-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.new-gallery-for-festivals-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

/* Navigation Buttons */
.new-gallery-for-festivals-lightbox-close,
.new-gallery-for-festivals-lightbox-prev,
.new-gallery-for-festivals-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
    user-select: none;
}

.new-gallery-for-festivals-lightbox-close:hover,
.new-gallery-for-festivals-lightbox-prev:hover,
.new-gallery-for-festivals-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.new-gallery-for-festivals-lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 28px;
}

.new-gallery-for-festivals-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.new-gallery-for-festivals-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.new-gallery-for-festivals-lightbox-prev:hover,
.new-gallery-for-festivals-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Caption */
.new-gallery-for-festivals-lightbox-caption {
    color: white;
    font-size: 18px;
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 20px;
    margin-top: 10px;
}

/* Image Counter */
.new-gallery-for-festivals-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Keyboard Navigation Hint */
.new-gallery-for-festivals-lightbox-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .new-gallery-for-festivals-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .new-gallery-for-festivals-grid:has(.new-gallery-for-festivals-item:only-child) {
        max-width: 100%;
        margin: 1.5rem 0 0;
    }
    
    .new-gallery-for-festivals-item {
        border-radius: 8px;
        aspect-ratio: 1;
    }
    
    .new-gallery-for-festivals-link::after {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .new-gallery-for-festivals-lightbox {
        padding: 10px;
    }
    
    .new-gallery-for-festivals-lightbox-close,
    .new-gallery-for-festivals-lightbox-prev,
    .new-gallery-for-festivals-lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .new-gallery-for-festivals-lightbox-close {
        top: 15px;
        right: 15px;
    }
    
    .new-gallery-for-festivals-lightbox-prev {
        left: 15px;
    }
    
    .new-gallery-for-festivals-lightbox-next {
        right: 15px;
    }
    
    .new-gallery-for-festivals-lightbox-caption {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .new-gallery-for-festivals-lightbox-counter {
        top: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .new-gallery-for-festivals-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .new-gallery-for-festivals-item {
        aspect-ratio: 4/3;
    }
    
    .new-gallery-for-festivals-lightbox-content {
        max-height: 80vh;
    }
    
    .new-gallery-for-festivals-lightbox-prev,
    .new-gallery-for-festivals-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .new-gallery-for-festivals-lightbox-prev {
        left: 10px;
    }
    
    .new-gallery-for-festivals-lightbox-next {
        right: 10px;
    }
}

/* Multiple Images Layout */
@media (min-width: 769px) {
    .new-gallery-for-festivals-grid:has(.new-gallery-for-festivals-item:nth-child(2)) {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .new-gallery-for-festivals-grid:has(.new-gallery-for-festivals-item:nth-child(3)) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .new-gallery-for-festivals-grid:has(.new-gallery-for-festivals-item:nth-child(4)) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Support */
body.likhun-dark .new-gallery-for-festivals-item {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

body.likhun-dark .new-gallery-for-festivals-item:hover {
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.15);
}

body.likhun-dark .new-gallery-for-festivals-thumbnail[src=""] {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: new-gallery-loading 1.5s infinite;
}