/* Modern Gallery Styles */
.modern-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    cursor: zoom-in;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.15);
}

.gallery-image-wrapper.zoomed .gallery-image {
    transform: scale(2) !important;
    cursor: zoom-out;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 69, 19, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    text-align: center;
    color: #fff;
    padding: 20px;
}

.gallery-overlay-content i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.gallery-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .modern-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .modern-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .modern-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
        padding: 15px 0;
    }
    
    .gallery-overlay-content i {
        font-size: 28px;
    }
    
    .gallery-title {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .modern-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 0;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
    
    .gallery-overlay-content i {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .gallery-title {
        font-size: 12px;
    }
}

/* Tab Navigation Styling */
.picture-gallery-wrapper .nav-tabs {
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.picture-gallery-wrapper .nav-tabs > li {
    margin-bottom: -2px;
}

.picture-gallery-wrapper .nav-tabs > li > a {
    color: #666;
    padding: 12px 24px;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.picture-gallery-wrapper .nav-tabs > li > a:hover {
    background-color: transparent;
    border-bottom-color: #8b4513;
    color: #8b4513;
}

.picture-gallery-wrapper .nav-tabs > li.active > a,
.picture-gallery-wrapper .nav-tabs > li.active > a:hover,
.picture-gallery-wrapper .nav-tabs > li.active > a:focus {
    color: #8b4513;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid #8b4513;
}

/* Loading Animation */
.gallery-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(n+7) { animation-delay: 0.7s; }
