/*
 * Independent Theme - CSS extra
 * Mantido propositalmente leve.
 * A maior parte do estilo está em style.css.
 *
 * NOTA: O skip-link é definido apenas em style.css.
 * Este arquivo NÃO redefine .skip-link para evitar conflitos.
 */

/* Garante boa área de toque em todos os controles interativos (WCAG 2.5.5) */
button,
input[type="submit"],
input[type="button"],
.search-submit {
  min-height: 44px;
  min-width: 44px;
}

/* Campo de busca: área de toque adequada */
input[type="search"],
input[type="text"],
input[type="email"] {
  min-height: 44px;
}

/* Evita que widgets de terceiros "quebrem" o layout */
.widget,
.wp-block {
  overflow-wrap: anywhere;
}

/* Melhora legibilidade do conteúdo principal */
.post-content,
.page-content {
  line-height: 1.80;
  font-size: 1.05rem;
  max-width: var(--prose-max);
}

.post-content h2,
.post-content h3,
.post-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-color);
}

/* Estilo da seção de meta do post */
.post-meta {
  margin-top: var(--space-md);
  padding: 1rem 1.25rem;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent-color);
  font-size: 0.93rem;
  color: var(--muted-text);
  line-height: 1.6;
}

.post-meta p {
  margin: 0.3rem 0;
}

.post-meta strong {
  color: var(--text-color);
}

/* Imagem de destaque */
.post-thumbnail img,
.wp-post-image {
  border-radius: 8px;
  margin-bottom: 1.5rem;
  width: 100%;
  height: auto;
}

/* Página 404 */
.error-404 .page-content {
  text-align: center;
  padding: 2rem 0;
}

.error-404 .search-form {
  max-width: 500px;
  margin: 1.5rem auto 0;
}

/* Formulário de busca em páginas sem resultado */
.no-results .search-form,
.no-posts-search .search-form {
  max-width: 560px;
  margin-top: 1rem;
}

/* Sidebar: títulos de widget */
.sidebar .widget h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-text);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-color);
}

/* Footer: widgets lado a lado em tela grande */
@media (min-width: 768px) {
  .footer-widgets {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 2rem 1rem 1.5rem;
    width: 100%;
  }

  .footer-widgets .footer-widget {
    flex: 1 1 220px;
    margin-bottom: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

/* Rodapé: copyright */
.site-info {
  width: 100%;
  text-align: center;
  padding: 1rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--header-muted);
  border-top: 1px solid var(--header-border);
  margin-top: 1rem;
}

/* Impressão: oculta elementos desnecessários */
@media print {
  .site-header,
  .primary-nav,
  aside,
  .social-icons,
  .back-link,
  .pagination,
  .related-posts {
    display: none !important;
  }

  main {
    padding: 0 !important;
    box-shadow: none !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}
