/*
Theme Name: PIX Fácil
Theme URI: https://pixfacil.co
Author: Pyr Marcondes / MACUCO Media
Author URI: https://macuco.digital
Description: Tema editorial "Mão Amiga" do PIX Fácil — guias práticos sobre PIX, segurança digital e organização financeira. Design warm editorial com paleta terracota + navy + creme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pixfacil
Tags: blog, education, one-column, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-terracota: #C4533A;
  --color-terracota-dark: #A3412B;
  --color-terracota-light: #E8715A;
  --color-navy: #1B2A4A;
  --color-navy-light: #2D4066;
  --color-creme: #FAF6F1;
  --color-creme-dark: #F0EAE2;
  --color-white: #FFFFFF;
  --color-gray-100: #F7F7F7;
  --color-gray-200: #E5E5E5;
  --color-gray-300: #D4D4D4;
  --color-gray-500: #737373;
  --color-gray-700: #404040;
  --color-gray-900: #171717;
  --color-green: #16A34A;
  --color-green-light: #DCFCE7;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --max-width: 1200px;
  --content-width: 800px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-creme);
  color: var(--color-gray-900);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-terracota); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-terracota-dark); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: 1.25rem; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-terracota);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.site-logo span.highlight { color: var(--color-terracota); }

.main-nav { display: flex; gap: 2rem; align-items: center; }
.main-nav a {
  color: var(--color-gray-700);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--color-terracota); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
  padding: 5rem 0;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content { flex: 1; }
.hero-image { flex: 1; position: relative; }
.hero-image img { border-radius: var(--radius-xl); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-green-light);
  color: var(--color-green);
  padding: 0.375rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-green);
  border-radius: 50%;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero h1 .accent-red { color: var(--color-terracota); }
.hero h1 .accent-navy { color: var(--color-navy); }

.hero-desc {
  font-size: 1.125rem;
  color: var(--color-gray-500);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

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

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-gray-300);
}
.btn-outline:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

/* ===== ARTICLE CARDS ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.article-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
  border: 1px solid var(--color-gray-200);
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-body { padding: 1.5rem; }

.article-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-terracota);
  margin-bottom: 0.75rem;
}

.article-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-card-excerpt {
  font-size: 0.9375rem;
  color: var(--color-gray-500);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

/* ===== SINGLE ARTICLE ===== */
.article-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.article-header .category-badge {
  display: inline-block;
  background: var(--color-terracota);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 2.5rem;
  max-width: 800px;
  margin: 0 auto 1rem;
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: var(--color-gray-500);
  font-size: 0.875rem;
}

.article-featured-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-creme-dark);
}

.article-content h3 { margin-top: 2rem; }

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

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 4px solid var(--color-terracota);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-creme-dark);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-gray-700);
}

/* ===== FAQ ACCORDION ===== */
.faq-section {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--color-gray-200);
}

.faq-section h2 { margin-bottom: 1.5rem; }

.faq-item {
  border-bottom: 1px solid var(--color-gray-200);
  padding: 1rem 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 1rem;
  padding: 0.5rem 0;
}
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-terracota);
  transition: transform 0.3s;
}
.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0.75rem 0;
  color: var(--color-gray-700);
  line-height: 1.7;
}
.faq-item.active .faq-answer { display: block; }

/* ===== ARCHIVE / CATEGORY ===== */
.archive-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-gray-200);
  margin-bottom: 2rem;
}

.archive-header h1 { font-size: 2rem; }
.archive-header p { color: var(--color-gray-500); margin-top: 0.5rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-navy);
  color: var(--color-gray-300);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

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

.footer-brand .site-logo { color: white; margin-bottom: 1rem; }
.footer-brand p { color: var(--color-gray-300); font-size: 0.9375rem; line-height: 1.6; }

.footer-col h4 {
  color: white;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--color-gray-300); font-size: 0.9375rem; }
.footer-col a:hover { color: white; }

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

.footer-bottom a { color: var(--color-gray-300); }
.footer-bottom a:hover { color: white; }

/* ===== EDITOR BYLINE ===== */
.editor-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--color-creme-dark);
  border-radius: var(--radius-lg);
  margin-top: 3rem;
}

.editor-byline img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.editor-byline .editor-info { font-size: 0.875rem; }
.editor-byline .editor-name { font-weight: 600; color: var(--color-navy); }
.editor-byline .editor-role { color: var(--color-gray-500); }

/* ===== SIDEBAR ===== */
.sidebar-widget {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-gray-200);
}

.sidebar-widget h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-creme-dark);
}

/* ===== 404 ===== */
.error-404 {
  text-align: center;
  padding: 6rem 0;
}
.error-404 h1 { font-size: 6rem; color: var(--color-terracota); }
.error-404 p { font-size: 1.25rem; color: var(--color-gray-500); margin: 1rem 0 2rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 3rem 0; gap: 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero-image { order: -1; }
  
  .articles-grid { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  
  .main-nav { display: none; }
  .main-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 1rem;
  }
  
  .menu-toggle { display: block; }
  
  .article-header h1 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-buttons { flex-direction: column; }
}
