/* ========================================
   TRENDS PAGE SPECIFIC STYLES
   ======================================== */

/* Main trends grid - 6 columns on large screens, responsive */
#trendsGrid.trends-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* When showing by category, trends-grid becomes a block container */
#trendsGrid .trends-by-category {
    display: block;
}

.trend-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 3 / 4;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.trend-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.trend-card-image {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    overflow: hidden;
}

.trend-card-image img,
.trend-card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trend-card:hover .trend-card-image img,
.trend-card:hover .trend-card-image video {
    transform: scale(1.05);
}

/* Dark overlay that disappears on hover */
.trend-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.3) 100%);
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.trend-card:hover .trend-card-overlay {
    opacity: 0;
}

.trend-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.trend-type-badge-image {
    background: rgba(0, 212, 255, 0.9);
    color: #000;
}

.trend-type-badge-video {
    background: rgba(138, 43, 226, 0.9);
    color: #fff;
}

/* Content overlay - positioned absolutely over image */
.trend-card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    z-index: 2;
    pointer-events: none;
}

/* Title at top */
.trend-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category badges under title */
.trend-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: auto;
}

.trend-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Details button at bottom - transparent */
.trend-card-actions {
    display: flex;
    justify-content: center;
    margin-top: auto;
    pointer-events: auto;
}

.trend-details-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.trend-details-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* No image placeholder */
.trend-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.trend-image-placeholder i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.2);
}

/* Category sections */
.trends-by-category {
    display: block;
    width: 100%;
}

.trends-by-category > .category-section {
    margin-bottom: 48px;
}

.trends-by-category > .category-section:last-child {
    margin-bottom: 0;
}

.category-section {
    width: 100%;
}

.category-section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-section-title i {
    color: #00d4ff;
}

/* Fix for nested grid when showing by category - optimized for 1400px container */
.trends-by-category .trends-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px;
    width: 100%;
}

/* Responsive breakpoints */
@media (min-width: 577px) and (max-width: 768px) {
    #trendsGrid.trends-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #trendsGrid.trends-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1025px) and (max-width: 1400px) {
    #trendsGrid.trends-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px;
    }
}

@media (min-width: 1401px) {
    #trendsGrid.trends-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

/* Category grid responsive */
@media (max-width: 1024px) {
    .trends-by-category .trends-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .trend-card-content {
        padding: 16px;
    }
    
    .trend-card-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    #trendsGrid.trends-grid,
    .trends-by-category .trends-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
}


