/* ============================================
   ALL GAME GUIDES — MAGAZINE LAYOUT
   Gamepressure-inspired: 2/3 content + 1/3 sidebar
============================================ */

.gamekb-magazine-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Page Header */
.gamekb-mag-header {
    margin-bottom: 20px;
}

.gamekb-mag-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.25;
}

/* ---- Search Bar ---- */
.gamekb-mag-search-bar {
    margin-bottom: 24px;
    max-width: 460px;
}

.gamekb-mag-search-wrapper {
    position: relative;
}

.gamekb-mag-search-input {
    width: 100%;
    padding: 10px 40px 10px 18px;
    border: 2px solid #d0d7de;
    border-radius: 24px !important;
    background: #fff;
    font-size: 0.9rem;
    color: #24292f;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.gamekb-mag-search-input:focus {
    border-color: #2ea44f;
    box-shadow: 0 0 0 3px rgba(46, 164, 79, 0.1);
}

.gamekb-mag-search-input::placeholder {
    color: #8b949e;
}

.gamekb-mag-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b949e;
    pointer-events: none;
    display: flex;
}

/* ---- Two-column Layout ---- */
.gamekb-mag-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* ============================================
   MAIN CONTENT AREA
============================================ */

/* -- Featured Cards (top 2) -- */
.gamekb-mag-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}

.gamekb-mag-featured-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e7;
    transition: box-shadow 0.2s ease;
}

.gamekb-mag-featured-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.gamekb-mag-featured-image-link {
    display: block;
    text-decoration: none;
}

.gamekb-mag-featured-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #2a2a2c;
    position: relative;
}

.gamekb-mag-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}

.gamekb-mag-featured-title {
    margin: 0 0 2px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.gamekb-mag-featured-count {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Sections list under featured card */
.gamekb-mag-featured-sections {
    list-style: none;
    margin: 0;
    padding: 10px 14px 12px;
    border-top: 1px solid #f0f0f2;
}

.gamekb-mag-featured-sections li {
    font-size: 0.88rem;
    line-height: 1.3;
    padding: 3px 0;
    border-bottom: 1px solid #f7f7f7;
}

.gamekb-mag-featured-sections li:last-child {
    border-bottom: none;
}

.gamekb-mag-featured-sections a {
    color: #333;
    text-decoration: none;
    transition: color 0.15s ease;
}

.gamekb-mag-featured-sections a:hover {
    color: #2ea44f;
}

.gamekb-mag-featured-sections .gamekb-mag-more a {
    color: #888;
    font-style: italic;
}

/* -- Section Heading -- */
.gamekb-mag-section-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2ea44f;
}

/* -- Full List -- */
.gamekb-mag-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f2;
    transition: background 0.15s ease;
}

.gamekb-mag-list-item:last-child {
    border-bottom: none;
}

.gamekb-mag-list-item:hover {
    background: #fafbfc;
}

.gamekb-mag-list-thumb-link {
    flex: 0 0 72px;
    display: block;
}

.gamekb-mag-list-thumb-link img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.gamekb-mag-list-placeholder {
    width: 72px;
    height: 48px;
    border-radius: 5px;
    background: #f0f0f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gamekb-mag-list-body {
    flex: 1;
    min-width: 0;
}

.gamekb-mag-list-title {
    margin: 0 0 2px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.gamekb-mag-list-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.gamekb-mag-list-title a:hover {
    color: #2ea44f;
}

.gamekb-mag-list-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: #888;
}

.gamekb-mag-list-arrow {
    flex-shrink: 0;
    color: #ccc;
    display: flex;
    transition: color 0.15s ease;
}

.gamekb-mag-list-item:hover .gamekb-mag-list-arrow {
    color: #2ea44f;
}

/* -- Recently Added Articles -- */
.gamekb-mag-recent-articles {
    margin-bottom: 28px;
}

.gamekb-mag-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f2;
    text-decoration: none;
    transition: background 0.15s ease;
}

.gamekb-mag-recent-item:last-child {
    border-bottom: none;
}

.gamekb-mag-recent-item:hover {
    background: #fafbfc;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 6px;
}

.gamekb-mag-recent-thumb {
    flex: 0 0 64px;
}

.gamekb-mag-recent-thumb img {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.gamekb-mag-recent-thumb-placeholder {
    width: 64px;
    height: 44px;
    border-radius: 5px;
    background: #f0f0f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gamekb-mag-recent-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gamekb-mag-recent-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.gamekb-mag-recent-item:hover .gamekb-mag-recent-title {
    color: #2ea44f;
}

.gamekb-mag-recent-meta {
    font-size: 0.82rem;
    color: #888;
    margin-top: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.gamekb-mag-recent-separator {
    margin: 0 5px;
}

.gamekb-mag-recent-kb {
    font-weight: 500;
    color: #666;
}

.gamekb-mag-recent-section {
    color: #999;
}

.gamekb-mag-empty {
    color: #888;
    padding: 40px 0;
    text-align: center;
}

/* ============================================
   SIDEBAR
============================================ */
.gamekb-mag-sidebar {
    position: sticky;
    top: 20px;
}

.gamekb-mag-sidebar-block {
    background: #f8f9fa;
    border: 1px solid #e8e8ea;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.gamekb-mag-sidebar-heading {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2ea44f;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gamekb-mag-sidebar-empty {
    font-size: 0.82rem;
    color: #888;
    margin: 0;
}

/* -- Popular Articles -- */
.gamekb-mag-popular-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background 0.15s ease;
}

.gamekb-mag-popular-item:last-child {
    border-bottom: none;
}

.gamekb-mag-popular-item:hover {
    background: #f0f4f8;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
}

.gamekb-mag-popular-rank {
    flex: 0 0 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: #3a3a3c;
    border-radius: 4px;
    line-height: 1;
    margin-top: 1px;
}

/* Top-3 accent colors */
.gamekb-mag-popular-item:nth-child(1) .gamekb-mag-popular-rank { background: #d4a017; }
.gamekb-mag-popular-item:nth-child(2) .gamekb-mag-popular-rank { background: #8a8a8a; }
.gamekb-mag-popular-item:nth-child(3) .gamekb-mag-popular-rank { background: #a0522d; }

.gamekb-mag-popular-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gamekb-mag-popular-title {
    font-size: 0.84rem;
    font-weight: 500;
    color: #24292f;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.gamekb-mag-popular-item:hover .gamekb-mag-popular-title {
    color: #2ea44f;
}

.gamekb-mag-popular-kb {
    font-size: 0.72rem;
    color: #888;
    margin-top: 1px;
}

/* -- Recent Comments -- */
.gamekb-mag-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background 0.15s ease;
}

.gamekb-mag-comment-item:last-child {
    border-bottom: none;
}

.gamekb-mag-comment-item:hover {
    background: #f0f4f8;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
}

.gamekb-mag-comment-icon {
    flex-shrink: 0;
    color: #aaa;
    margin-top: 2px;
}

.gamekb-mag-comment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gamekb-mag-comment-title {
    font-size: 0.84rem;
    font-weight: 500;
    color: #24292f;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.gamekb-mag-comment-item:hover .gamekb-mag-comment-title {
    color: #2ea44f;
}

.gamekb-mag-comment-meta {
    font-size: 0.72rem;
    color: #888;
    margin-top: 1px;
}

/* ============================================
   RESPONSIVE
============================================ */

/* Tablet: sidebar below */
@media (max-width: 960px) {
    .gamekb-mag-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .gamekb-mag-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .gamekb-mag-sidebar-block {
        margin-bottom: 0;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .gamekb-magazine-page {
        padding: 16px;
    }

    .gamekb-mag-title {
        font-size: 1.4rem;
    }

    .gamekb-mag-featured {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gamekb-mag-sidebar {
        grid-template-columns: 1fr;
    }

    .gamekb-mag-list-thumb-link {
        flex: 0 0 56px;
    }

    .gamekb-mag-list-thumb-link img {
        width: 56px;
        height: 38px;
    }

    .gamekb-mag-list-placeholder {
        width: 56px;
        height: 38px;
    }

    .gamekb-mag-list-title {
        font-size: 0.88rem;
    }

    .gamekb-mag-search-input {
        font-size: 0.85rem;
    }
}
