/*
Theme Name: InfoConcursos
Theme URI: https://infoconcursos.com.br
Author: InfoConcursos
Author URI: https://infoconcursos.com.br
Description: Tema minimalista para portal de concursos públicos
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: infoconcursos
*/

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

:root {
  --blue: #0a99e0;
  --blue-dark: #0880bf;
  --blue-light: #e8f5fd;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --max-width: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
}

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

ul, ol {
  padding-left: 1.5rem;
}

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

.site-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0;
}

.site-inner.no-sidebar {
  grid-template-columns: 1fr;
}

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

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

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

.site-logo a {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-logo a span {
  color: var(--blue);
}

/* ================================
   NAVIGATION
================================ */
.main-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
  background: var(--blue-light);
  color: var(--blue);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search input[type="search"] {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font);
  width: 200px;
  outline: none;
  transition: border 0.15s;
}

.header-search input[type="search"]:focus {
  border-color: var(--blue);
}

.header-search button {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
}

.header-search button:hover {
  background: var(--blue-dark);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
  }

  .header-search {
    display: none;
  }
}

/* ================================
   BREAKING BAR
================================ */
.breaking-bar {
  background: var(--blue);
  color: #fff;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
}

.breaking-bar .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.breaking-label {
  background: rgba(0,0,0,.2);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.7rem;
}

/* ================================
   FEATURED / HERO (homepage)
================================ */
.featured-section {
  margin-bottom: 2.5rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.featured-main .post-card {
  height: 100%;
}

.featured-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ================================
   POST CARDS
================================ */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.09);
  transform: translateY(-2px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card-thumb.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--border);
}

.post-card-body {
  padding: 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: var(--blue);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 0.75rem;
}

.post-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Card grande (featured) */
.post-card.large .post-card-title {
  font-size: 1.4rem;
}

.post-card.large .post-card-excerpt {
  font-size: 0.95rem;
}

/* Card compacto (side) */
.post-card.compact {
  flex-direction: row;
  gap: 0;
}

.post-card.compact .post-card-thumb {
  width: 100px;
  min-width: 100px;
  aspect-ratio: auto;
  height: 100%;
}

.post-card.compact .post-card-body {
  padding: 0.75rem 1rem;
}

.post-card.compact .post-card-title {
  font-size: 0.875rem;
}

.post-card.compact .post-card-excerpt {
  display: none;
}

/* ================================
   POSTS GRID
================================ */
.posts-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.posts-section-title a {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--blue);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

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

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

/* ================================
   AD SPACES
================================ */
.ad-space {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
}

.ad-space-banner {
  height: 90px;
  margin: 1.5rem 0;
}

.ad-space-square {
  min-height: 250px;
  margin-bottom: 1.5rem;
}

.ad-space-responsive {
  min-height: 200px;
  width: 100%;
}

/* ================================
   SIDEBAR
================================ */
.site-sidebar {
  position: relative;
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 1rem;
  color: var(--text);
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--text);
}

.widget ul li a:hover {
  color: var(--blue);
}

/* ================================
   SINGLE POST
================================ */
.post-header {
  margin-bottom: 2rem;
}

.post-categories {
  margin-bottom: 0.75rem;
}

.post-categories a {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  background: var(--blue);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.4rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.post-featured-image {
  margin-bottom: 2rem;
  border-radius: 10px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
}

.post-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.post-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--blue);
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
}

.post-content li {
  margin-bottom: 0.35rem;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.post-content table th {
  background: var(--blue);
  color: #fff;
  padding: 0.6rem 0.85rem;
  text-align: left;
  font-weight: 600;
}

.post-content table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.post-content table tr:hover td {
  background: var(--bg-alt);
}

.post-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 0.75rem 1.25rem;
  background: var(--blue-light);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.post-content a {
  color: var(--blue);
  text-decoration: underline;
}

/* Info box */
.info-box {
  background: var(--blue-light);
  border: 1px solid #b3ddf2;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.info-box strong {
  color: var(--blue-dark);
  display: block;
  margin-bottom: 0.35rem;
}

/* Post tags */
.post-tags {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.post-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.post-tags a {
  display: inline-block;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  color: var(--text-muted);
  margin: 0.2rem;
}

.post-tags a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

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

.related-posts .posts-grid {
  grid-template-columns: repeat(3, 1fr);
}

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

/* ================================
   ARCHIVE / CATEGORY
================================ */
.archive-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px solid var(--blue);
}

.archive-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--blue);
  letter-spacing: 0.8px;
  margin-bottom: 0.35rem;
}

.archive-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.archive-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ================================
   PAGINATION
================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.15s;
}

.pagination a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.pagination .current {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ================================
   SEARCH RESULTS
================================ */
.search-header {
  margin-bottom: 2rem;
}

.search-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.search-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.no-results h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ================================
   FOOTER
================================ */
.site-footer {
  background: #111;
  color: #ccc;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

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

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

.footer-brand .logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand .logo span {
  color: var(--blue);
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

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

.footer-col ul li a {
  font-size: 0.85rem;
  color: #aaa;
  transition: color 0.15s;
}

.footer-col ul li a:hover {
  color: var(--blue);
}

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom a {
  color: #aaa;
}

.footer-bottom a:hover {
  color: var(--blue);
}

/* ================================
   UTILITIES
================================ */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
  color: #fff;
}

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

.btn-outline:hover {
  background: var(--blue);
  color: #fff;
}

/* Load more */
.load-more-wrap {
  text-align: center;
  margin: 1.5rem 0 2rem;
}
