/*
Theme Name: ApunKaGames
Theme URI: https://apunkagames.net
Author: ApunKaGames Team
Author URI: https://apunkagames.net
Description: A gaming WordPress theme inspired by apunkagames.net. Features a featured games carousel, latest games grid, popular games sidebar, and game price comparison section. Perfect for game download sites, gaming blogs, and game review websites.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apunkagames
Tags: gaming, games, entertainment, responsive, carousel, grid, sidebar
*/

/* ================================
   CSS Variables
   ================================ */
:root {
    --color-primary: #C41E3A;
    --color-primary-dark: #A01830;
    --color-secondary: #1E3A5F;
    --color-background: #E8E8E8;
    --color-surface: #FFFFFF;
    --color-text-primary: #333333;
    --color-text-secondary: #666666;
    --color-text-light: #FFFFFF;
    --color-border: #DDDDDD;
    --color-badge-latest: #4A90D9;
    --container-max-width: 980px;
}

/* ================================
   Reset & Base Styles
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ================================
   Layout
   ================================ */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    background-color: var(--color-surface);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ================================
   Top Navigation
   ================================ */
.top-nav {
    background-color: var(--color-primary);
    width: 100%;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
}

.top-nav-menu {
    display: flex;
    align-items: center;
    gap: 1px;
}

.top-nav-menu li a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-light);
    letter-spacing: 0.5px;
}

.top-nav-menu li a:hover,
.top-nav-menu li.current-menu-item a {
    background-color: rgba(0, 0, 0, 0.1);
}

.top-nav-search {
    position: relative;
}

.top-nav-search input[type="text"] {
    width: 200px;
    height: 28px;
    padding: 4px 28px 4px 10px;
    font-size: 12px;
    border: none;
    background-color: #fff;
}

.top-nav-search input[type="text"]::placeholder {
    color: #999;
}

.top-nav-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
}

.top-nav-search button svg {
    width: 14px;
    height: 14px;
    fill: #666;
}

/* ================================
   Logo Section
   ================================ */
.site-header {
    background-color: var(--color-surface);
    padding: 20px 0;
    text-align: center;
}

.site-branding {
    display: inline-block;
}

.site-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.site-title a {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-title .logo-text {
    display: flex;
    align-items: center;
}

.site-title .logo-apunka {
    color: var(--color-primary);
}

.site-title .logo-games {
    color: var(--color-secondary);
}

.logo-swoosh {
    width: 180px;
    height: 8px;
    margin-top: 4px;
}

.site-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

/* ================================
   Category Navigation
   ================================ */
.category-nav {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.category-nav .container {
    display: flex;
    flex-wrap: wrap;
}

.category-nav a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    border-right: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.category-nav a:last-child {
    border-right: none;
}

.category-nav a:hover {
    background-color: #f5f5f5;
}

.category-nav a.active,
.category-nav li.current-menu-item a {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

/* ================================
   Main Content Layout
   ================================ */
.content-area {
    padding: 24px 0;
}

.content-wrapper {
    display: flex;
    gap: 32px;
}

.primary-content {
    flex: 1;
}

.secondary-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* ================================
   Section Titles
   ================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.section-title .icon {
    font-size: 20px;
}

/* ================================
   Featured Games Carousel
   ================================ */
.featured-games {
    margin-bottom: 32px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

.carousel-title {
    text-align: center;
    margin-top: 12px;
}

.carousel-title a {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.carousel-title a:hover {
    color: var(--color-primary);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carousel-dot.active {
    background-color: var(--color-primary);
}

/* ================================
   Popular Games Widget
   ================================ */
.popular-games-widget {
    background-color: var(--color-surface);
}

.popular-games-list li {
    border-bottom: 1px solid #f0f0f0;
}

.popular-games-list li:last-child {
    border-bottom: none;
}

.popular-games-list a {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    font-size: 13px;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.popular-games-list a::before {
    content: "•";
    color: var(--color-primary);
    margin-right: 8px;
    font-size: 16px;
}

.popular-games-list a:hover {
    color: var(--color-primary);
    padding-left: 8px;
}

/* ================================
   Latest Games Grid
   ================================ */
.latest-games {
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.game-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all 0.25s ease;
}

.game-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #ccc;
    transform: translateY(-2px);
}

.game-card-thumbnail {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

.game-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card-thumbnail img {
    transform: scale(1.05);
}

.game-card-content {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.game-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.game-card:hover .game-card-title {
    color: var(--color-primary);
}

.game-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.game-card-date {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.game-card-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    background-color: var(--color-badge-latest);
    color: #fff;
    border-radius: 3px;
}

/* ================================
   Pagination
   ================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.pagination-info {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.pagination-button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    background-color: #fff;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background-color: #f5f5f5;
}

/* ================================
   Price Comparison Section
   ================================ */
.price-comparison {
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
}

.price-comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.price-comparison-header .section-title {
    margin-bottom: 0;
}

.view-all-link {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.price-cards-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.price-cards-scroll::-webkit-scrollbar {
    height: 6px;
}

.price-cards-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.price-cards-scroll::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.price-card {
    flex-shrink: 0;
    width: 140px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.25s ease;
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.price-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.price-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.price-card:hover .price-card-image img {
    transform: scale(1.05);
}

.price-card-content {
    padding: 10px;
}

.price-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.price-card:hover .price-card-title {
    color: var(--color-primary);
}

.price-card-label {
    font-size: 10px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

.price-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-card-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

.price-card-currency {
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* ================================
   Footer
   ================================ */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    text-align: center;
}

.site-footer p {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.site-footer a {
    color: var(--color-primary);
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ================================
   Single Post/Page
   ================================ */
.single-post {
    padding: 24px 0;
}

.post-header {
    margin-bottom: 24px;
}

.post-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-thumbnail {
    margin-bottom: 24px;
}

.post-thumbnail img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-primary);
}

.post-content p {
    margin-bottom: 16px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 24px 0 16px;
    font-weight: 700;
}

.post-content h2 {
    font-size: 24px;
}

.post-content h3 {
    font-size: 20px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.post-content ul {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--color-primary-dark);
}

/* ================================
   Widgets
   ================================ */
.widget {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f9f9f9;
    border: 1px solid var(--color-border);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.widget ul li a:hover {
    color: var(--color-primary);
}

/* ================================
   Archive/Blog List
   ================================ */
.archive-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.archive-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.archive-description {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-item {
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.post-item:last-child {
    border-bottom: none;
}

.post-item-thumbnail {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item-content {
    flex: 1;
}

.post-item-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.post-item-title a {
    color: var(--color-text-primary);
}

.post-item-title a:hover {
    color: var(--color-primary);
}

.post-item-excerpt {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-item-meta {
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 900px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .secondary-sidebar {
        width: 100%;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-item-thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .top-nav .container {
        flex-direction: column;
        height: auto;
        padding: 8px 16px;
    }
    
    .top-nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .top-nav-menu li a {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .top-nav-search {
        margin-top: 8px;
    }
    
    .category-nav .container {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .category-nav a {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-slide img {
        height: 200px;
    }
    
    .post-title {
        font-size: 22px;
    }
}

/* ================================
   WordPress Default Styles
   ================================ */
.alignleft {
    float: left;
    margin-right: 16px;
    margin-bottom: 16px;
}

.alignright {
    float: right;
    margin-left: 16px;
    margin-bottom: 16px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: 8px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.gallery-item {
    flex: 1;
    min-width: 200px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
