/* Comic Con Gallery Widget Styles */

:root {
    --cc-primary: #ffcc00;
    /* Vibrant Yellow/Gold */
    --cc-bg-dark: #0a0a0a;
    --cc-text-light: #ffffff;
    --cc-glass: rgba(255, 255, 255, 0.05);
    --cc-glass-border: rgba(255, 255, 255, 0.1);
}

.cc-gallery-container {
    font-family: 'Inter', 'Roboto', sans-serif;
    color: var(--cc-text-light);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Filters */
.cc-gallery-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.cc-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-filter-btn {
    background: #2a2a2a;
    border: none;
    color: #e5e5e5;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cc-filter-btn:hover,
.cc-filter-btn.active {
    background: var(--cc-primary);
    color: #000;
}

.cc-gallery-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.cc-search-wrapper {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.cc-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    font-size: 14px;
}

.cc-gallery-search {
    width: 100%;
    background: #2a2a2a;
    border: none;
    border-radius: 6px;
    padding: 9px 12px 9px 36px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: 0.3s;
}

.cc-gallery-search::placeholder {
    color: #9ca3af;
}

.cc-gallery-search:focus {
    background: #333;
}

.cc-gallery-sort {
    background: #2a2a2a;
    border: none;
    color: #e5e5e5;
    padding: 9px 15px;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    font-size: 13px;
}



/* Masonry Gallery Grid */
.cc-masonry-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    grid-auto-flow: dense;
}

.cc-gallery-item {
    transition: 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* Preset Custom Spans */
.cc-gallery-item:nth-child(8n + 1) {
    grid-row: span 2;
}

/* Tall Item */
.cc-gallery-item:nth-child(8n + 4) {
    grid-row: span 2;
}

/* Tall Item */
.cc-gallery-item:nth-child(8n + 5) {
    grid-column: span 2;
}

/* Wide Item */
.cc-gallery-item:nth-child(8n + 8) {
    grid-column: span 2;
}

/* Wide Item */

.cc-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.cc-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.5s ease;
}

.cc-item-inner:hover img {
    transform: scale(1.05);
}

.cc-item-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--cc-primary);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Dynamic Tag Colors */
.cc-gallery-item[data-category*="Cosplay"] .cc-item-tag {
    background: #a855f7;
    color: #fff;
}

.cc-gallery-item[data-category*="Celebrity"] .cc-item-tag {
    background: #3b82f6;
    color: #fff;
}

.cc-gallery-item[data-category*="Exhibitor"] .cc-item-tag {
    background: #f97316;
    color: #fff;
}

.cc-gallery-item[data-category*="Gaming"] .cc-item-tag {
    background: #10b981;
    color: #fff;
}

.cc-gallery-item[data-category*="Panel"] .cc-item-tag {
    background: #ec4899;
    color: #fff;
}

.cc-gallery-item[data-category*="Stage"] .cc-item-tag {
    background: #ef4444;
    color: #fff;
}

.cc-gallery-item[data-category*="Fan"] .cc-item-tag {
    background: #eab308;
    color: #000;
}

.cc-gallery-item[data-category*="Workshop"] .cc-item-tag {
    background: #db2777;
    color: #fff;
}

.cc-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    opacity: 0;
    transition: 0.3s;
}

.cc-item-inner:hover .cc-item-overlay {
    opacity: 1;
}

.cc-item-overlay h4 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

/* Responsive */
@media (max-width: 991px) {
    .cc-masonry-gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 220px;
    }

    .cc-gallery-item:nth-child(8n + 8) {
        grid-column: span 1;
    }
}

@media (max-width: 767px) {
    .cc-masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
        gap: 12px;
    }

    .cc-gallery-item[class] {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* 6-item repeating pattern based on screenshot */
    .cc-gallery-item:nth-child(6n + 1) {
        grid-row: span 2;
    }

    .cc-gallery-item:nth-child(6n + 4) {
        grid-column: span 2;
    }

    .cc-gallery-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cc-item-tag {
        top: 10px;
        left: 10px;
        padding: 3px 10px;
        font-size: 10px;
    }
}

@media (max-width: 400px) {
    .cc-masonry-gallery {
        grid-auto-rows: 160px;
        gap: 10px;
    }
}