/* ============================================
   DataPulse Theme — Main Stylesheet
   Dark futuristic data-driven aesthetic
   ============================================ */

/* ── CSS Custom Properties ── */
:root {
    --bg: #050A14;
    --surface: #0B1425;
    --surface2: #0F1D35;
    --border: #1A2F52;
    --accent: #00D4FF;
    --accent2: #0066FF;
    --gold: #FFB800;
    --text: #E8F0FF;
    --muted: #5A7399;
    --green: #00E676;
    --red: #FF5252;

    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --radius: 10px;
    --radius-lg: 16px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 0 20px rgba(0, 212, 255, 0.15);
    --transition: 0.25s ease;

    --container: 1200px;
    --sidebar-width: 320px;
    --header-height: 72px;
    --header-height-shrunk: 56px;
}

/* ── CSS Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

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

a:hover,
a:focus-visible {
    color: var(--text);
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 3vw, 2rem); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text);
    opacity: 0.9;
}

strong { font-weight: 500; color: var(--text); }
em { font-style: italic; }

.accent-text { color: var(--accent); }
.gold-text { color: var(--gold); }
.green-text { color: var(--green); }
.red-text { color: var(--red); }
.muted-text { color: var(--muted); }

/* ── Layout ── */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrap {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
    align-items: start;
}

.content-main {
    min-width: 0;
}

.content-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.section {
    padding: 60px 0;
}

/* ── Reading Progress Bar ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    z-index: 10000;
    transition: width 0.1s linear;
}

/* ── Header / Navbar ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: height var(--transition), background var(--transition);
}

.site-header.shrunk {
    height: var(--header-height-shrunk);
    background: rgba(5, 10, 20, 0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo img,
.site-logo svg {
    height: 32px;
    width: auto;
}

.site-logo .logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
}

.site-logo .logo-text span {
    color: var(--accent);
}

/* Primary Nav */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-nav a {
    position: relative;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--transition);
}

.primary-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav .current-menu-item a {
    color: var(--text);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav .current-menu-item a::after {
    transform: scaleX(1);
}

/* Header Search */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search .search-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: 50%;
    transition: color var(--transition), background var(--transition);
}

.header-search .search-toggle:hover {
    color: var(--accent);
    background: var(--surface);
}

.header-search .search-field {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    padding: 8px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.875rem;
    overflow: hidden;
    transition: width var(--transition), padding var(--transition), opacity var(--transition);
    opacity: 0;
}

.header-search.open .search-field {
    width: 220px;
    padding: 8px 14px;
    opacity: 1;
}

/* Header CTA */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #fff;
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: 999px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.header-cta:hover {
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
    color: #fff;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
    background: none;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 80px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.mobile-drawer a:hover {
    color: var(--accent);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ── Breadcrumbs ── */
.breadcrumb {
    padding: 16px 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

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

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

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

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

/* ── Hero Section ── */
.hero {
    padding: 100px 0 40px;
    border-bottom: 1px solid var(--border);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    margin-bottom: 12px;
    font-weight: 800;
}

.hero h1 .highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: var(--muted);
    max-width: 640px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(90deg, var(--green), var(--accent));
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(90deg, var(--gold), var(--accent));
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.stat-card .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-card .stat-change.up { color: var(--green); }
.stat-card .stat-change.down { color: var(--red); }

.stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ── Data Table ── */
.dp-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
}

.dp-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-table-header .icon {
    color: var(--accent);
}

.dp-table {
    width: 100%;
}

.dp-table thead th {
    padding: 12px 20px;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.dp-table tbody td {
    padding: 14px 20px;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(26, 47, 82, 0.4);
    color: var(--text);
}

.dp-table tbody tr:last-child td {
    border-bottom: none;
}

.dp-table tbody tr:hover td {
    background: var(--surface2);
}

.dp-table .value-highlight {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
}

/* ── Bar Chart ── */
.dp-bar-chart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
}

.dp-bar-chart .chart-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.dp-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 80px;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dp-bar-row:last-child {
    margin-bottom: 0;
}

.dp-bar-label {
    font-size: 0.8125rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-bar-track {
    height: 28px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    border-radius: var(--radius-sm);
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dp-bar-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    text-align: right;
    color: var(--text);
}

/* ── City Comparison Cards ── */
.city-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
    margin: 24px 0;
}

.city-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.city-card .city-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.city-card .city-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(26, 47, 82, 0.4);
    font-size: 0.8125rem;
}

.city-card .city-stat:last-child {
    border-bottom: none;
}

.city-card .city-stat .label {
    color: var(--muted);
}

.city-card .city-stat .value {
    font-weight: 500;
    color: var(--text);
}

.city-compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--muted);
}

/* ── FAQ Accordion ── */
.faq-section {
    margin: 40px 0;
}

.faq-section .section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    background: none;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question .faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    transition: transform var(--transition);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 20px 18px;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.7;
}

/* ── Affiliate CTA ── */
.affiliate-cta {
    background: linear-gradient(135deg, var(--surface2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.affiliate-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent2), var(--accent), var(--gold));
}

.affiliate-cta .cta-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.affiliate-cta .cta-headline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.375rem;
    margin-bottom: 8px;
    color: var(--text);
}

.affiliate-cta .cta-sub {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.affiliate-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 999px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.affiliate-cta .cta-button:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

.affiliate-cta .cta-disclosure {
    font-size: 0.6875rem;
    color: var(--muted);
    margin-top: 14px;
    opacity: 0.7;
}

/* ── Ad Unit ── */
.dp-ad-unit {
    margin: 30px 0;
    text-align: center;
}

.dp-ad-unit .ad-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
    opacity: 0.5;
    margin-bottom: 6px;
}

/* ── Related Posts ── */
.related-posts {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-posts .section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition), transform var(--transition);
}

.related-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.related-card .related-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.related-card .related-title a {
    color: var(--text);
}

.related-card .related-title a:hover {
    color: var(--accent);
}

.related-card .related-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.related-card .related-salary {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--accent);
    margin-top: 10px;
}

/* ── Sidebar ── */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.sidebar .widget-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar .widget-link {
    display: block;
    padding: 8px 0;
    font-size: 0.8125rem;
    color: var(--muted);
    border-bottom: 1px solid rgba(26, 47, 82, 0.4);
}

.sidebar .widget-link:last-child {
    border-bottom: none;
}

.sidebar .widget-link:hover {
    color: var(--accent);
}

/* ── Footer ── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.footer-about .footer-logo img,
.footer-about .footer-logo svg {
    height: 28px;
}

.footer-about p {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.6;
}

.footer-col h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    padding: 4px 0;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted);
}

.footer-disclaimer {
    padding: 16px 0;
    font-size: 0.6875rem;
    color: var(--muted);
    opacity: 0.6;
    text-align: center;
}

/* ── Front Page ── */
.fp-hero {
    padding: 140px 0 80px;
    text-align: center;
}

.fp-hero h1 {
    font-weight: 800;
    margin-bottom: 16px;
}

.fp-hero p {
    font-size: 1.0625rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.fp-search {
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.fp-search input {
    width: 100%;
    padding: 14px 52px 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color var(--transition);
}

.fp-search input:focus {
    border-color: var(--accent);
}

.fp-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-bar .stat {
    text-align: center;
}

.stats-bar .stat .num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
}

.stats-bar .stat .desc {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: border-color var(--transition), transform var(--transition);
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.category-card .cat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.category-card p {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.post-card-thumb {
    width: 100%;
    height: 160px;
    background: var(--surface2);
    object-fit: cover;
}

.post-card-body {
    padding: 16px;
}

.post-card-body .post-cat {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 8px;
}

.post-card-body h3 {
    font-size: 0.9375rem;
    line-height: 1.35;
    margin-bottom: 8px;
}

.post-card-body h3 a {
    color: var(--text);
}

.post-card-body h3 a:hover {
    color: var(--accent);
}

.post-card-body .post-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.post-card-body .post-salary {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
    margin-top: 8px;
}

/* How It Works */
.hiw-section {
    padding: 60px 0;
}

.hiw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hiw-step {
    text-align: center;
    padding: 32px 20px;
}

.hiw-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.hiw-step h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.hiw-step p {
    font-size: 0.8125rem;
    color: var(--muted);
}

/* ── Archive ── */
.archive-header {
    padding: 100px 0 40px;
    border-bottom: 1px solid var(--border);
}

.archive-header h1 {
    font-weight: 800;
    margin-bottom: 8px;
}

.archive-header .archive-desc {
    color: var(--muted);
    font-size: 1rem;
    max-width: 600px;
}

.archive-header .archive-count {
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--accent);
}

.filter-bar {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.8125rem;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--accent);
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--muted);
    transition: all var(--transition);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 600;
}

/* ── Search Page ── */
.search-header {
    padding: 100px 0 40px;
    text-align: center;
}

.search-header .search-form {
    max-width: 500px;
    margin: 20px auto 0;
    position: relative;
}

.search-header .search-form input[type="search"] {
    width: 100%;
    padding: 12px 52px 12px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.9375rem;
}

.search-header .search-form button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 18px;
    background: var(--accent);
    border-radius: 999px;
    color: var(--bg);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ── 404 Page ── */
.error-404 {
    padding: 140px 0;
    text-align: center;
}

.error-404 .error-code {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 8rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-404 h1 {
    font-size: 1.5rem;
    margin: 16px 0 12px;
}

.error-404 p {
    color: var(--muted);
    margin-bottom: 24px;
}

.error-404 .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    transition: box-shadow var(--transition);
}

.error-404 .btn:hover {
    box-shadow: var(--shadow-accent);
    color: #fff;
}

/* ── Table of Contents ── */
.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.toc .toc-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 12px;
    color: var(--text);
}

.toc ol {
    counter-reset: toc;
    padding-left: 0;
}

.toc li {
    counter-increment: toc;
    padding: 6px 0;
    font-size: 0.8125rem;
}

.toc li::before {
    content: counter(toc) ".";
    color: var(--accent);
    margin-right: 8px;
    font-weight: 500;
}

.toc li a {
    color: var(--muted);
}

.toc li a:hover {
    color: var(--accent);
}

.toc li.toc-h3 {
    padding-left: 20px;
    font-size: 0.75rem;
}

/* ── Content Styles (for the_content) ── */
.entry-content h2 {
    padding-top: 8px;
}

.entry-content h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 12px;
    vertical-align: middle;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.25rem 1.5rem;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: var(--text);
    opacity: 0.9;
}

.entry-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--muted);
}

.entry-content code {
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent);
}

.entry-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.entry-content table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
}

.entry-content table th {
    background: var(--surface2);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.entry-content table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(26, 47, 82, 0.4);
    font-size: 0.875rem;
}

.entry-content table tr:last-child td {
    border-bottom: none;
}

.entry-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

/* ── Animations ── */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Utility ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ── Responsive — Tablet (max 1024px) ── */
@media (max-width: 1024px) {
    .content-wrap {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hiw-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ── Responsive — Mobile (max 768px) ── */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --header-height-shrunk: 52px;
    }

    .container {
        padding: 0 16px;
    }

    .primary-nav,
    .header-search,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 80px 0 32px;
    }

    .stat-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dp-bar-row {
        grid-template-columns: 100px 1fr 60px;
        gap: 8px;
    }

    .city-compare {
        grid-template-columns: 1fr;
    }

    .city-compare-vs {
        padding: 8px 0;
    }

    .post-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 24px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .fp-hero {
        padding: 100px 0 48px;
    }

    .error-404 .error-code {
        font-size: 5rem;
    }

    .affiliate-cta {
        padding: 24px 16px;
    }
}

/* ── Print ── */
@media print {
    .site-header,
    .site-footer,
    .dp-ad-unit,
    .affiliate-cta,
    .sidebar,
    .reading-progress,
    .mobile-drawer,
    .mobile-overlay,
    .menu-toggle {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .container {
        max-width: 100%;
    }

    .content-wrap {
        grid-template-columns: 1fr;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
