/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #333;
  background-color: #ffffff !important; /* Fundo branco forçado */
  overflow-x: hidden;
  min-height: 100vh; /* Garante fundo em toda a página */
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  border-bottom: 3px solid #3498db;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #34495e;
}

h4 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2c3e50;
}

p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.lead {
  font-size: 1.2rem;
  font-weight: 400;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Links */
a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Header */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav {
  display: flex;
  align-items: center;
}

/* Buttons */
.cta-button {
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,107,0.4);
  text-decoration: none;
  color: white;
}

.cta-button.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 30px;
}

.read-more {
  color: #3498db;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.read-more::after {
  content: " →";
  margin-left: 0.5rem;
}

.read-more:hover {
  color: #2980b9;
}

/* Main Content */
.main {
  margin: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin-bottom: 3rem;
  border-radius: 20px;
}

.hero h1 {
  font-size: 3rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog Section */
.blog-section {
  margin: 4rem 0;
}

.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-header h1 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.blog-header p {
  font-size: 1.2rem;
  color: #7f8c8d;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.article-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.article-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.article-card h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.article-card h3 a:hover {
  color: #3498db;
}

.article-card p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Article Content */
.article {
  max-width: 900px;
  margin: 0 auto;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.article-header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-meta {
  color: #7f8c8d;
  font-size: 0.95rem;
  margin-top: 1rem;
}

.article-content {
  line-height: 1.8;
}

/* Special Content Boxes */
.quick-answer,
.mobile-first-solution,
.quick-solution {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  margin: 2rem 0;
}

.quick-answer h2,
.mobile-first-solution h2,
.quick-solution h2 {
  color: white;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  margin-top: 0;
}

.quick-answer a,
.mobile-first-solution a,
.quick-solution a {
  color: #ffeaa7;
  font-weight: bold;
}

.definition-box {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  padding: 2rem;
  border-radius: 15px;
  margin: 2rem 0;
  border-left: 5px solid #3498db;
}

.definition-box h2 {
  color: #2c3e50;
  margin-top: 0;
}

/* Table of Contents */
.table-of-contents {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
  margin: 2rem 0;
  border-left: 5px solid #3498db;
}

.table-of-contents h2 {
  margin-top: 0;
  color: #2c3e50;
  font-size: 1.3rem;
  border-bottom: none;
}

.table-of-contents ul {
  margin: 0;
  list-style: none;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
}

.table-of-contents a {
  color: #3498db;
  text-decoration: none;
  padding: 0.25rem 0;
  display: block;
  transition: color 0.3s ease;
}

.table-of-contents a:hover {
  color: #2980b9;
  padding-left: 10px;
}

/* Code Sections */
.code-section {
  margin: 1.5rem 0;
}

.code-section pre {
  background: #2d3748;
  color: #f7fafc;
  padding: 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.code-section code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Grids and Layouts */
.advantages-grid,
.features-grid,
.benefits-grid,
.practices-grid,
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.advantage-item,
.feature,
.benefit-item,
.practice-item,
.category-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #3498db;
}

.advantage-item h4,
.feature h4,
.benefit-item h4,
.practice-item h4,
.category-card h3 {
  color: #2c3e50;
  margin-bottom: 0.75rem;
}

/* Comparison Tables */
.comparison-table,
.detailed-comparison-table {
  overflow-x: auto;
  margin: 2rem 0;
}

.comparison-table table,
.detailed-comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td,
.detailed-comparison-table th,
.detailed-comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.comparison-table th,
.detailed-comparison-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

.highlight-row,
.winner-row {
  background: #e8f5e8;
}

/* Warning and Info Boxes */
.warning-box {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-left: 5px solid #f39c12;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 2rem 0;
}

.warning-box h3 {
  color: #d68910;
  margin-top: 0;
}

.cta-box {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  margin: 2rem 0;
}

.cta-box p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.tools-section {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin: 4rem 0;
  border-radius: 20px;
}

.tools-cta h2 {
  color: white;
  margin-bottom: 1rem;
  border-bottom: none;
}

.tools-cta p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* View All Section */
.view-all {
  text-align: center;
  margin: 3rem 0;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

.footer a {
  color: #3498db;
}

.footer a:hover {
  color: #5dade2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    padding: 0 10px; /* Adicionado para evitar texto ultrapassando */
  }

  .article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-card {
    padding: 1.5rem;
  }

  .advantages-grid,
  .features-grid,
  .benefits-grid,
  .practices-grid,
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .code-section pre {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .comparison-table,
  .detailed-comparison-table {
    font-size: 0.85rem;
  }

  .cta-button {
    padding: 0.75rem 1.5rem; /* Ajustado para evitar overflow */
    display: block;
    margin: 1rem auto;
    width: fit-content;
  }

  /* Ajustes para evitar texto ultrapassando */
  p, .lead, .article-content {
    padding: 0 10px;
    box-sizing: border-box;
    word-wrap: break-word; /* Garante quebra de texto */
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .hero {
    padding: 2rem 0;
    margin: 1rem 0; /* Removido margens negativas para evitar overflow */
    border-radius: 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-card,
  .cta-box,
  .warning-box,
  .definition-box {
    margin: 1rem 0; /* Removido margens negativas */
    padding: 1.5rem;
    border-radius: 0;
  }

  .tools-section {
    margin: 2rem 0; /* Removido margens negativas */
    border-radius: 0;
    padding: 2rem 1rem;
  }

  /* Ajustes para evitar texto ultrapassando */
  p, .lead, .article-content {
    padding: 0 5px;
    box-sizing: border-box;
    word-wrap: break-word;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card {
  animation: fadeInUp 0.6s ease-out;
}

.article-card:nth-child(2) {
  animation-delay: 0.1s;
}

.article-card:nth-child(3) {
  animation-delay: 0.2s;
}

.article-card:nth-child(4) {
  animation-delay: 0.3s;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cta-button,
  .cta-box {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background-color: #ffffff !important; /* Fundo branco para impressão */
  }

  .article {
    max-width: none;
  }

  .code-section pre {
    background: #f5f5f5;
    color: #000;
    border: 1px solid #ddd;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .cta-button {
    border: 2px solid white;
  }

  .article-card {
    border: 2px solid #333;
  }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
.cta-button:focus {
  outline: 3px solid #3498db;
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 6px;
}