/* ===========================================================
   StatsNetworks — Blog styles
   Matches the main site design system (dark theme, pink accent)
   =========================================================== */

:root {
    --primary-color: #ff4081;
    --secondary-color: #c2185b;
    --accent-color: #ff4081;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --text-muted: #8a93a6;
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1a3e;
    --bg-card: #141834;
    --bg-dark: #050810;
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 4px 20px rgba(255, 64, 129, 0.15);
    --shadow-medium: 0 8px 32px rgba(255, 64, 129, 0.2);
    --border-radius: 16px;
    --border-radius-large: 24px;
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: #ff77a3;
}

/* ---------- Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--primary-color);
}

.nav-cta {
    background: var(--gradient-primary);
    color: #fff !important;
    padding: 9px 20px;
    border-radius: 999px;
    font-weight: 600;
}

.nav-cta:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

/* ---------- Layout ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 28px 0 0;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 8px;
    opacity: 0.5;
}

/* ---------- Blog index ---------- */
.blog-hero {
    text-align: center;
    padding: 70px 24px 50px;
    max-width: 760px;
    margin: 0 auto;
}

.blog-hero .eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 18px;
}

.blog-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding: 30px 0 80px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

.post-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 64, 129, 0.4);
    box-shadow: var(--shadow-medium);
}

.post-card .card-banner {
    height: 8px;
    background: var(--gradient-primary);
}

.post-card .card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card .category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.post-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.post-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 20px;
}

.post-card .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-card .read-link {
    margin-top: 18px;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Article ---------- */
.article-header {
    text-align: center;
    padding: 30px 0 40px;
}

.article-header .category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 18px;
    display: block;
}

.article-header h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.8px;
    margin-bottom: 22px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-divider {
    height: 1px;
    background: var(--border-soft);
    margin: 0 0 44px;
}

.article-body {
    font-size: 1.08rem;
    color: #d7dbe6;
}

.article-body p {
    margin-bottom: 22px;
}

.article-body h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 44px 0 18px;
    letter-spacing: -0.4px;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 14px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body strong {
    color: #fff;
}

.article-body blockquote {
    border-left: 3px solid var(--primary-color);
    background: var(--bg-secondary);
    padding: 18px 24px;
    border-radius: 0 12px 12px 0;
    margin: 0 0 24px;
    color: var(--text-secondary);
    font-style: italic;
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- CTA box ---------- */
.cta-box {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-large);
    padding: 38px 32px;
    text-align: center;
    margin: 44px 0;
    box-shadow: var(--shadow-medium);
}

.cta-box h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    font-size: 1rem;
}

.cta-box .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--secondary-color);
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.cta-box .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    color: var(--secondary-color);
}

/* ---------- Related posts ---------- */
.related {
    border-top: 1px solid var(--border-soft);
    margin-top: 60px;
    padding: 44px 0 0;
}

.related h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition-normal);
}

.related-card:hover {
    border-color: rgba(255, 64, 129, 0.4);
    transform: translateY(-3px);
}

.related-card .category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.related-card h4 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 8px;
    line-height: 1.35;
}

/* ---------- Footer ---------- */
footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-soft);
    padding: 50px 24px 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 36px;
}

.footer-section h3 {
    font-size: 1.05rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1100px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    nav {
        gap: 16px;
    }
    nav a:not(.nav-cta) {
        display: none;
    }
    .article-body {
        font-size: 1.02rem;
    }
}
