/*
Theme Name: NexArticle Blog
Theme URI: https://nexarticle.ai
Author: NexArticle
Author URI: https://nexarticle.ai
Description: Tema dark moderno do blog NexArticle. Inspirado na identidade visual do nexarticle.ai com glow orbs, grid pattern e cards com bordas sutis.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexarticle
Tags: dark, modern, blog, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============ DESIGN TOKENS ============ */
:root {
  --bg: #060a14;
  --bg-elev: #0b1020;
  --bg-card: rgba(255, 255, 255, 0.015);
  --bg-card-hover: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(59, 130, 246, 0.25);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --accent: #06b6d4;
  --electric: #00d4ff;
  --text: #fafafa;
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-dim: rgba(255, 255, 255, 0.45);
  --text-faint: rgba(255, 255, 255, 0.25);
  --container: 1200px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-glow: 0 0 50px -15px rgba(59, 130, 246, 0.25);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.2);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============ RESET & BASE ============ */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--electric); }
button { font: inherit; cursor: pointer; }
::selection { background: var(--primary); color: #fff; }

/* ============ BACKGROUND EFFECTS ============ */
.bg-effects { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 72px 72px;
}
.bg-orb { position: fixed; border-radius: 50%; filter: blur(150px); pointer-events: none; z-index: 0; }
.bg-orb-1 { width: 900px; height: 900px; left: -25%; top: -15%; background: rgba(0, 212, 255, 0.06); animation: drift 25s ease-in-out infinite; }
.bg-orb-2 { width: 700px; height: 700px; right: -15%; top: 25%; background: rgba(6, 182, 212, 0.04); animation: drift 30s ease-in-out infinite reverse; }
.bg-orb-3 { width: 500px; height: 500px; left: 20%; bottom: -10%; background: rgba(59, 130, 246, 0.05); animation: drift 40s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ============ LAYOUT ============ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; position: relative; }
.site-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; padding-top: 80px; }

/* ============ HEADER ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6, 10, 20, 0.7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; position: relative; }
.brand:hover { color: var(--text); }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800; color: #fff; font-size: 14px;
}
.brand img { height: 32px; width: auto; }
.brand .brand-tag {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  color: var(--text-muted); margin-left: 4px;
}
.nav-pill {
  display: none; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  backdrop-filter: blur(12px); border-radius: 999px;
}
.nav-pill a {
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); border-radius: 999px; transition: all .2s ease;
}
.nav-pill a:hover, .nav-pill .current-menu-item > a, .nav-pill .current_page_item > a {
  background: rgba(255,255,255,0.06); color: var(--text);
}
.nav-pill ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.header-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px; transition: transform .2s ease, box-shadow .2s ease;
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--primary-glow); color: #fff; }
.mobile-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  color: var(--text);
}
.mobile-menu {
  display: none; padding: 16px 0;
  border-top: 1px solid var(--border);
  background: rgba(6, 10, 20, 0.95); backdrop-filter: blur(14px);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a { display: block; padding: 14px 24px; font-size: 15px; color: var(--text-muted); }
.mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
@media (min-width: 1024px) { .nav-pill { display: flex; } .mobile-toggle { display: none; } }

/* ============ HERO ============ */
.hero { position: relative; padding: 120px 0 80px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 24px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  border-radius: 999px; letter-spacing: 0.02em; text-transform: uppercase;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--electric); box-shadow: 0 0 8px var(--electric);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.04em;
  margin: 0 0 20px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--electric), var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-muted); max-width: 640px; margin: 0 auto; line-height: 1.6;
}

/* ============ SECTION TITLES ============ */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; gap: 16px; }
.section-title h2 { font-size: clamp(22px, 2.5vw, 28px); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.section-title .view-all { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.section-title .view-all:hover { color: var(--electric); }

/* ============ POST GRID ============ */
.posts { padding: 24px 0 80px; }
.post-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  position: relative; display: flex; flex-direction: column;
  overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--bg-card);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.post-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.post-card .glow {
  position: absolute; top: -50px; right: -50px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(59, 130, 246, 0.08);
  filter: blur(60px); opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.post-card:hover .glow { opacity: 1; }
.post-card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-elev); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .thumb-fallback {
  display: flex; align-items: center; justify-content: center; height: 100%;
  background:
    radial-gradient(circle at 30% 30%, rgba(59,130,246,0.15), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(6,182,212,0.12), transparent 60%),
    var(--bg-elev);
  font-size: 48px; font-weight: 800;
  color: rgba(255,255,255,0.15); letter-spacing: -0.04em;
}
.post-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cat-pill {
  display: inline-flex; align-items: center; padding: 3px 10px;
  font-size: 11px; font-weight: 600; color: var(--electric);
  background: rgba(0, 212, 255, 0.08); border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}
.cat-pill:hover { background: rgba(0, 212, 255, 0.15); color: var(--electric); }
.post-card h3.post-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin: 0 0 10px; }
.post-card h3.post-title a { color: var(--text); }
.post-card h3.post-title a:hover { color: var(--electric); }
.post-card .excerpt { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 18px; flex: 1; }
.post-card .meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-dim);
  padding-top: 14px; border-top: 1px solid var(--border);
}
.post-card .meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

/* ============ PAGINATION ============ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 32px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-size: 14px; font-weight: 500; transition: all .2s ease;
}
.pagination a:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-card-hover); }
.pagination .current { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; color: #fff; }

/* ============ SINGLE POST ============ */
.article-header { text-align: center; padding: 60px 0 40px; max-width: 760px; margin: 0 auto; }
.article-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; margin-bottom: 24px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  border-radius: 999px;
}
.article-back:hover { color: var(--text); border-color: var(--border-hover); }
.article-cats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.article-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.03em;
  margin: 0 0 24px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.75) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.article-meta { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; }
.article-meta .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
}
.article-meta .author { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); }
.article-featured {
  max-width: 1080px; margin: 24px auto 48px;
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--border); position: relative;
}
.article-featured img { width: 100%; height: auto; display: block; }
.article-featured::after {
  content: ''; position: absolute; inset: 0;
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 100px rgba(6, 10, 20, 0.3);
  pointer-events: none;
}
.article-body { max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.8; color: rgba(255,255,255,0.85); }
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 2em 0 0.6em; color: var(--text); }
.article-body h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 1.6em 0 0.5em; color: var(--text); }
.article-body h4 { font-size: 18px; font-weight: 700; margin: 1.4em 0 0.4em; }
.article-body p { margin: 0 0 1.2em; }
.article-body a {
  color: var(--electric); text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.4); text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: var(--electric); }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body em { font-style: italic; }
.article-body img, .article-body figure { border-radius: var(--radius); overflow: hidden; margin: 1.8em 0; }
.article-body figcaption { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 8px; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 1em 0; }
.article-body li { margin: 0.4em 0; }
.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 16px 20px; margin: 1.5em 0;
  background: rgba(59, 130, 246, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-muted);
}
.article-body code {
  font-family: var(--font-mono); font-size: 0.9em;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.06); color: var(--electric);
}
.article-body pre {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  overflow-x: auto; font-size: 14px; line-height: 1.55;
}
.article-body pre code { background: none; padding: 0; color: var(--text); }
.article-body hr { border: none; height: 1px; background: var(--border); margin: 2em 0; }
.article-body .alignleft { float: left; margin: 0 1.5em 1em 0; }
.article-body .alignright { float: right; margin: 0 0 1em 1.5em; }
.article-body .aligncenter { display: block; margin: 1.5em auto; }
.article-body .wp-caption { max-width: 100%; }

.article-tags { max-width: 720px; margin: 40px auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-tags .label { font-size: 13px; color: var(--text-dim); margin-right: 4px; }
.tag-pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px; font-size: 12px; font-weight: 500;
  color: var(--text-muted); background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 999px;
}
.tag-pill:hover { color: var(--electric); border-color: var(--border-hover); background: rgba(0,212,255,0.05); }

/* ============ RELATED ============ */
.related { max-width: 1080px; margin: 80px auto 40px; padding: 0 24px; }

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 48px 0 32px; background: rgba(255,255,255,0.01); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand h4 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.footer-brand p { font-size: 14px; color: var(--text-muted); max-width: 360px; margin: 0; line-height: 1.6; }
.footer-col h5 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 10px; }
.footer-col a { font-size: 14px; color: var(--text-muted); }
.footer-col a:hover { color: var(--electric); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-dim); }

/* ============ SEARCH ============ */
.search-form { position: relative; max-width: 480px; margin: 0 auto; }
.search-form input[type="search"] {
  width: 100%; padding: 14px 16px 14px 48px;
  font-size: 14px; color: var(--text);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 999px; outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.search-form input[type="search"]:focus { border-color: var(--border-hover); background: var(--bg-card-hover); }
.search-form input[type="search"]::placeholder { color: var(--text-dim); }
.search-form svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.search-form button[type="submit"] {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none; border-radius: 999px;
}

/* ============ 404 ============ */
.not-found { text-align: center; padding: 100px 0; }
.not-found .code {
  font-size: clamp(80px, 16vw, 160px);
  font-weight: 900; letter-spacing: -0.06em; line-height: 1; margin: 0 0 16px;
  background: linear-gradient(135deg, var(--electric), var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.not-found h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
.not-found p { color: var(--text-muted); margin: 0 0 28px; }

/* ============ ARCHIVE ============ */
.archive-header { text-align: center; padding: 60px 0 40px; }
.archive-eyebrow {
  display: inline-block; padding: 4px 12px; margin-bottom: 16px;
  font-size: 11px; font-weight: 600; color: var(--electric);
  background: rgba(0, 212, 255, 0.08); border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.08em;
}
.archive-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.archive-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ============ COMMENTS ============ */
.comments { max-width: 720px; margin: 60px auto; padding: 32px; border: 1px solid var(--border); background: var(--bg-card); border-radius: var(--radius-lg); }
.comments h3 { font-size: 18px; font-weight: 700; margin: 0 0 20px; letter-spacing: -0.02em; }
.comments .comment { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.comments .comment:last-child { border-bottom: none; }
.comments .comment-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.comments .comment-body { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 12px 14px; font-family: inherit;
  font-size: 14px; color: var(--text);
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--border-hover); }
.comment-form .submit, .comment-form input[type="submit"] {
  padding: 10px 22px; font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none; border-radius: 999px; cursor: pointer;
}

/* ============ UTILS ============ */
.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-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* WP admin bar */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
