/*
Theme Name: Calixto Blog
Theme URI: https://blog.agenciacalixto.com.br
Author: Agência Calixto
Description: Tema revista premium — finanças, tecnologia e marketing.
Version: 2.0
Text Domain: calixto-blog
*/

/* ===========================
   VARIÁVEIS & RESET
=========================== */
:root {
  --bg:       #080810;
  --bg2:      #0f0f1a;
  --bg3:      #13131f;
  --bg4:      #1a1a2e;
  --red:      #E84040;
  --red2:     #ff6b6b;
  --red-glow: rgba(232,64,64,0.12);
  --border:   rgba(232,64,64,0.15);
  --border2:  rgba(255,255,255,0.07);
  --fg:       #ffffff;
  --fg2:      rgba(255,255,255,0.88);
  --muted:    rgba(255,255,255,0.55);
  --muted2:   rgba(255,255,255,0.28);
  --green:    #22c55e;
  --yellow:   #f59e0b;
  --blue:     #3b82f6;
  --font:     'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(232,64,64,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,64,64,0.015) 1px, transparent 1px);
  background-size: 52px 52px;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
img { max-width: 100%; height: auto; display: block; }

/* ===========================
   BREAKING BAR
=========================== */
.breaking-bar {
  background: var(--red);
  padding: 7px 32px;
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600;
  position: relative; z-index: 101;
  overflow: hidden;
}
.breaking-label {
  background: rgba(0,0,0,0.25); color: white;
  padding: 2px 10px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 1px; font-size: 10px;
}
.breaking-text { color: rgba(255,255,255,0.92); white-space: nowrap; }

/* ===========================
   NAV
=========================== */
.site-header {
  background: rgba(8,8,16,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  position: sticky; top: 0; z-index: 100;
}

.nav-top {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 32px;
}

.nav-logo { display: flex; align-items: center; gap: 12px; }

.nav-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: white; flex-shrink: 0;
}

.nav-brand { font-size: 16px; font-weight: 800; letter-spacing: -0.5px; }
.nav-brand span { color: var(--red); }
.nav-badge {
  font-size: 9px; background: var(--red-glow); border: 1px solid var(--border);
  color: var(--red2); padding: 2px 8px; border-radius: 99px;
  margin-left: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}

.nav-cats {
  border-top: 1px solid var(--border2);
  padding: 0 32px;
}
.nav-cats-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-cats-inner::-webkit-scrollbar { display: none; }
.nav-cat-link {
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 10px 16px; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-cat-link:hover { color: var(--fg); border-color: var(--red); }

.nav-search-btn {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 14px;
  font-size: 13px; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: border-color .2s, color .2s;
}
.nav-search-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

/* ===========================
   SEARCH OVERLAY
=========================== */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,8,16,0.97); backdrop-filter: blur(20px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 120px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-overlay-inner { width: 100%; max-width: 640px; padding: 0 32px; }
.search-overlay input {
  width: 100%; background: var(--bg2); border: 2px solid var(--red);
  border-radius: 14px; padding: 18px 24px;
  color: var(--fg); font-family: var(--font); font-size: 20px; outline: none;
}
.search-overlay-close {
  position: absolute; top: 32px; right: 32px;
  font-size: 28px; color: var(--muted); cursor: pointer; line-height: 1;
}
.search-overlay-close:hover { color: var(--fg); }

/* ===========================
   CONTAINER
=========================== */
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 32px; position: relative; z-index: 1;
}

/* ===========================
   FEATURE HERO (post destaque)
=========================== */
.hero-section { padding: 40px 0 0; }

.hero-post {
  display: grid; grid-template-columns: 1fr 420px;
  gap: 0; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border2);
  background: var(--bg2);
  min-height: 420px;
}

.hero-post-img {
  position: relative; overflow: hidden;
}
.hero-post-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.hero-post:hover .hero-post-img img { transform: scale(1.03); }
.hero-post-img-placeholder {
  width: 100%; height: 100%; min-height: 340px;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}

.hero-post-body {
  padding: 36px 40px;
  display: flex; flex-direction: column; justify-content: center;
}

.hero-post-body .post-cat { margin-bottom: 16px; }

.hero-post-body h2 {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.8px; line-height: 1.25;
  margin-bottom: 16px;
}
.hero-post-body h2 a { color: var(--fg); }
.hero-post-body h2 a:hover { color: var(--red2); }

.hero-post-body .excerpt {
  font-size: 15px; color: var(--muted);
  line-height: 1.65; margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.hero-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: var(--muted2);
  padding-top: 20px; border-top: 1px solid var(--border2);
}

/* ===========================
   SECTION LABEL
=========================== */
.section-label {
  display: flex; align-items: center; gap: 12px;
  margin: 44px 0 20px;
}
.section-label-text {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: var(--muted);
}
.section-label-line {
  flex: 1; height: 1px; background: var(--border2);
}
.section-label-accent {
  width: 24px; height: 3px; background: var(--red); border-radius: 99px;
}

/* ===========================
   GRID DE POSTS (3 colunas)
=========================== */
.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.post-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px; overflow: hidden;
  transition: border-color .2s, transform .18s;
  display: flex; flex-direction: column;
}
.post-card:hover {
  border-color: rgba(232,64,64,0.25);
  transform: translateY(-3px);
}

.post-card-img { position: relative; overflow: hidden; }
.post-card-img img {
  width: 100%; height: 180px; object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-img-placeholder {
  height: 140px; background: linear-gradient(135deg, var(--bg3) 0%, var(--bg4) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
}

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

.post-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}

.post-cat {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--red);
  background: var(--red-glow); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 99px;
}

.post-cat.cat-tech   { color: #60a5fa; background: rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.2); }
.post-cat.cat-mkt    { color: #34d399; background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.2); }
.post-cat.cat-fin    { color: #fbbf24; background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.2); }

.post-date { font-size: 11px; color: var(--muted2); }
.post-read-time { font-size: 11px; color: var(--muted2); }

.post-card-body h2 {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.3px; line-height: 1.4;
  margin-bottom: 10px; flex: 1;
}
.post-card-body h2 a { color: var(--fg); }
.post-card-body h2 a:hover { color: var(--red2); }

.post-excerpt {
  font-size: 13px; color: var(--muted);
  line-height: 1.6; margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.read-more {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: auto; transition: gap .2s;
}
.read-more:hover { color: var(--red2); gap: 9px; }

/* ===========================
   LISTA COMPACTA (sidebar / latest)
=========================== */
.compact-list { display: flex; flex-direction: column; gap: 0; }
.compact-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--border2);
}
.compact-item:last-child { border-bottom: none; }
.compact-thumb {
  width: 72px; height: 56px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.compact-thumb-placeholder {
  width: 72px; height: 56px; border-radius: 8px;
  background: var(--bg3); display: flex; align-items: center;
  justify-content: center; font-size: 22px; flex-shrink: 0;
}
.compact-body { flex: 1; }
.compact-body h3 { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.compact-body h3 a { color: var(--fg); }
.compact-body h3 a:hover { color: var(--red2); }
.compact-meta { font-size: 11px; color: var(--muted2); }

/* ===========================
   NEWSLETTER BANNER
=========================== */
.newsletter-banner {
  background: linear-gradient(135deg, var(--bg2) 0%, #1a0a1a 100%);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 44px 48px; margin: 48px 0;
  display: grid; grid-template-columns: 1fr auto;
  gap: 32px; align-items: center;
}
.newsletter-banner h3 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px;
}
.newsletter-banner h3 span { color: var(--red); }
.newsletter-banner p { font-size: 14px; color: var(--muted); }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px 18px;
  color: var(--fg); font-family: var(--font); font-size: 14px;
  width: 260px; outline: none; transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--red); }
.newsletter-form button {
  background: var(--red); border: none; border-radius: 10px;
  padding: 12px 24px; color: white; font-family: var(--font);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .2s; white-space: nowrap;
}
.newsletter-form button:hover { background: var(--red2); }

/* ===========================
   LAYOUT PRINCIPAL (main + sidebar)
=========================== */
.content-sidebar {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 40px; padding: 40px 0 80px;
}

.sidebar { position: sticky; top: 90px; align-self: start; }

.widget {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 14px; padding: 22px; margin-bottom: 20px;
}
.widget-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: var(--muted);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border2);
}

.sidebar-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-tag {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--bg3); border: 1px solid var(--border2);
  padding: 5px 12px; border-radius: 99px;
  transition: color .2s, border-color .2s;
}
.sidebar-tag:hover { color: var(--red); border-color: var(--border); }

/* ===========================
   SINGLE POST
=========================== */
.single-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 32px 80px; position: relative; z-index: 1;
}

.single-header { padding: 44px 0 32px; max-width: 760px; }

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

.single-header h1 {
  font-size: 38px; font-weight: 800;
  letter-spacing: -1.2px; line-height: 1.2;
  margin-bottom: 20px;
}

.single-header .lead {
  font-size: 18px; color: var(--muted);
  line-height: 1.7; border-left: 3px solid var(--red);
  padding-left: 20px;
}

.single-hero-img {
  width: 100%; max-height: 500px; object-fit: cover;
  border-radius: 16px; margin-bottom: 44px;
  border: 1px solid var(--border2);
}

.single-grid {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 56px; align-items: start;
}

.entry-content { font-size: 16px; line-height: 1.85; }
.entry-content h2 {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  margin: 44px 0 16px; color: var(--fg);
  border-left: 3px solid var(--red); padding-left: 16px;
}
.entry-content h3 {
  font-size: 19px; font-weight: 700; margin: 30px 0 12px;
}
.entry-content p { margin-bottom: 20px; color: var(--fg2); }
.entry-content ul, .entry-content ol { margin: 0 0 20px 26px; }
.entry-content li { margin-bottom: 10px; color: var(--fg2); }
.entry-content strong { color: var(--fg); font-weight: 700; }
.entry-content em { color: var(--muted); }
.entry-content a { color: var(--red); border-bottom: 1px solid rgba(232,64,64,0.3); }
.entry-content a:hover { border-color: var(--red); }
.entry-content blockquote {
  border-left: 3px solid var(--red);
  padding: 16px 20px; margin: 28px 0;
  background: var(--bg2); border-radius: 0 12px 12px 0;
  color: var(--muted); font-size: 15px;
}
.entry-content code {
  background: var(--bg3); border: 1px solid var(--border2);
  padding: 2px 8px; border-radius: 5px;
  font-size: 13px; font-family: monospace; color: var(--red2);
}
.entry-content pre {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 22px; overflow-x: auto; margin-bottom: 22px;
}
.entry-content pre code { background: none; border: none; padding: 0; color: var(--fg); }
.entry-content img { border-radius: 12px; margin: 20px 0; }

.post-tags {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border2);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.post-tags-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-right: 4px; }

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--border2);
}
.post-nav-item {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 12px; padding: 18px 20px;
  transition: border-color .2s;
}
.post-nav-item:hover { border-color: rgba(232,64,64,0.2); }
.post-nav-item.next { text-align: right; }
.post-nav-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.post-nav-title { font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.4; }

/* ===========================
   SINGLE SIDEBAR
=========================== */
.single-sidebar { position: sticky; top: 90px; }

/* ===========================
   FOOTER
=========================== */
.site-footer {
  border-top: 1px solid var(--border2);
  padding: 48px 32px 32px;
  position: relative; z-index: 1;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand-col .nav-brand { font-size: 16px; margin-bottom: 12px; }
.footer-desc { font-size: 13px; color: var(--muted); line-height: 1.65; max-width: 260px; }
.footer-col-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: var(--muted); margin-bottom: 14px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: var(--muted); }
.footer-links a:hover { color: var(--fg); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border2);
  font-size: 12px; color: var(--muted2);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--red); }

/* ===========================
   RESPONSIVO
=========================== */
@media (max-width: 1024px) {
  .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-post { grid-template-columns: 1fr; }
  .hero-post-img img { height: 280px; }
  .content-sidebar { grid-template-columns: 1fr; }
  .single-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .newsletter-banner { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .wrap, .site-footer, .single-wrap { padding-left: 20px; padding-right: 20px; }
  .posts-grid-3 { grid-template-columns: 1fr; }
  .nav-top { padding: 0 20px; }
  .nav-cats { padding: 0 20px; }
  .breaking-bar { padding: 7px 20px; }
  .single-header h1 { font-size: 26px; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; }
  .newsletter-banner { padding: 28px 24px; }
}
