/* ==========================================================================
   Vaikom Vartha - Gallery Page CSS (Deep Cleaned)
   ========================================================================== */

/* Masonry Grid */
.vvgp-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px 0 0;
    position: relative;
    z-index: 5;
}

/* Individual Masonry Card */
.vvgp-mason-card {
    position: relative; 
    border-radius: 6px; 
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    opacity: 0; 
    transform: translateY(18px);
    animation: vvgReveal 0.6s ease forwards;
    transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
    aspect-ratio: 4 / 5;
    width: 100%;
}
.vvgp-mason-card:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 22px 50px rgba(0,0,0,0.25);
    z-index: 2;
}

/* Photo Dots indicator */
.vvgp-mason-dots {
    position: absolute; 
    top: 12px; 
    right: 12px;
    display: flex; 
    gap: 6px; 
    z-index: 3;
    background: rgba(0,0,0,0.3);
    padding: 6px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.vvgp-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}
.vvgp-dot.active { 
    background: #fff; 
    width: 14px; 
    border-radius: 4px; 
}

/* Image scaling */
.vvgp-mason-img, .vvgp-card-img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    transition: opacity 0.4s ease;
}

/* News List Tag Badges */
.vvgp-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    z-index: 2;
}
.vvgp-tag.tag-latest { background: #e74c3c; }
.vvgp-tag.tag-breaking { background: #f39c12; }
.vvgp-tag.tag-business { background: #3498db; }
.vvgp-tag.tag-health { background: #27ae60; }
.vvgp-tag.tag-politics { background: #9b59b6; }
.vvgp-tag.tag-sports { background: #e67e22; }
.vvgp-tag.tag-tech { background: #34495e; }
.vvgp-tag.tag-local { background: #1abc9c; }

/* Content Overlays */
.vvgp-mason-overlay, .vvgp-card-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    transition: background 0.3s ease;
    z-index: 1;
}

/* Card titles and Meta Info */
.vvgp-mason-info, .vvgp-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
}
.vvgp-mason-info h3, .vvgp-card-info h3 {
    color: #ffffff !important;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gallery Header section */
.vvgp-header {
    margin-bottom: 24px;
}
.vvgp-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.vvgp-title {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}
.vvgp-subtitle {
    margin: 4px 0 0;
    color: #666;
    font-size: 14px;
}

/* Filtering Chips */
.vvgp-filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.vvgp-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.vvgp-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.vvgp-chip.active {
    background: #C0211B;
    color: white;
    border-color: #C0211B;
}

/* Optimized News Grid for Gallery */
.vvgp-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}
.vvgp-news-card {
    height: 200px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

/* Reveal Animation */
@keyframes vvgReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive overrides for Gallery Page */
@media(max-width:768px) {
    .vvgp-masonry { 
        grid-template-columns: 1fr 1fr; 
        gap: 10px; 
    }
    .vvgp-mason-info h3, .vvgp-card-info h3 {
        font-size: 13px;
    }
}
