/*
Theme Name: Geeker Mag
Theme URI: https://geekermag.com/
Author: Viney Dhiman
Author URI: https://geekermag.com/
Description: Tech Blog WordPress Theme
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
body {
    background: #fff;
    color: #111;
    line-height: 1.6;
}
img {
    max-width: 100%;
    display: block;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}
.hamburger {
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    display: none;
}



.nav-main {
    display: flex;
    gap: 22px;
    align-items: center;
}
.nav-main a {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
}
.nav-main .donate {
    background: #e63946;
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 3px;
}
.header-right {
    display: flex;
    gap: 16px;
    font-size: 16px;
}

/* Breadcrumb */
.breadcrumb {
    max-width: 1200px;
    margin: 14px auto;
    padding: 0 16px;
    font-size: 13px;
    color: #666;
}
.breadcrumb a {
    color: #666;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 32px;
}

/* Featured */
.featured {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
}
.featured img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}
.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}
.label {
    display: inline-block;
    background: #4154f1;
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 3px;
    margin-bottom: 8px;
}
.featured h1 {
    font-size: 22px;
    margin-bottom: 6px;
}
.meta {
    font-size: 12px;
    color: #ddd;
}

/* Grid Posts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}
.card {
    border-radius: 6px;
    overflow: hidden;
}
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.card h3 {
    font-size: 14px;
    margin: 10px 0 4px;
    line-height: 1.4;
}
.card .meta {
    color: #666;
    font-size: 11px;
}

/* Latest Articles */
.latest h2 {
    font-size: 18px;
    margin-bottom: 20px;
}
.article-row {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}
.article-row img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}
.article-row h3 {
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.4;
}
.article-row p {
    font-size: 13px;
    color: #555;
    margin-top: 6px;
}
.load-more {
    text-align: center;
    margin: 20px 0;
}
.load-more button {
    background: #4154f1;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* Sidebar */
.sidebar {
    padding-top: 4px;
}
.widget {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}
.widget h3 {
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}
.side-item {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
}
.side-item img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}
.side-item h4 {
    font-size: 12px;
    line-height: 1.4;
}
.side-item .meta {
    font-size: 10px;
    color: #666;
}
.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.social-grid a {
    background: #f5f5f5;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
}
.ai-item {
    margin-bottom: 16px;
}
.ai-item img {
    border-radius: 4px;
    margin-bottom: 8px;
}
.ai-item h4 {
    font-size: 12px;
    line-height: 1.4;
}

/* Footer */
footer {
    background: #111;
    color: #fff;
    padding: 40px 16px 20px;
    margin-top: 50px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h3 {
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.footer-post {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.footer-post img {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    object-fit: cover;
}
.footer-post h4 {
    font-size: 11px;
    line-height: 1.4;
}
.footer-post .date {
    font-size: 10px;
    color: #aaa;
}
.sub input {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: none;
    margin-bottom: 10px;
}
.sub button {
    width: 100%;
    background: #4154f1;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 11px;
    color: #aaa;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    list-style: none;
}
.footer-links a {
    color: #aaa;
}

/* Mobile */
@media (max-width:768px) {
    .container {
        grid-template-columns: 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .hamburger {
        display: block;
    }
    .nav-main {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        gap: 14px;
        align-items: flex-start;
        z-index: 99;
    }
    .nav-main.show {
        display: flex;
    }
    .article-row {
        flex-direction: column;
    }
    .article-row img {
        width: 100%;
        height: auto;
    }
}



/* ====== 列表页（archive.php）专属样式 ====== */
.archive-title {
    font-size: 18px;
    margin-bottom: 24px;
    color: #111;
    border-left: 3px solid #4154f1;
    padding-left: 10px;
}

/* 3列文章网格 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.archive-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.archive-card-img {
    position: relative;
    display: block;
}

.archive-card-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.archive-card .label {
    position: absolute;
    top: 8px;
    left: 8px;
}

.archive-card-body {
    padding: 14px;
}

.archive-card-body h3 {
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.archive-card-body p {
    font-size: 13px;
    color: #555;
    margin-top: 8px;
}

/* 分页导航 */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #eee;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.pagination .current {
    background: #4154f1;
    color: #fff;
    border-color: #4154f1;
}

/* 侧边栏缩略图 */
.side-thumb {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}






/* ====== 详情页（content.html / single.php）专属样式 ====== */
.post-single {
    background: #fff;
    padding-bottom: 30px;
}
.post-single .label {
    display: inline-block;
    background: #4154f1;
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 3px;
    margin-bottom: 10px;
}
.post-single h1 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 10px;
}
.post-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.share-buttons a {
    margin-left: 8px;
    color: #666;
}
.post-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 20px;
}
.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}
.post-content p {
    margin-bottom: 16px;
}
.post-content h2, .post-content h3 {
    margin: 24px 0 12px;
    font-size: 20px;
}
.post-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}
.post-content li {
    margin-bottom: 6px;
}
.contents-box {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    margin: 16px 0;
    font-size: 14px;
}
.note-box {
    background: #f0f8ff;
    border-left: 4px solid #4154f1;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}
.youtube-embed {
    margin: 20px 0;
}
.post-share {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.share-btn {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 3px;
    color: #fff;
    font-size: 14px;
}
.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #1da1f2; }
.share-btn.pi { background: #bd081c; }
.share-btn.li { background: #0077b5; }
.share-btn.re { background: #333; }
.share-btn.em { background: #666; }
.post-nav {
    margin: 30px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.prev-post span {
    font-size: 12px;
    color: #666;
}
.prev-post p {
    font-size: 14px;
    margin-top: 5px;
}
.author-box {
    display: flex;
    gap: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin: 30px 0;
}
.author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.author-bio h4 {
    font-size: 15px;
    margin-bottom: 5px;
}
.author-bio p {
    font-size: 13px;
    color: #555;
}
.author-social {
    margin-top: 8px;
}
.author-social a {
    margin-right: 8px;
    color: #666;
    font-size: 14px;
}
.related-posts {
    margin-top: 30px;
}
.related-posts h3 {
    font-size: 18px;
    margin-bottom: 15px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.related-item {
    position: relative;
}
.related-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}
.related-item .label {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 10px;
    padding: 2px 5px;
}
.related-item h4 {
    font-size: 13px;
    margin: 8px 0 4px;
    line-height: 1.4;
}
.related-item .meta {
    font-size: 11px;
    color: #666;
}
.add-comment-btn {
    display: block;
    margin: 0 auto;
    background: #fff;
    color: #4154f1;
    border: 1px solid #4154f1;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}