/* ============================================
   GALLERY SPECIFIC STYLES
   ============================================ */

/* Gallery Toolbar */
.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding: 25px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--box-shadow);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.view-modes {
    display: flex;
    gap: 10px;
}

.view-mode-btn {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: var(--bg-light);
    color: var(--text-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.view-mode-btn:hover,
.view-mode-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.result-info {
    font-weight: 600;
    color: var(--text-color);
}

.result-info span {
    color: var(--primary-color);
}

.search-box {
    position: relative;
}

.search-box input {
    width: 250px;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.sort-select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--white);
}

.sort-select:focus {
    border-color: var(--primary-color);
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 30px;
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Gallery Grid */
.gallery-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-grid.active {
    display: grid;
}

.gallery-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.gallery-card-image {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-card-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 25px;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-info {
    color: var(--white);
    transform: translateY(20px);
    transition: var(--transition);
    width: 100%;
}

.gallery-card:hover .gallery-card-info {
    transform: translateY(0);
}

.gallery-card-info h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.gallery-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.gallery-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.view-btn:hover {
    background: #E55A2B;
}

/* Masonry View */
.gallery-masonry {
    display: none;
    columns: 3;
    column-gap: 30px;
}

.gallery-masonry.active {
    display: block;
}

.masonry-item {
    position: relative;
    margin-bottom: 30px;
    break-inside: avoid;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: var(--transition);
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-info {
    color: var(--white);
}

.masonry-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.masonry-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.featured-tag {
    display: inline-block;
    background: var(--primary-color);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    margin-bottom: 10px;
}

/* Slider View */
.gallery-slider {
    display: none;
}

.gallery-slider.active {
    display: block;
}

.slider-main {
    position: relative;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 600px;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.slider-slide.active {
    opacity: 1;
    visibility: visible;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: var(--white);
}

.slider-info h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.slider-stats {
    display: flex;
    gap: 30px;
    font-size: 16px;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.slider-nav:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 30px;
}

.slider-nav.next {
    right: 30px;
}

.slider-thumbnails {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.slider-thumb {
    flex: 0 0 120px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.slider-thumb:hover,
.slider-thumb.active {
    border-color: var(--primary-color);
}

.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    color: var(--text-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.lightbox-content {
    max-width: 1200px;
    width: 100%;
}

.lightbox-content img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 20px;
}

.lightbox-info {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    color: var(--text-color);
}

.lightbox-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.lightbox-stats {
    display: flex;
    gap: 30px;
    font-size: 16px;
    color: var(--text-light);
}

.lightbox-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 80px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.no-results p {
    color: var(--text-light);
}

/* Load More */
.load-more-container {
    margin-top: 50px;
}

.load-more-info {
    margin-bottom: 15px;
    color: var(--text-light);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }

    .search-box input {
        width: 100%;
    }

    .gallery-masonry {
        columns: 1;
    }

    .slider-container {
        height: 400px;
    }

    .slider-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .slider-nav.prev {
        left: 15px;
    }

    .slider-nav.next {
        right: 15px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}