/*
Theme Name: InvesteBlog Premium
Theme URI: https://investeblog.com.br
Author: InvesteBlog
Author URI: https://investeblog.com.br
Description: Tema premium para portal de investimentos, ativos da bolsa, renda fixa, cripto e conteudo editorial com foco em SEO, performance e usabilidade.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: Proprietary
Text Domain: investeblog
*/

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --ink: #101820;
  --muted: #5d6975;
  --line: #dbe3eb;
  --primary: #006d5b;
  --primary-strong: #004f43;
  --accent: #d49a24;
  --blue: #1b5f9e;
  --red: #bb3f3f;
  --green: #07895f;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(18, 31, 45, .10);
  --wrap: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img, svg { max-width: 100%; height: auto; }
button, input, select { font: inherit; }

.wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
}
.skip-link:focus { top: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar {
  background: #101820;
  color: #d8e2ea;
  font-size: 13px;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}
.ticker-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.ticker-strip::-webkit-scrollbar { display: none; }
.ticker-up { color: #77d2af; }
.ticker-down { color: #ff9c9c; }

.navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 186px;
}
.brand svg { width: 190px; display: block; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  color: #26323d;
  font-weight: 650;
  font-size: 14px;
}
.main-nav a:hover, .main-nav .current-menu-item > a {
  background: var(--surface-soft);
  color: var(--primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-button, .primary-button, .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 750;
  line-height: 1;
}
.icon-button {
  width: 40px;
  background: var(--surface-soft);
  color: var(--ink);
}
.primary-button {
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0,109,91,.20);
}
.primary-button:hover { background: var(--primary-strong); color: #fff; }
.ghost-button {
  padding: 0 14px;
  background: #fff;
  border-color: var(--line);
}

.market-hero {
  background:
    linear-gradient(120deg, rgba(16,24,32,.96), rgba(0,79,67,.92)),
    radial-gradient(circle at 80% 20%, rgba(212,154,36,.35), transparent 35%);
  color: #fff;
  padding: 38px 0 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 28px;
  align-items: start;
}
.hero-copy h1 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}
.hero-copy p {
  max-width: 690px;
  margin: 0 0 22px;
  color: #d8e5eb;
  font-size: 18px;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 700px;
  padding: 8px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-search input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  color: var(--ink);
  padding: 0 12px;
}
.hero-search button { min-width: 130px; }
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.quick-links a {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: #eaf3f2;
  font-size: 13px;
  font-weight: 700;
}
.quick-links a:hover { background: rgba(255,255,255,.10); color: #fff; }

.market-panel {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.panel-head, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.panel-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .section-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}
.market-list {
  display: grid;
}
.market-row {
  display: grid;
  grid-template-columns: 82px minmax(82px, 1fr) 96px 70px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
.market-row:last-child { border-bottom: 0; }
.ticker-code { display: block; font-weight: 850; }
.ticker-name { display: block; color: var(--muted); font-size: 13px; }
.spark {
  height: 28px;
  min-width: 80px;
}
.price { font-weight: 800; text-align: right; }
.change { font-weight: 800; text-align: right; }
.positive { color: var(--green); }
.negative { color: var(--red); }

.section {
  padding: 38px 0;
}
.section-head {
  margin-bottom: 18px;
}
.section-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.asset-card, .article-card, .tool-panel, .quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(18,31,45,.05);
}
.asset-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  min-height: 190px;
}
.asset-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.asset-symbol {
  display: block;
  font-size: 20px;
  font-weight: 900;
}
.asset-name {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.asset-type {
  padding: 4px 7px;
  background: var(--surface-soft);
  border-radius: 999px;
  color: #41505d;
  font-size: 11px;
  font-weight: 850;
}
.asset-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  display: block;
  font-size: 16px;
}
.mini-chart {
  width: 100%;
  height: 42px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.article-card {
  overflow: hidden;
}
.article-thumb {
  height: 150px;
  background: linear-gradient(135deg, #e8f1ef, #f8ecd2);
  display: grid;
  place-items: center;
}
.article-card .body { padding: 16px; }
.article-card h3 {
  min-height: 54px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.sidebar-stack {
  display: grid;
  gap: 16px;
}
.tool-panel {
  padding: 18px;
}
.tool-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.tool-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 750;
}

.asset-header {
  background: #101820;
  color: #fff;
  padding: 30px 0;
}
.asset-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}
.asset-header h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 4vw, 48px);
}
.quote-price {
  text-align: right;
}
.quote-price strong {
  display: block;
  font-size: 36px;
}
.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  padding: 24px 0 44px;
}
.quote-card {
  padding: 18px;
}
.big-chart {
  height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(to right, rgba(219,227,235,.75) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(219,227,235,.75) 1px, transparent 1px),
    #fff;
  background-size: 72px 1px, 1px 58px;
  position: relative;
  overflow: hidden;
}
.big-chart svg {
  position: absolute;
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
}
.fundamentals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.fundamental {
  padding: 14px;
  background: var(--surface-soft);
  border-radius: 7px;
}
.fundamental small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.fundamental strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.site-footer {
  background: #101820;
  color: #d6e0e8;
  padding: 34px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}
.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 15px;
}
.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: #d6e0e8; }
.site-footer a:hover { color: #fff; }
.site-footer svg text:first-of-type { fill: #ffffff; }
.site-footer svg text:nth-of-type(2) { fill: #77d2af; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #9fb0bc;
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero-grid, .content-grid, .quote-layout { grid-template-columns: 1fr; }
  .asset-grid, .article-grid, .fundamentals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav { display: none; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 22px, var(--wrap)); }
  .topbar .wrap { align-items: start; flex-direction: column; padding: 8px 0; }
  .navrow { min-height: 66px; gap: 12px; }
  .brand svg { width: 162px; }
  .primary-button span { display: none; }
  .hero-search { display: grid; }
  .hero-search button { width: 100%; }
  .market-row { grid-template-columns: 70px 1fr 64px; }
  .market-row .spark { display: none; }
  .asset-grid, .article-grid, .fundamentals, .footer-grid { grid-template-columns: 1fr; }
  .asset-title-row { grid-template-columns: 1fr; }
  .quote-price { text-align: left; }
}
