/* ==========================================================================
   BLOG DE TRÁFEGO PAGO & MONETIZAÇÃO ADSENSE - DESIGN SYSTEM (IRMÃOS DO PIXEL)
   ========================================================================== */

:root {
  /* Base Palette */
  --color-navy-900: #111827;
  --color-blue-600: #2563EB;
  --color-blue-700: #1D4ED8;
  --color-orange-500: #F97316;
  --color-orange-600: #EA580C;
  --color-offwhite: #F8F7F4;
  --color-white: #FFFFFF;
  --color-slate-700: #374151;
  --color-slate-200: #E5E7EB;
  --color-slate-400: #9CA3AF;
  --color-black: #0B0F17;

  /* Semantic Variables */
  --bg-page: var(--color-offwhite);
  --bg-page-dark: var(--color-navy-900);
  --bg-surface: var(--color-white);
  --bg-surface-muted: var(--color-slate-200);
  --bg-inverse: var(--color-navy-900);

  --text-primary: var(--color-navy-900);
  --text-secondary: var(--color-slate-700);
  --text-muted: var(--color-slate-400);
  --text-on-dark: var(--color-white);
  --text-on-dark-muted: #B9C0CC;
  --text-link: var(--color-blue-600);

  --brand-primary: var(--color-navy-900);
  --brand-secondary: var(--color-blue-600);
  --brand-accent: var(--color-orange-500);

  --border-default: var(--color-slate-200);
  --border-strong: var(--color-slate-700);
  --border-focus: var(--color-blue-600);

  --action-primary-bg: var(--color-orange-500);
  --action-primary-bg-hover: var(--color-orange-600);
  --action-primary-text: var(--color-white);

  /* Typography */
  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

  --ls-tight: -0.02em;
  --ls-normal: 0em;
  --ls-wide: 0.04em;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.12);

  --container-max: 1200px;
  --content-max: 820px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-blue-700);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-default);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}

.logo-pixels {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
  flex-shrink: 0;
}

.pixel-sq {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.pixel-blue { background: var(--color-blue-600); }
.pixel-orange { background: var(--color-orange-500); }
.pixel-navy { background: var(--color-navy-900); }
.pixel-muted { background: var(--color-slate-400); opacity: 0.4; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.header-cta-wrap {
  display: flex;
  align-items: center;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--action-primary-bg);
  color: var(--action-primary-text);
}

.btn-primary:hover {
  background-color: var(--action-primary-bg-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(17, 24, 39, 0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.badge-brand {
  background-color: rgba(37, 99, 235, 0.08);
  color: var(--color-blue-600);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-accent {
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--color-orange-500);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-neutral {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

/* AdSense Slot Containers (Anti-CLS) */
.ad-slot-wrapper {
  margin: 2rem auto;
  text-align: center;
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ad-slot-header {
  max-width: 728px;
  min-height: 90px;
}

.ad-slot-in-article {
  max-width: 728px;
  min-height: 280px;
}

.ad-slot-sidebar {
  max-width: 300px;
  min-height: 250px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-page);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  min-height: 90px;
  font-weight: 500;
}

/* Main Layout */
.main-wrapper {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
  align-items: start;
}

/* Hero Section / Homepage */
.hero-home {
  padding: 3.5rem 0 3rem;
}

.hero-tag-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  max-width: 820px;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 2rem;
}

.hero-trust-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Section Title */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-default);
}

/* Post Cards */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.post-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-blue-600);
  box-shadow: var(--shadow-md);
}

.post-card-category {
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  letter-spacing: var(--ls-tight);
}

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

.post-card-title a:hover {
  color: var(--color-blue-600);
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-default);
  padding-top: 1rem;
}

/* Featured Article Card */
.featured-card {
  grid-column: 1 / -1;
  background-color: var(--bg-surface);
  border: 1px solid rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-secondary);
}

/* Single Article View */
.article-content {
  max-width: var(--content-max);
}

.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 1.75rem;
}

.article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-breadcrumbs a {
  color: var(--text-secondary);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Article Typography (Luana França Guidelines) */
.article-body {
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
  border-left: 4px solid var(--color-blue-600);
  padding-left: 1rem;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}

.article-body p {
  margin-bottom: 1.15rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body strong {
  color: var(--text-primary);
}

.article-body blockquote {
  border-left: 4px solid var(--color-blue-600);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left-width: 4px;
  border-left-color: var(--color-blue-600);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.75rem 0;
  color: var(--text-primary);
}

/* Figures & Captions */
figure.article-figure {
  margin: 2rem 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1rem;
  overflow: hidden;
}

figure.article-figure img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

figcaption strong {
  color: var(--text-secondary);
}

/* Highlight Box: Leia Também */
.read-also-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--color-blue-600);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.read-also-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--color-blue-600);
  color: #ffffff;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.read-also-box a {
  font-weight: 600;
  color: var(--text-primary);
}

.read-also-box a:hover {
  color: var(--color-blue-600);
}

/* Checklist Box */
.checklist-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.checklist-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy-900);
  margin-bottom: 1rem;
}

.checklist-box ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.checklist-box li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.checklist-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-blue-600);
  font-weight: 800;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-default);
}

th, td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-default);
}

th {
  background-color: var(--bg-page);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: var(--ls-wide);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(37, 99, 235, 0.02);
}

/* Code Blocks */
pre {
  background-color: var(--color-navy-900);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #93c5fd;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: rgba(37, 99, 235, 0.08);
  color: var(--color-blue-600);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Author Box */
.author-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 3.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #ffffff;
  flex-shrink: 0;
}

.author-info h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-blue-600);
  margin-bottom: 0.5rem;
  display: block;
}

.author-info p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

/* Sidebar */
.sidebar-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 0.75rem;
  letter-spacing: var(--ls-tight);
}

.cluster-list {
  list-style: none;
}

.cluster-list li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-default);
}

.cluster-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cluster-list a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
  display: block;
}

.cluster-list a:hover {
  color: var(--color-blue-600);
}

/* Forms */
.contact-form {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background-color: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Cookie Consent Banner */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 580px;
  background-color: var(--color-navy-900);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  flex-direction: column;
  gap: 1rem;
  color: #ffffff;
}

.cookie-text {
  font-size: 0.88rem;
  color: var(--text-on-dark-muted);
  line-height: 1.5;
}

.cookie-text a {
  color: #93c5fd;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Footer */
.site-footer {
  background-color: var(--bg-page);
  border-top: 1px solid var(--border-default);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.65rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

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

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

.footer-bottom-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 992px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .header-cta-wrap {
    display: none;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
