/**
 * Trending Section Styles for ThePopular.Games
 * 
 * This file contains all styles related to the trending games section
 * to avoid CSS duplication and ensure proper grid layout.
 */

/* Trending games section container */
.trending-games-section {
    padding: 3rem 0;
    background: #f8f9fa;
    margin: 2rem 0;
}

.trending-games-section .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.trending-games-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.trending-games-section .section-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Trending games grid */
.trending-games-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
    margin-top: 2rem !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1rem !important;
}

/* Trending game figure */
.game-figure.trending {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.game-figure.trending:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.game-figure.trending a {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.game-figure.trending img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.game-figure.trending .game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-figure.trending:hover .game-overlay {
    opacity: 1;
}

.game-figure.trending .play-button {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trending badge */
.trending-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b35;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Game caption */
.game-figure.trending figcaption {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-figure.trending .game-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.game-figure.trending .game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.game-figure.trending .genre-tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.game-figure.trending .age-rating {
    background: #28a745;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Trending score */
.trending-score {
    background: #ffd700;
    color: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}

/* No games message */
.trending-games-section .no-games {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .trending-games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 1.5rem !important;
        padding: 0 0.5rem !important;
    }
    
    .trending-games-section .section-title {
        font-size: 2rem;
    }
    
    .game-figure.trending img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .trending-games-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .trending-games-section {
        padding: 2rem 0;
    }
    
    .game-figure.trending figcaption {
        padding: 0.75rem;
    }
}
