/* CircuitMasters Tech Blog — Ghost Theme */
/* 3-column layout: left sidebar | center feed | right sidebar */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: #f5f5f0;
    color: #222;
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.65;
    font-size: 15px;
}

/* ── Header ── */
.site-header {
    background: #1a1a2e;
    border-bottom: 3px solid #e63946;
    padding: 0;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.site-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.brand-icon { font-size: 28px; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: 1px; font-family: 'Merriweather', serif; }

.site-nav { flex: 1; }
.site-nav a { color: #ccc; text-decoration: none; margin-right: 18px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.site-nav a:hover { color: #e63946; }

.header-tagline { color: #888; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }

/* ── Breaking bar ── */
.breaking-bar {
    background: #e63946;
    color: #fff;
    padding: 7px 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.breaking-label { font-weight: 700; background: #fff; color: #e63946; padding: 2px 8px; font-size: 11px; letter-spacing: 1px; }

/* ── 3-column layout ── */
.site-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px;
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    grid-template-areas: "sidebar-left main sidebar-right";
    gap: 24px;
    align-items: start;
}

.sidebar-left  { grid-area: sidebar-left; }
.site-main     { grid-area: main; }
.sidebar-right { grid-area: sidebar-right; }

/* ── Widgets ── */
.widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #e63946;
    padding: 16px;
    margin-bottom: 20px;
}
.widget-title {
    font-family: 'Merriweather', serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.widget ul { list-style: none; }
.widget ul li { padding: 5px 0; border-bottom: 1px solid #f5f5f0; font-size: 13px; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: #333; text-decoration: none; }
.widget ul li a:hover { color: #e63946; }

.popular-list li, .recent-list li { display: flex; flex-direction: column; }
.recent-list .post-date { font-size: 11px; color: #999; }

.btn-youtube {
    display: block;
    background: #ff0000;
    color: #fff;
    text-decoration: none;
    text-align: center;
    padding: 10px;
    font-weight: 700;
    font-size: 13px;
    margin-top: 10px;
    border-radius: 4px;
}
.btn-youtube:hover { background: #cc0000; }

.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.email-input, .search-input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    font-size: 13px;
    width: 100%;
}
.btn-subscribe, .btn-search {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}
.btn-subscribe:hover, .btn-search:hover { background: #c1121f; }

.ad-placeholder {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Inline images ── */
.inline-image {
    margin: 28px 0;
    padding: 0;
}
.inline-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}
.inline-image figcaption {
    font-size: 12px;
    color: #999;
    text-align: center;
    padding: 8px 0;
    font-style: italic;
}

/* ── Ghost card width classes (required) ── */
.kg-width-wide { margin: 0 -40px; }
.kg-width-full { margin: 0 -40px; }
@media (max-width: 900px) {
    .kg-width-wide, .kg-width-full { margin: 0; }
}

/* ── Post cards (center feed) ── */
.post-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    margin-bottom: 24px;
    overflow: hidden;
}

.post-card-image-link { display: block; }
.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.post-card-content { padding: 18px 20px 20px; }

.post-card-tags { margin-bottom: 8px; }
.tag {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    margin-right: 6px;
}

.post-card-title {
    font-family: 'Merriweather', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}
.post-card-title a { color: #1a1a2e; text-decoration: none; }
.post-card-title a:hover { color: #e63946; }

.post-card-excerpt { color: #555; font-size: 14px; margin-bottom: 14px; line-height: 1.6; }

.post-card-meta { font-size: 12px; color: #999; margin-bottom: 14px; display: flex; gap: 16px; }

.btn-read-more {
    display: inline-block;
    background: #e63946;
    color: #fff;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 2px;
}
.btn-read-more:hover { background: #c1121f; }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}
.pagination a { color: #e63946; text-decoration: none; font-weight: 600; }

/* ── Footer ── */
.site-footer {
    background: #1a1a2e;
    color: #888;
    padding: 24px 20px;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand { color: #fff; font-weight: 700; font-size: 16px; }
.footer-links a { color: #888; text-decoration: none; margin-left: 16px; font-size: 13px; }
.footer-links a:hover { color: #e63946; }
.footer-copy { font-size: 12px; width: 100%; text-align: center; border-top: 1px solid #333; padding-top: 14px; margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .site-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas: "main" "sidebar-right" "sidebar-left";
    }
    .header-inner { flex-direction: column; align-items: flex-start; }
}
