/* * This file contains your original, working styles for the homepage,
* with the new "Load More" button styles added correctly at the bottom.
*/

/* Home Page Styles */
.game-section {
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Teko', sans-serif;
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.game-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-size {
    font-size: 0.9rem;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 5px;
}

.download-btn {
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.game-card:hover .download-btn {
    background: var(--secondary-color);
}

/* Responsive Grid */
@media (max-width: 992px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================== */
/* Load More Button & Loader Styles (ADDED HERE) */
/* =============================================== */

.load-more-container {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.load-more-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.load-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Simple CSS loader */
.loader {
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid var(--primary-color); /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility class to hide elements */
.hidden {
    display: none;
}


/* ... (all your existing home.css styles) ... */

/* Homepage Ad Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap; 
}
.header-ad-slot {
    margin-left: 20px;
}
@media (max-width: 992px) {
    .section-header {
        justify-content: center;
    }
    .header-ad-slot {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }
}

/* ================================================= */
/* Clickable Card Fix (ADD THIS TO home.css)     */
/* ================================================= */

/* This makes the game card itself the positioning reference */
.game-card {
    position: relative; /* This is the most important change */
}

/* This is the new, invisible link that covers the whole card */
.card-main-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* It sits on a lower layer */
    /* It has no background or text, making it invisible */
}

/* We give the category badge a HIGHER z-index */
.card-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2; /* This places it ON TOP of the main card link */
    /* The rest of its styles remain the same */
    background-color: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.card-category-badge:hover {
    background-color: var(--secondary-color);
}