/* Gallery Container */
.gallery-container {
    position: relative;
    margin: 0 auto;
    padding: 20px;
}

/* Gallery Sizer for Masonry */
.gallery-sizer {
    width: 33.333%;
}

/* Gallery Item */
.gallery-item {
    width: 33.333%;
    padding: 10px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 1;
}

/* Gallery Image */
.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.gallery-item img.lazy {
    opacity: 0;
}

.gallery-item img.loaded {
    opacity: 1;
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 8px 8px;
}

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

/* Gallery Meta */
.gallery-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.gallery-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.gallery-filter {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter:hover,
.gallery-filter.active {
    background: var(--primary-color);
    color: white;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Lightbox Customization */
.lb-data .lb-caption {
    font-size: 1.1rem;
    font-weight: 500;
}

.lb-data .lb-number {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .gallery-item,
    .gallery-sizer {
        width: 50%;
    }
}

@media (max-width: 576px) {
    .gallery-item,
    .gallery-sizer {
        width: 100%;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-filter {
        width: 100%;
        max-width: 200px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Dark Mode Support */
[data-theme="dark"] .gallery-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

[data-theme="dark"] .gallery-filter {
    border-color: var(--dark-primary-color);
    color: var(--dark-primary-color);
}

[data-theme="dark"] .gallery-filter:hover,
[data-theme="dark"] .gallery-filter.active {
    background: var(--dark-primary-color);
    color: white;
}

/* Accessibility */
.gallery-item:focus-within {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.gallery-filter:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-overlay,
    .gallery-filter {
        transition: none;
    }
    
    .gallery-item {
        animation: none;
    }
}

/* Mobile Navigation Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--primary-color);
        z-index: 1050;
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .navbar-nav {
        width: 100%;
        padding: 0;
    }

    .nav-item {
        width: 100%;
        margin: 0.5rem 0;
    }

    .nav-link {
        padding: 1rem;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: rgba(0, 0, 0, 0.1);
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .dropdown-item {
        padding: 0.75rem 1.25rem;
        color: rgba(255, 255, 255, 0.8);
        font-size: 1rem;
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        color: #fff;
        background-color: transparent;
        border-left-color: #fff;
    }

    .dropdown-item i {
        margin-right: 0.75rem;
        width: 20px;
        text-align: center;
    }

    /* Mobile Menu Toggle */
    .navbar-toggler {
        padding: 0.5rem;
        border: none;
        background: transparent;
    }

    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }

    .navbar-toggler-icon {
        width: 1.5em;
        height: 1.5em;
    }

    /* Close Button for Mobile Menu */
    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        padding: 0.5rem;
        cursor: pointer;
    }

    /* Samsung-specific adjustments */
    @media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 767.98px) {
        .navbar-collapse {
            padding: 0.75rem;
        }

        .nav-link {
            padding: 0.875rem;
        }

        .dropdown-item {
            padding: 0.625rem 1rem;
        }

        /* Improve touch targets */
        .nav-link,
        .dropdown-item {
            min-height: 44px;
            display: flex;
            align-items: center;
        }

        /* Prevent text selection */
        .navbar-nav {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            user-select: none;
        }
    }
}

/* Dark mode support for mobile */
[data-theme="dark"] .navbar-collapse {
    background-color: var(--dark-bg-color);
}

[data-theme="dark"] .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .dropdown-item {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    color: #fff;
    background-color: transparent;
}

/* Accessibility improvements */
.navbar-toggler:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dropdown-item:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .navbar-collapse {
        transition: none;
    }
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        margin: 0.5rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    .dropdown-menu {
        padding-left: 2rem;
    }

    .dropdown-item {
        padding: 0.75rem 1.25rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1.25rem;
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    .navbar-collapse {
        margin: 0.25rem;
    }

    .dropdown-item {
        padding: 1rem 1.5rem;
    }

    .navbar-nav .nav-link {
        padding: 1rem 1.5rem;
    }
}

/* Dark mode support */
[data-theme="dark"] .navbar-collapse {
    background-color: var(--dark-bg-color);
    border: 1px solid var(--dark-border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--dark-text-color);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    color: var(--dark-primary-color);
    background-color: transparent;
    border-left-color: var(--dark-primary-color);
}

/* Accessibility improvements */
.dropdown-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dropdown-menu,
    .dropdown-item,
    .nav-link {
        transition: none;
    }
    
    .dropdown-toggle::after {
        transition: none;
    }
} 