/*
Theme Name: CBI Builder
Theme URI: https://computerbuilderinfo.com
Author: Gorden Web Design
Author URI: https://gordenwebdesign.com
Description: Terminal Noir theme for Computer Builder Info
Version: 1.0.0
License: GPL v2 or later
Text Domain: cbi-builder
*/

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #d4d4d4;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: #7aa2f7; text-decoration: none; transition: color 0.15s; }
a:hover { color: #9ece6a; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; color: #e0e0e0; }
h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

/* === App Layout — left sidebar + main === */
.app-layout { display: flex; min-height: 100vh; }

/* === Left Sidebar === */
.sidebar-left {
    width: 280px; min-width: 280px; background: #0d0d0d; border-right: 1px solid #1a1a1a;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    overflow-y: auto; z-index: 50;
}
.sidebar-brand { padding: 32px 24px 20px; border-bottom: 1px solid #1a1a1a; }
.sidebar-brand h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.05em; color: #7aa2f7; line-height: 1.1; }
.sidebar-brand h2 { font-size: 1.1rem; font-weight: 700; color: #565f89; letter-spacing: 0.1em; text-transform: uppercase; }
.sidebar-brand .tagline { font-size: 0.8rem; color: #444; margin-top: 6px; }

.sidebar-progress { padding: 16px 24px; border-bottom: 1px solid #1a1a1a; }
.sidebar-progress .progress-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: #555; margin-bottom: 6px; }
.sidebar-progress .progress-bar { height: 3px; background: #1a1a1a; border-radius: 2px; overflow: hidden; }
.sidebar-progress .progress-fill { height: 100%; background: #7aa2f7; width: 0%; border-radius: 2px; }

.sidebar-nav { flex: 1; padding: 16px 12px; }
.sidebar-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
    color: #666; font-size: 0.85rem; font-weight: 500; transition: all 0.15s;
}
.sidebar-nav a:hover, .sidebar-nav .current-menu-item a { color: #c0caf5; background: #141416; }
.sidebar-nav a .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; color: #7aa2f7; }
.sidebar-nav .nav-cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #444; margin-left: auto; }

.sidebar-footer { padding: 16px 24px 24px; border-top: 1px solid #1a1a1a; }
.sidebar-footer .theme-credit { font-size: 0.7rem; color: #333; }
.sidebar-footer .version { font-size: 0.7rem; color: #444; }

/* === Main Content === */
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main-inner { flex: 1; padding: 40px; max-width: 900px; }

/* === Header (in main) === */
.main-header { padding: 20px 40px; border-bottom: 1px solid #1a1a1a; display: flex; align-items: center; justify-content: space-between; }
.main-header .breadcrumb { font-size: 0.75rem; color: #555; text-transform: uppercase; letter-spacing: 0.08em; }
.main-header .header-search { display: flex; gap: 8px; }
.main-header .header-search input {
    background: #141416; border: 1px solid #222; color: #c0caf5; padding: 6px 14px;
    border-radius: 6px; font-size: 0.8rem; width: 200px; outline: none;
}
.main-header .header-search input:focus { border-color: #7aa2f7; }
.main-header .header-search button {
    background: #7aa2f7; color: #0a0a0a; border: none; padding: 6px 16px; border-radius: 6px;
    cursor: pointer; font-weight: 700; font-size: 0.8rem;
}

/* === Hero Section (home) === */
.hero { padding: 60px 0 40px; border-bottom: 1px solid #1a1a1a; margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 12px; color: #e0e0e0; }
.hero p { color: #666; font-size: 1.05rem; max-width: 600px; margin-bottom: 24px; line-height: 1.6; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat { text-align: center; }
.hero-stat .stat-num { font-size: 1.8rem; font-weight: 800; color: #7aa2f7; line-height: 1; }
.hero-stat .stat-label { font-size: 0.7rem; color: #555; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

/* === Section Labels === */
.section-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: #7aa2f7; margin-bottom: 8px; font-weight: 700; }

/* === Post Cards === */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; margin: 24px 0; }
.post-card {
    background: #0d0d0d; border: 1px solid #1a1a1a; border-radius: 10px; overflow: hidden;
    transition: border-color 0.2s;
}
.post-card:hover { border-color: #2a2a2a; }
.post-card-thumb { aspect-ratio: 16/9; background: #111; overflow: hidden; position: relative; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-thumb .no-thumb { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; color: #1a1a1a; }
.post-card-body { padding: 20px; }
.post-card-cat { display: inline-block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: #7aa2f7; font-weight: 700; margin-bottom: 8px; }
.post-card-body h2 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.35; }
.post-card-body h2 a { color: #c0caf5; }
.post-card-body h2 a:hover { color: #7aa2f7; }
.post-card-meta { font-size: 0.7rem; color: #444; margin-bottom: 10px; }
.post-card-excerpt { font-size: 0.85rem; color: #666; line-height: 1.5; }

/* === Single Post === */
.single-post-content article { padding: 0; }
.single-post-content .post-meta { color: #555; font-size: 0.8rem; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #1a1a1a; }
.post-content { font-size: 1rem; line-height: 1.8; }
.post-content h2 { margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 1px solid #1a1a1a; }
.post-content h3 { margin: 28px 0 12px; }
.post-content p { margin-bottom: 18px; color: #aaa; }
.post-content ul, .post-content ol { margin: 0 0 18px 24px; color: #aaa; }
.post-content li { margin-bottom: 6px; }
.post-content pre { 
    background: #0d0d0d; border: 1px solid #1a1a1a; padding: 20px; border-radius: 8px;
    overflow-x: auto; margin: 20px 0; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.85rem;
}
.post-content code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.85em; color: #9ece6a; background: #0d0d0d; padding: 2px 6px; border-radius: 3px; }
.post-content pre code { background: none; padding: 0; color: #c0caf5; }
.post-content blockquote {
    border-left: 3px solid #7aa2f7; padding: 14px 20px; margin: 20px 0;
    background: #0d0d0d; border-radius: 0 8px 8px 0; color: #888; font-style: italic;
}
.post-content img { border-radius: 8px; margin: 20px 0; border: 1px solid #1a1a1a; }
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-content th, .post-content td { border: 1px solid #1a1a1a; padding: 10px 14px; text-align: left; font-size: 0.9rem; }
.post-content th { background: #0d0d0d; color: #7aa2f7; font-weight: 600; }

/* === AdSense Block === */
.ad-block { 
    border: 1px dashed #1a1a1a; border-radius: 8px; padding: 24px; text-align: center;
    margin: 32px 0; color: #333; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
}

/* === CTA Button === */
.btn-cta {
    display: inline-block; background: #7aa2f7; color: #0a0a0a; padding: 12px 28px;
    border-radius: 8px; font-weight: 700; font-size: 0.9rem; transition: all 0.15s;
    text-decoration: none; border: none; cursor: pointer;
}
.btn-cta:hover { background: #9ece6a; color: #0a0a0a; }

/* === Mark Complete Button === */
.btn-complete {
    display: inline-flex; align-items: center; gap: 8px; background: #0d0d0d;
    border: 1px solid #1a1a1a; color: #666; padding: 8px 16px; border-radius: 6px;
    font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
}
.btn-complete:hover { border-color: #7aa2f7; color: #7aa2f7; }

/* === Footer (main) === */
.site-footer { border-top: 1px solid #1a1a1a; padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.site-footer h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #555; margin-bottom: 12px; }
.site-footer p, .site-footer a { font-size: 0.8rem; color: #555; line-height: 1.6; }
.site-footer a:hover { color: #7aa2f7; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer .footer-bottom { grid-column: 1 / -1; text-align: center; padding-top: 20px; border-top: 1px solid #1a1a1a; color: #333; font-size: 0.7rem; }

/* === Page Template === */
.page-content h1 { margin-bottom: 24px; }

/* === Pagination === */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span {
    padding: 8px 14px; border-radius: 6px; background: #0d0d0d; border: 1px solid #1a1a1a;
    color: #666; font-size: 0.8rem;
}
.pagination .current { background: #7aa2f7; border-color: #7aa2f7; color: #0a0a0a; }
.pagination a:hover { border-color: #7aa2f7; color: #c0caf5; }

/* === 404 === */
.error-404 { text-align: center; padding: 80px 0; }
.error-404 h1 { font-size: 6rem; color: #1a1a1a; line-height: 1; }
.error-404 p { color: #666; margin: 16px 0; }

/* === Comments === */
.comments-area { margin-top: 32px; background: #0d0d0d; border: 1px solid #1a1a1a; border-radius: 10px; padding: 32px; }
.comments-area h3 { margin-bottom: 20px; }
.comment-form-comment textarea { width: 100%; background: #0a0a0a; border: 1px solid #1a1a1a; color: #c0caf5; padding: 12px; border-radius: 8px; font-family: inherit; }
.comment-form input[type="text"], .comment-form input[type="email"] { background: #0a0a0a; border: 1px solid #1a1a1a; color: #c0caf5; padding: 8px 14px; border-radius: 6px; }
.comment-form .submit { background: #7aa2f7; border: none; color: #0a0a0a; padding: 10px 24px; border-radius: 6px; cursor: pointer; font-weight: 700; }

/* === Search Results === */
.search-highlight { background: #1a2332; padding: 2px 4px; border-radius: 2px; }

/* === Mobile Responsive === */
@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar-left { width: 100%; min-width: 0; height: auto; position: relative; border-right: none; border-bottom: 1px solid #1a1a1a; }
    .sidebar-nav { display: none; }
    .sidebar-nav.open { display: block; }
    .main-inner { padding: 24px; }
    .posts-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 16px; flex-wrap: wrap; }
    .main-header { padding: 12px 24px; }
    .site-footer { padding: 24px; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .site-footer { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
}
