/*
Theme Name: Atendo - Central de Ajuda
Theme URI: https://atendo.log.br
Author: Atendo
Author URI: https://atendo.log.br
Description: Tema WordPress para Central de Ajuda do Atendo - Sistema de Atendimento
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: atendo-ajuda
Tags: help-center, knowledge-base, support, faq
*/

/* ========================================
   RESET & BASE
======================================== */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;
  --secondary: #f8fafc;
  --accent: #06b6d4;
  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --radius: 0.75rem;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.site-logo-text span {
  color: var(--muted-foreground);
  font-weight: 400;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

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

.header-nav a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.header-btn {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s;
}

.header-btn:hover {
  background: var(--primary-dark);
  color: white;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--foreground);
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
}

/* ========================================
   HERO SECTION
======================================== */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Search Form */
.search-form {
  position: relative;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.search-form input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  outline: none;
}

.search-form input:focus {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.search-form svg {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted-foreground);
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.popular-searches span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.popular-searches a {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  transition: background 0.2s;
}

.popular-searches a:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-section {
    padding: 3rem 1rem;
  }
}

/* ========================================
   CATEGORIES SECTION
======================================== */
.categories-section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.section-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
  display: block;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

.category-icon {
  width: 48px;
  height: 48px;
  background: var(--muted);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary);
}

.category-icon svg {
  width: 24px;
  height: 24px;
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.category-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.category-count {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

/* ========================================
   POPULAR ARTICLES
======================================== */
.articles-section {
  background: var(--muted);
  padding: 4rem 1.5rem;
}

.articles-container {
  max-width: 1200px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.article-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.article-item:hover {
  border-color: var(--primary);
  background: white;
}

.article-item svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.article-item span {
  font-size: 0.9375rem;
  color: var(--foreground);
}

.article-item .arrow {
  margin-left: auto;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.article-item:hover .arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact-section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s;
}

.contact-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.contact-icon {
  width: 56px;
  height: 56px;
  background: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.contact-link {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.contact-link:hover {
  text-decoration: underline;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  background: var(--foreground);
  color: white;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

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

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: white;
}

/* ========================================
   SINGLE ARTICLE
======================================== */
.article-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  color: var(--muted-foreground);
}

.breadcrumb .current {
  color: var(--foreground);
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.article-content {
  font-size: 1rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--foreground);
}

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

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

.article-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.article-content code {
  background: var(--muted);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.article-content pre {
  background: var(--foreground);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Article Feedback */
.article-feedback {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--muted);
  border-radius: var(--radius);
  text-align: center;
}

.article-feedback p {
  margin-bottom: 1rem;
  font-weight: 500;
}

.feedback-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.feedback-btn {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.feedback-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  font-size: 0.9375rem;
  transition: opacity 0.2s;
}

.related-list a:hover {
  opacity: 0.8;
}

/* ========================================
   CATEGORY PAGE
======================================== */
.category-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.category-header {
  margin-bottom: 2rem;
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.category-header p {
  color: var(--muted-foreground);
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.articles-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.articles-list a:hover {
  border-color: var(--primary);
  background: white;
}

.articles-list svg {
  color: var(--primary);
  flex-shrink: 0;
}

.articles-list span {
  flex: 1;
}

.articles-list .arrow {
  color: var(--muted-foreground);
  transition: transform 0.2s;
}

.articles-list a:hover .arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ========================================
   UTILITIES
======================================== */
.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;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
