/* ============================================
   HubCRM - Central de Ajuda
   GitHub Pages — Pure CSS
   ============================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c7e;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --card-shadow-hover: 0 10px 25px rgba(79,70,229,.12), 0 4px 6px rgba(0,0,0,.05);
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ============ TYPOGRAPHY ============ */
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.75; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ LAYOUT ============ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.wide      { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ============ HEADER ============ */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}

.logo svg { flex-shrink: 0; }

.logo-badge {
  background: var(--primary);
  color: white;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 100px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.header-nav { display: flex; align-items: center; gap: .5rem; }

/* ============ WHATSAPP BUTTON — DESTAQUE ============ */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--whatsapp);
  color: white !important;
  font-weight: 700;
  font-size: .875rem;
  padding: .55rem 1.15rem;
  border-radius: 100px;
  text-decoration: none !important;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(37,211,102,.4);
  white-space: nowrap;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,211,102,.5);
  text-decoration: none !important;
}

.btn-whatsapp svg { flex-shrink: 0; }

/* Versão grande para blocos de suporte */
.btn-whatsapp-lg {
  font-size: 1rem;
  padding: .85rem 1.8rem;
  gap: .7rem;
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  padding: 4rem 0 3.5rem;
  text-align: center;
}

.hero h1 { color: white; margin-bottom: .75rem; }
.hero p   { color: rgba(255,255,255,.8); font-size: 1.15rem; max-width: 600px; margin: 0 auto 2rem; }

/* ============ SEARCH ============ */
.search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  border: none;
  border-radius: 100px;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============ SUPPORT BANNER ============ */
.support-banner {
  background: #ecfdf5;
  border: 1.5px solid #86efac;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
}

.support-banner-text h3 { color: #15803d; margin-bottom: .25rem; }
.support-banner-text p  { color: #166534; font-size: .9rem; }
.support-banner-text p strong { color: #15803d; }

/* ============ SECTION ============ */
.section { padding: 3rem 0; }
.section-title { margin-bottom: .5rem; }
.section-subtitle { color: var(--text-muted); margin-bottom: 2rem; }

/* ============ CARDS GRID ============ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* ============ TOPIC CARD ============ */
.topic-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none !important;
  display: block;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}

.topic-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary-light);
  text-decoration: none !important;
}

.topic-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.topic-card h3 { color: var(--text); margin-bottom: .35rem; }
.topic-card p  { font-size: .9rem; color: var(--text-muted); }

.topic-card .card-links {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.topic-card .card-link-tag {
  font-size: .78rem;
  color: var(--primary);
  background: #ede9fe;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-weight: 500;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { opacity: .4; }

/* ============ PAGE LAYOUT ============ */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0;
}

@media (max-width: 860px) {
  .page-layout { grid-template-columns: 1fr; }
  .page-sidebar { display: none; }
}

/* ============ SIDEBAR TOC ============ */
.page-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-nav {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.sidebar-nav h4 {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}

.sidebar-nav ul { list-style: none; }

.sidebar-nav ul li a {
  display: block;
  font-size: .875rem;
  color: var(--text-muted);
  padding: .4rem .6rem;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
  background: #ede9fe;
  color: var(--primary);
  text-decoration: none;
}

.sidebar-whatsapp {
  margin-top: 1rem;
}

/* ============ ARTICLE CONTENT ============ */
.article-content h2 {
  color: var(--text);
  margin: 2rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.article-content h3 {
  color: var(--text);
  margin: 1.5rem 0 .5rem;
}

.article-content p { margin-bottom: 1rem; }

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.article-content li { margin-bottom: .35rem; line-height: 1.7; }
.article-content li strong { color: var(--text); }

/* ============ STEP CARDS ============ */
.steps {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1rem 0 1.5rem;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.step-num {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 { font-size: .95rem; margin-bottom: .2rem; }
.step-content p  { font-size: .875rem; margin: 0; }

/* ============ CALLOUT / ALERT ============ */
.callout {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  gap: .75rem;
  margin: 1.25rem 0;
  font-size: .9rem;
}

.callout-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.callout-body { color: inherit; }
.callout-body strong { display: block; margin-bottom: .2rem; }

.callout-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.callout-tip     { background: #f0fdf4; border: 1px solid #86efac; color: #15803d; }
.callout-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

th {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--border);
}

td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

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

/* ============ BADGE ============ */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-free       { background: #f1f5f9; color: #475569; }
.badge-pro        { background: #ede9fe; color: var(--primary); }
.badge-enterprise { background: #fef3c7; color: #92400e; }
.badge-green      { background: #dcfce7; color: #16a34a; }
.badge-blue       { background: #dbeafe; color: #1d4ed8; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  font-size: .875rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-brand .logo { color: white; margin-bottom: .5rem; }
.footer-brand p { color: rgba(255,255,255,.5); max-width: 340px; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  text-align: right;
}

@media (max-width: 600px) {
  .footer-links { text-align: left; }
}

.footer-links a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer-links a:hover { color: white; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,.4);
  font-size: .8rem;
}

/* ============ WHATSAPP FLOAT ============ */
.wpp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  animation: wppPulse 2.5s infinite;
}

.wpp-float a {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--whatsapp);
  color: white !important;
  font-weight: 700;
  font-size: .875rem;
  padding: .85rem 1.4rem;
  border-radius: 100px;
  text-decoration: none !important;
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  transition: background .2s, transform .15s;
}

.wpp-float a:hover {
  background: var(--whatsapp-dark);
  transform: scale(1.04);
  text-decoration: none !important;
}

@keyframes wppPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70%  { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Tooltip do float */
.wpp-float a::before {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + .75rem);
  background: rgba(0,0,0,.75);
  color: white;
  padding: .35rem .75rem;
  border-radius: 6px;
  font-size: .78rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.wpp-float a:hover::before { opacity: 1; }

/* ============ FAQ ACCORDION ============ */
.faq-list { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background .15s;
}

.faq-question:hover { background: #f8fafc; }

.faq-arrow {
  transition: transform .25s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.faq-item.open .faq-answer { max-height: 600px; }

.faq-answer-inner {
  padding: 0 1.25rem 1rem;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-answer-inner p { margin-bottom: .5rem; }
.faq-answer-inner ul { padding-left: 1.25rem; }
.faq-answer-inner li { margin-bottom: .25rem; }

/* ============ SEARCH RESULTS ============ */
#search-results {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
  overflow: hidden;
  display: none;
}

.search-result-item {
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); text-decoration: none; }
.search-result-item h4 { color: var(--text); font-size: .95rem; margin-bottom: .2rem; }
.search-result-item p  { font-size: .82rem; color: var(--text-muted); margin: 0; }
.search-result-item em { font-style: normal; background: #fef3c7; border-radius: 3px; padding: 1px 3px; }

/* ============ ICON COLORS ============ */
.ic-purple  { background: #ede9fe; }
.ic-blue    { background: #dbeafe; }
.ic-green   { background: #dcfce7; }
.ic-orange  { background: #ffedd5; }
.ic-rose    { background: #ffe4e6; }
.ic-cyan    { background: #cffafe; }
.ic-amber   { background: #fef3c7; }
.ic-indigo  { background: #e0e7ff; }

/* ============ HERO HOME CARDS ============ */
.quick-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.75rem;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  color: white !important;
  padding: .5rem 1.1rem;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.25);
  cursor: pointer;
  text-decoration: none !important;
  transition: background .2s;
}

.quick-action-btn:hover {
  background: rgba(255,255,255,.25);
  text-decoration: none !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .hero { padding: 2.5rem 0 2rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .support-banner { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { text-align: left; }
  .wpp-float a span { display: none; }
  .wpp-float a { padding: .9rem; border-radius: 50%; }
}

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.gap-sm { gap: .5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
