/*
Theme Name: TopicsInsider
Theme URI: https://topicsinsider.com
Author: TI Dev
Description: Editorial-style theme for TopicsInsider — fact-based explainers across Finance, Politics, Shopping, Sports, Technology and Trends.
Version: 2.0
*/

/* ---------------------------------------------------------------
   Design tokens
   Concept: an editor's reference desk — navy mast, warm-white
   "index card" paper, teal ink, and a rotated amber stamp used
   consistently as the one signature device (topic chips, post
   cards, single post header).
------------------------------------------------------------------ */
:root {
    --ink: #14213d;
    --ink-soft: #29365a;
    --paper: #f4f5f7;
    --card: #ffffff;
    --accent: #0f766e;
    --accent-soft: #e6f4f2;
    --stamp: #c8790a;
    --stamp-bg: #fdf1de;
    --text: #1c2333;
    --text-muted: #5b6472;
    --hairline: #e2e5ea;

    --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-meta: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* ---- Header ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 28px;
    background: var(--ink);
    color: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-title a {
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 21px;
    letter-spacing: 0.01em;
}

.site-nav {
    display: flex;
    gap: 4px;
}

.site-nav a {
    padding: 8px 12px;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

.site-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

/* ---- Page shell ---- */

.site-wrapper {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px 64px;
}

.site-main {
    padding-top: 40px;
}

/* ---- Hero ---- */

.page-title {
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 10px;
}

.page-intro {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 20px;
}

.hero-rule {
    width: 64px;
    height: 3px;
    background: var(--accent);
    border: none;
    margin: 20px 0 36px;
    border-radius: 2px;
}

.hero-cta {
    display: inline-block;
    background: var(--ink);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: 8px;
}

.hero-cta:hover {
    background: var(--accent);
    text-decoration: none;
}

/* ---- Explore by topic ---- */

.topic-explore {
    margin: 0 0 40px;
}

.topic-explore-title {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--ink);
    margin-bottom: 14px;
}

.topic-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid transparent;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
}

.topic-chip:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.topic-chip-count {
    background: var(--card);
    color: var(--accent);
    border-radius: 999px;
    font-family: var(--font-meta);
    font-size: 11.5px;
    padding: 1px 7px;
}

/* ---- Section headings ---- */

.section-heading {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
    margin: 44px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline);
}

/* ---- Post grid + cards ---- */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
    box-shadow: 0 12px 28px rgba(20, 33, 61, 0.08);
    transform: translateY(-2px);
}

.post-card-thumb {
    margin: -20px -20px 4px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.post-card-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-stamp {
    align-self: flex-start;
    font-family: var(--font-meta);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--stamp);
    background: var(--stamp-bg);
    border: 1px solid var(--stamp);
    border-radius: 3px;
    padding: 3px 7px;
    transform: rotate(-2deg);
}

.post-card-title,
.post-title {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.4;
    margin: 0;
}

.post-card-title a,
.post-title a {
    color: var(--ink);
}

.post-card-title a:hover,
.post-title a:hover {
    color: var(--accent);
    text-decoration: none;
}

.post-card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.post-meta {
    font-family: var(--font-meta);
    font-size: 12px;
    color: var(--text-muted);
}

.post-card-meta {
    margin-top: auto;
    padding-top: 8px;
}

.read-more {
    font-size: 13px;
    font-weight: 600;
}

/* ---- Single post ---- */

.single-post-header {
    margin-bottom: 28px;
}

.single-post-header .post-meta {
    margin-bottom: 10px;
}

.post-content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    max-width: 700px;
}

.post-content p {
    margin: 0 0 20px;
}

.post-content h2 {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--ink);
    margin: 36px 0 14px;
}

.post-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--ink);
    margin: 28px 0 12px;
}

.post-content ul,
.post-content ol {
    margin: 0 0 20px;
    padding-left: 22px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    margin: 24px 0;
    padding: 4px 20px;
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
    font-style: italic;
}

/* ---- Simple page content (About / Contact / Privacy) ---- */

.page-content {
    font-size: 16px;
    line-height: 1.75;
    max-width: 700px;
    color: var(--text);
}

.page-content h2 {
    font-family: var(--font-display);
    font-size: 21px;
    color: var(--ink);
    margin: 30px 0 12px;
}

.page-content p {
    margin: 0 0 18px;
}

/* ---- Topic cards (homepage "Explore by topic") ---- */

.topic-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 12px;
}

.topic-card {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-card-title {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--ink);
    margin: 0;
}

.topic-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.topic-card-link {
    font-size: 13px;
    font-weight: 600;
}

/* ---- Per-category preview sections ---- */

.category-section {
    margin-top: 52px;
}

.view-all-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 13.5px;
    font-weight: 600;
}

/* ---- Callout boxes (About / Feedback teasers) ---- */

.callout-box {
    background: var(--accent-soft);
    border-radius: 10px;
    padding: 24px 26px;
    margin-top: 48px;
}

.callout-title {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--ink);
    margin: 0 0 10px;
}

.callout-box p {
    font-size: 14.5px;
    color: var(--text);
    line-height: 1.7;
    margin: 0 0 4px;
}

.pagination,
.nav-links {
    margin-top: 40px;
    display: flex;
    gap: 12px;
    font-size: 14px;
}

/* ---- Footer ---- */

.site-footer {
    text-align: center;
    padding: 32px 16px 48px;
    color: var(--text-muted);
    font-size: 13.5px;
    border-top: 1px solid var(--hairline);
    margin-top: 40px;
}

/* ---- Empty state ---- */

.empty-state {
    font-size: 14.5px;
    color: var(--text-muted);
    padding: 20px 0;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 20px;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .page-title {
        font-size: 27px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
    .post-card {
        transition: none;
    }
    .post-card:hover {
        transform: none;
    }
}
