/*
Theme Name: True Finance Wire
Theme URI: https://truefinancewire.com/
Author: True Finance Wire
Description: A fast, responsive, dark financial news theme designed for market coverage, stock-move explainers, economy news, investing and personal finance.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: true-finance-wire
Tags: news, blog, finance, dark, responsive-layout, custom-logo, featured-images, translation-ready
*/

:root {
  --tfw-bg: #070707;
  --tfw-panel: #101010;
  --tfw-panel-2: #171717;
  --tfw-border: #292929;
  --tfw-text: #f4f4f4;
  --tfw-muted: #a7a7a7;
  --tfw-gold: #d4a84e;
  --tfw-gold-2: #f0ca77;
  --tfw-danger: #ef6a6a;
  --tfw-success: #72c892;
  --tfw-max: 1240px;
  --tfw-radius: 16px;
  --tfw-shadow: 0 18px 50px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tfw-text);
  background: var(--tfw-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--tfw-gold-2); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto !important; width: auto; height: auto; top: 8px; left: 8px; padding: 12px 16px; background: #fff; color: #111; z-index: 100000; }

.tfw-container { width: min(calc(100% - 32px), var(--tfw-max)); margin-inline: auto; }
.tfw-main { min-height: 60vh; }
.tfw-section { padding: 34px 0; }
.tfw-section--tight { padding: 18px 0; }
.tfw-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--tfw-border); margin-bottom: 20px; padding-bottom: 12px; }
.tfw-section-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 2.2vw, 2.25rem); letter-spacing: -.02em; }
.tfw-section-title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 9px; background: var(--tfw-gold); }
.tfw-section-link { color: var(--tfw-gold-2); font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* Header */
.tfw-topbar { background: #020202; border-bottom: 1px solid #1b1b1b; color: var(--tfw-muted); font-size: .82rem; }
.tfw-topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.tfw-date { white-space: nowrap; }
.tfw-breaking { min-width: 0; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.tfw-breaking-label { color: #080808; background: var(--tfw-gold); padding: 4px 8px; border-radius: 999px; font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.tfw-ticker { display: flex; gap: 26px; overflow: hidden; white-space: nowrap; }
.tfw-ticker a { color: #d8d8d8; }
.tfw-site-header { position: sticky; top: 0; z-index: 1000; background: rgba(7,7,7,.95); border-bottom: 1px solid var(--tfw-border); backdrop-filter: blur(14px); }
.admin-bar .tfw-site-header { top: 32px; }
.tfw-brand-row { min-height: 94px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: center; gap: 22px; }
.tfw-logo-link, .custom-logo-link { display: inline-flex; align-items: center; max-width: 460px; }
.tfw-logo-link img, .custom-logo { width: min(460px, 100%); max-height: 86px; object-fit: contain; object-position: left center; }
.tfw-header-actions { display: flex; align-items: center; gap: 10px; }
.tfw-search-toggle, .tfw-menu-toggle, .tfw-newsletter-button { border: 1px solid var(--tfw-border); background: var(--tfw-panel); color: #fff; min-height: 42px; border-radius: 10px; padding: 0 14px; font-weight: 800; }
.tfw-newsletter-button { border-color: var(--tfw-gold); background: var(--tfw-gold); color: #080808; }
.tfw-menu-toggle { display: none; }
.tfw-search-panel { display: none; border-top: 1px solid var(--tfw-border); padding: 14px 0; }
.tfw-search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 46px; background: #121212; color: #fff; border: 1px solid #343434; border-radius: 10px; padding: 0 14px; }
.search-submit { min-height: 46px; border: 0; border-radius: 10px; padding: 0 18px; background: var(--tfw-gold); color: #080808; font-weight: 900; }
.tfw-nav-wrap { border-top: 1px solid #1f1f1f; }
.tfw-primary-nav ul { list-style: none; display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; }
.tfw-primary-nav a { display: block; padding: 13px 0; font-size: .88rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: #dedede; }
.tfw-primary-nav .current-menu-item > a, .tfw-primary-nav a:hover { color: var(--tfw-gold-2); }

/* Hero */
.tfw-hero { padding: 28px 0 16px; }
.tfw-hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 20px; }
.tfw-hero-main { position: relative; min-height: 520px; border-radius: var(--tfw-radius); overflow: hidden; background: linear-gradient(135deg,#1c1c1c,#0b0b0b); box-shadow: var(--tfw-shadow); }
.tfw-hero-main img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.tfw-hero-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.12) 15%, rgba(0,0,0,.88) 88%); }
.tfw-hero-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: clamp(24px, 4vw, 48px); }
.tfw-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--tfw-gold-2); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tfw-hero-title { margin: 10px 0 10px; max-width: 900px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4.5vw, 4.35rem); line-height: 1.02; letter-spacing: -.045em; }
.tfw-hero-excerpt { max-width: 760px; margin: 0 0 14px; color: #d2d2d2; font-size: 1.03rem; }
.tfw-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--tfw-muted); font-size: .78rem; }
.tfw-hero-side { display: grid; grid-template-rows: repeat(2, minmax(0,1fr)); gap: 20px; }
.tfw-side-feature { position: relative; min-height: 250px; border-radius: var(--tfw-radius); overflow: hidden; background: var(--tfw-panel); border: 1px solid var(--tfw-border); }
.tfw-side-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tfw-side-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.92)); }
.tfw-side-feature-content { position: absolute; z-index: 2; bottom: 0; padding: 22px; }
.tfw-side-feature h2 { margin: 8px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.12; }

/* Cards */
.tfw-grid { display: grid; gap: 20px; }
.tfw-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tfw-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.tfw-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.tfw-card { overflow: hidden; border: 1px solid var(--tfw-border); border-radius: 14px; background: var(--tfw-panel); transition: transform .2s ease, border-color .2s ease; }
.tfw-card:hover { transform: translateY(-3px); border-color: #4c4028; }
.tfw-card-media { aspect-ratio: 16/9; background: linear-gradient(135deg,#212121,#0c0c0c); overflow: hidden; }
.tfw-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tfw-card:hover .tfw-card-media img { transform: scale(1.035); }
.tfw-card-body { padding: 18px; }
.tfw-card-title { margin: 7px 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; }
.tfw-card-excerpt { color: #bdbdbd; margin: 0 0 12px; font-size: .91rem; }
.tfw-placeholder { height: 100%; display: grid; place-items: center; color: #65552f; font-weight: 900; letter-spacing: .14em; background: radial-gradient(circle at 70% 20%, rgba(212,168,78,.18), transparent 42%), linear-gradient(135deg,#1f1f1f,#0b0b0b); }

/* Market moves */
.tfw-move-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; }
.tfw-move-list { border: 1px solid var(--tfw-border); border-radius: var(--tfw-radius); background: var(--tfw-panel); overflow: hidden; }
.tfw-move-item { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px; border-bottom: 1px solid var(--tfw-border); }
.tfw-move-item:last-child { border-bottom: 0; }
.tfw-move-item-thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: #181818; }
.tfw-move-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tfw-move-item h3 { margin: 4px 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 1.13rem; line-height: 1.2; }
.tfw-analysis-box { border: 1px solid #4e4025; border-radius: var(--tfw-radius); background: linear-gradient(145deg, rgba(212,168,78,.12), rgba(16,16,16,.96)); padding: 24px; }
.tfw-analysis-box h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; }
.tfw-analysis-box ul { padding-left: 20px; color: #d0d0d0; }
.tfw-analysis-box li { margin-bottom: 10px; }
.tfw-disclaimer { color: var(--tfw-muted); font-size: .77rem; border-top: 1px solid rgba(212,168,78,.25); padding-top: 14px; margin-top: 16px; }

/* Feed and sidebar */
.tfw-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.tfw-feed { display: grid; gap: 18px; }
.tfw-list-card { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--tfw-border); }
.tfw-list-card-media { aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: #151515; }
.tfw-list-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tfw-list-card h2, .tfw-list-card h3 { margin: 5px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2vw, 2rem); line-height: 1.12; }
.tfw-sidebar { position: sticky; top: 150px; display: grid; gap: 18px; }
.tfw-widget { border: 1px solid var(--tfw-border); border-radius: 14px; background: var(--tfw-panel); padding: 20px; }
.tfw-widget-title, .widget-title { margin: 0 0 15px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.tfw-popular-item { padding: 12px 0; border-bottom: 1px solid var(--tfw-border); }
.tfw-popular-item:last-child { border-bottom: 0; padding-bottom: 0; }
.tfw-popular-item a { font-weight: 800; line-height: 1.25; }
.tfw-newsletter { background: linear-gradient(145deg,#211b10,#111); border-color: #4c3e24; }
.tfw-newsletter p { color: #c8c8c8; }
.tfw-newsletter input[type="email"] { width: 100%; min-height: 44px; background: #0b0b0b; border: 1px solid #504328; color: #fff; border-radius: 9px; padding: 0 12px; margin-bottom: 9px; }
.tfw-newsletter button { width: 100%; min-height: 44px; border: 0; border-radius: 9px; background: var(--tfw-gold); color: #080808; font-weight: 900; }
.tfw-ad-slot { min-height: 250px; display: grid; place-items: center; text-align: center; color: #686868; border: 1px dashed #363636; border-radius: 12px; background: #0c0c0c; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

/* Archive and article */
.tfw-page-header { padding: 42px 0 20px; border-bottom: 1px solid var(--tfw-border); }
.tfw-page-title { margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1; }
.tfw-page-description { max-width: 760px; color: var(--tfw-muted); }
.tfw-article-wrap { width: min(calc(100% - 32px), 860px); margin: 0 auto; padding: 46px 0; }
.tfw-article-header { margin-bottom: 28px; }
.tfw-article-title { margin: 10px 0 15px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 5vw, 5rem); line-height: 1.02; letter-spacing: -.045em; }
.tfw-article-deck { color: #c3c3c3; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.tfw-featured-image { margin: 28px 0; border-radius: 18px; overflow: hidden; }
.tfw-article-content { font-family: Georgia, "Times New Roman", serif; color: #e4e4e4; font-size: 1.13rem; line-height: 1.82; }
.tfw-article-content h2, .tfw-article-content h3, .tfw-article-content h4 { color: #fff; line-height: 1.18; margin-top: 1.8em; }
.tfw-article-content h2 { font-size: 2rem; }
.tfw-article-content a { color: var(--tfw-gold-2); text-decoration: underline; }
.tfw-article-content blockquote { border-left: 4px solid var(--tfw-gold); margin: 1.5em 0; padding: 10px 0 10px 24px; color: #cdcdcd; font-style: italic; }
.tfw-article-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.tfw-article-content th, .tfw-article-content td { border: 1px solid #3a3a3a; padding: 10px; }
.tfw-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tfw-post-tags a { border: 1px solid var(--tfw-border); border-radius: 999px; padding: 6px 11px; font-size: .78rem; }
.tfw-author-box { display: grid; grid-template-columns: 72px 1fr; gap: 16px; margin-top: 38px; padding: 22px; border: 1px solid var(--tfw-border); border-radius: 14px; background: var(--tfw-panel); }
.tfw-author-box img { border-radius: 50%; }
.tfw-pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.page-numbers { border: 1px solid var(--tfw-border); border-radius: 8px; padding: 8px 12px; }
.page-numbers.current { background: var(--tfw-gold); color: #080808; border-color: var(--tfw-gold); }

/* Comments */
.comments-area { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--tfw-border); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--tfw-border); }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; background: #111; color: #fff; border: 1px solid #343434; border-radius: 9px; padding: 11px; }
.form-submit input { border: 0; background: var(--tfw-gold); color: #080808; border-radius: 9px; padding: 11px 18px; font-weight: 900; }

/* Footer */
.tfw-site-footer { margin-top: 40px; border-top: 1px solid var(--tfw-border); background: #030303; }
.tfw-footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 34px; padding: 46px 0 30px; }
.tfw-footer-brand img { max-width: 380px; }
.tfw-footer-brand p { max-width: 520px; color: var(--tfw-muted); }
.tfw-footer-title { margin: 0 0 12px; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tfw-gold-2); }
.tfw-footer-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: #c9c9c9; }
.tfw-footer-bottom { border-top: 1px solid #1e1e1e; padding: 18px 0 28px; color: #818181; font-size: .78rem; }
.tfw-footer-bottom-inner { display: flex; justify-content: space-between; gap: 18px; }

/* WordPress core */
.alignwide { max-width: 1100px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 32px); }
.alignfull { max-width: none; width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.wp-caption, .gallery-caption { color: var(--tfw-muted); }
.sticky { outline: 1px solid rgba(212,168,78,.2); }
.bypostauthor { border-left: 2px solid var(--tfw-gold); }

@media (max-width: 1024px) {
  .tfw-hero-grid { grid-template-columns: 1fr; }
  .tfw-hero-side { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: none; }
  .tfw-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tfw-content-grid { grid-template-columns: 1fr; }
  .tfw-sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tfw-footer-grid { grid-template-columns: 1fr 1fr; }
  .tfw-footer-brand { grid-column: 1/-1; }
}

@media (max-width: 782px) {
  .admin-bar .tfw-site-header { top: 46px; }
  .tfw-date { display: none; }
  .tfw-topbar-inner { min-height: 34px; }
  .tfw-brand-row { min-height: 76px; grid-template-columns: minmax(0,1fr) auto; }
  .tfw-logo-link img, .custom-logo { max-height: 68px; }
  .tfw-newsletter-button { display: none; }
  .tfw-menu-toggle { display: inline-flex; align-items: center; }
  .tfw-nav-wrap { display: none; }
  .tfw-nav-wrap.is-open { display: block; }
  .tfw-primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; }
  .tfw-primary-nav a { padding: 10px 0; border-bottom: 1px solid #1e1e1e; }
  .tfw-hero-main { min-height: 430px; }
  .tfw-hero-side { grid-template-columns: 1fr; }
  .tfw-grid-3, .tfw-grid-2 { grid-template-columns: 1fr; }
  .tfw-move-grid { grid-template-columns: 1fr; }
  .tfw-list-card { grid-template-columns: 160px 1fr; }
  .tfw-sidebar { grid-template-columns: 1fr; }
  .tfw-footer-grid { grid-template-columns: 1fr; }
  .tfw-footer-brand { grid-column: auto; }
}

@media (max-width: 560px) {
  .tfw-container { width: min(calc(100% - 22px), var(--tfw-max)); }
  .tfw-breaking-label { display: none; }
  .tfw-ticker { gap: 18px; }
  .tfw-header-actions { gap: 6px; }
  .tfw-search-toggle, .tfw-menu-toggle { padding: 0 11px; min-height: 40px; }
  .tfw-hero { padding-top: 14px; }
  .tfw-hero-main { min-height: 390px; }
  .tfw-hero-content { padding: 22px; }
  .tfw-hero-excerpt { display: none; }
  .tfw-grid-4 { grid-template-columns: 1fr; }
  .tfw-move-item { grid-template-columns: 96px 1fr; gap: 12px; }
  .tfw-list-card { grid-template-columns: 1fr; }
  .tfw-footer-bottom-inner { flex-direction: column; }
  .tfw-article-wrap { width: min(calc(100% - 22px), 860px); }
}
