/* Variáveis de cor e design */
:root {
  --primary-color: #1e3a8a;
  --secondary-color: #ff9800;
  --text-color: #1a1a1a;
  --light-gray: #f5f5f5;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.6;
}

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: var(--line-height);
  background-color: #ffffff;
}

/* Header */
header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

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

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: #163068;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #e68900;
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

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

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

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Main content */
main {
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero p {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid de artigos */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.article-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

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

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

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.article-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1rem;
}

.article-excerpt {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.read-more {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: #e68900;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.sidebar-widget input,
.sidebar-widget select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

.sidebar-widget input:focus,
.sidebar-widget select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Lista de categorias */
.categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-item {
  padding: 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-item:hover {
  background-color: var(--light-gray);
  color: var(--primary-color);
}

.category-count {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Ultimos artigos */
.latest-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.latest-item {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.latest-item:hover {
  background-color: var(--light-gray);
}

.latest-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.latest-item .meta {
  font-size: 0.8rem;
  color: #999;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--light-gray);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.tag.size-1 { font-size: 0.8rem; }
.tag.size-2 { font-size: 0.9rem; }
.tag.size-3 { font-size: 1rem; font-weight: 600; }
.tag.size-4 { font-size: 1.1rem; font-weight: 600; }
.tag.size-5 { font-size: 1.25rem; font-weight: 700; }

/* Página de artigo */
.article-header {
  background: var(--light-gray);
  padding: 3rem 2rem;
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.article-info {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: #666;
  flex-wrap: wrap;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.article-body h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.article-body h3 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}

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

.article-body ul,
.article-body ol {
  margin: 1rem 0;
  margin-left: 2rem;
}

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

.article-body img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
}

.article-body blockquote {
  border-left: 4px solid var(--secondary-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #666;
  font-style: italic;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

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

.pagination .active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background-color: #1a1a1a;
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
}

.footer-section a {
  display: block;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #999;
}

/* Responsividade */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

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

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

  .hero p {
    font-size: 1rem;
  }

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

  .article-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tags-cloud {
    justify-content: flex-start;
  }
}

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

  .hero {
    padding: 2rem 1rem;
  }

  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.85rem;
  }

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

  .article-card-content {
    padding: 1rem;
  }

  .sidebar-widget {
    padding: 1rem;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}
