/* Media Gallery Styles */

/* Category Tabs */
.media-category-tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.media-category-tab {
    padding: 12px 24px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.media-category-tab:hover {
    background: #e5e7eb;
    color: #374151;
}

.media-category-tab.active {
    background: var(--ul-primary, #4f46e5);
    color: white;
    border-color: var(--ul-primary, #4f46e5);
}

.media-category-tab .count {
    font-size: 13px;
    opacity: 0.8;
}

/* Gallery Wrapper */
.media-gallery-wrapper {
    margin-top: 30px;
}

.media-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.media-empty p {
    font-size: 18px;
}

/* Album Sections */
.media-album-section {
    margin-bottom: 50px;
}

.media-album-section:last-child {
    margin-bottom: 0;
}

.media-album-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.media-album-title .count {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

/* Gallery Grid */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .media-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* Gallery Item */
.media-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.media-gallery-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.media-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.media-gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.media-gallery-item:hover .media-gallery-item-overlay {
    transform: translateY(0);
}

.media-gallery-item-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.media-gallery-item-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

/* Lightbox Styles (added by media-loader.js) */
.media-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.media-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.media-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.media-lightbox-close,
.media-lightbox-prev,
.media-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #111827;
    font-weight: bold;
}

.media-lightbox-close:hover,
.media-lightbox-prev:hover,
.media-lightbox-next:hover {
    background: white;
    transform: scale(1.1);
}

.media-lightbox-close {
    top: -60px;
    right: 0;
    font-size: 32px;
    line-height: 1;
}

.media-lightbox-prev {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.media-lightbox-next {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.media-lightbox-info {
    background: white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
}

.media-lightbox-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.media-lightbox-description {
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.6;
}

.media-lightbox-meta {
    font-size: 14px;
    color: #9ca3af;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .media-lightbox-prev,
    .media-lightbox-next {
        left: 10px;
        right: 10px;
        top: auto;
        transform: none;
    }
    
    .media-lightbox-prev {
        bottom: 20px;
    }
    
    .media-lightbox-next {
        bottom: 20px;
    }
    
    .media-lightbox-close {
        top: 20px;
        right: 20px;
    }
}

