/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://example.com/hello-elementor-child
 Description:  Child theme do Hello Elementor
 Author:       Mage Technologies
 Template:     hello-elementor
 Version:      1.0.1
 Text Domain:  hello-elementor-child
*/

/* Layout geral: conteúdo + sidebar */
.site-main.single-post {
  margin-bottom: 3rem !important;
}
.content-wrapper {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.main-content {
  flex: 1;
}

/* Sidebar sticky para desktop */
.sidebar {
  width: 300px;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

/* Responsivo: remove sidebar no mobile */
@media (max-width: 768px) {
  .content-wrapper {
    display: block;
    padding: 0 1rem;
  }
  .sidebar {
    display: none;
  }
}

/* ===================================== */
/* Estilos do Single Post                */
/* ===================================== */
.single-post {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Imagem destacada */
.single-post-thumb {
  text-align: center !important;
  max-width: 100% !important;
}
.single-post-thumb img {
  max-width: 800px;
  margin: 0 auto 2rem;
  height: auto;
}

/* Cabeçalho do post */
.single-post-header {
  padding: 0;
  margin-bottom: 2rem;
}
.single-post-title {
  margin-bottom: 0.5rem;
}
.single-post-excerpt {
  font-size: 1.125rem;
  color: #555;
  margin-bottom: 1rem;
}
.single-post-meta {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1.5rem;
}
.single-post-meta .meta-author {
  font-weight: 600;
  color: #222;
}

/* Conteúdo */
.single-post-content {
  line-height: 1.7;
  font-size: 1rem;
  color: #333;
  margin-bottom: 2rem;
}

/* Compartilhamento */
.single-post-share {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}
.single-post-share .share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1 1 120px;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.single-post-share .share-btn i {
  font-size: 1.2rem;
}
.bottom-share {
  margin-bottom: 2rem;
}
.share-btn.fb {
  background: #3b5998;
}
.share-btn.fb:hover {
  opacity: 0.9;
}
.share-btn.wa {
  background: #25d366;
}
.share-btn.wa:hover {
  opacity: 0.9;
}
.share-btn.x {
  background: #000;
}
.share-btn.x:hover {
  opacity: 0.8;
}

/* Comentários modernizados */
.single-post-comments.modern-comments {
  padding: 2rem 1rem;
  background: #fafafa;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 4rem;
}
.single-post-comments.modern-comments h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #222;
}

/* Campos de formulário de comentários */
.single-post-comments.modern-comments input[type="text"],
.single-post-comments.modern-comments input[type="email"],
.single-post-comments.modern-comments input[type="url"],
.single-post-comments.modern-comments textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 1rem;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.single-post-comments.modern-comments input[type="text"]:focus,
.single-post-comments.modern-comments input[type="email"]:focus,
.single-post-comments.modern-comments input[type="url"]:focus,
.single-post-comments.modern-comments textarea:focus {
  border-color: #888;
  outline: none;
}

/* ===================================== */
/* Posts Relacionados na Sidebar         */
/* ===================================== */
.related-posts-section {
  margin-top: 2rem;
}
.related-posts-title {
  text-align: left !important;
  color: #222 !important;
  margin-bottom: 0.5rem !important;
}
.related-posts-description {
  font-size: 0.9rem !important;
  color: #666 !important;
  margin: 0.5rem 0 !important;
  line-height: initial !important;
  margin-bottom: 1rem !important;
}
.related-posts-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.related-post-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s;
}
.related-post-card:hover {
  transform: translateY(-2px);
}
.related-post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.related-post-card-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.related-post-card-title {
  margin: 0.75rem 1rem 0;
}
.related-post-card-meta {
  font-size: 0.8rem;
  color: #888;
  margin: 0.25rem 1rem;
}
.related-post-card-meta .meta-author::after {
  content: " • ";
}
.related-post-card-excerpt {
  font-size: 0.85rem;
  color: #555;
  margin: 0.5rem 1rem 1rem;
  line-height: 1.4;
}

/* Mantém navbar e footer sem padding extra */
header.site-header,
footer.site-footer {
  padding: 0;
}

/* Títulos responsivos: escala fluida com limites */
.single-post-title {
  font-size: clamp(2rem, 5vw, 2.5rem) !important;
  line-height: 1.2 !important;
  margin-bottom: 0.5rem;
}

.related-posts-title {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem) !important;
  line-height: 1.1 !important;
  margin-bottom: 0.5rem !important;
}

.related-post-card-title {
  font-size: clamp(0.9rem, 2.5vw, 1rem) !important;
  line-height: 1.1 !important;
  margin: 0.75rem 1rem 0;
}

@media (max-width: 768px) {
  .single-post-title {
    font-size: 2rem !important; /* garantir legibilidade em telas muito pequenas */
  }
  .related-posts-title {
    font-size: 1.25rem !important;
  }
  .related-post-card-title {
    font-size: 0.9rem !important;
  }
}

/* Esconde a sidebar no mobile como fallback (já feito no JS também) */
@media (max-width: 768px) {
  .sidebar {
    display: none !important;
  }
}

/* Estilo da versão clonada dos relacionados no mobile */
.mobile-related {
  background: #fff !important;
  padding: 1rem 1rem 1.5rem !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  margin-top: 2rem !important;
}

/* Reaproveita títulos e descrições, mas garante espaçamento adequado */
.mobile-related .related-posts-title {
  margin-bottom: 0.5rem !important;
}

.mobile-related .related-posts-description {
  margin-bottom: 1rem !important;
}

/* Grid empilhado para mobile (se por ventura o original usava flex) */
.mobile-related .related-posts-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem !important;
}

/* Cartões dentro da versão mobile: garantir consistência */
.mobile-related .related-post-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Thumb ajustada para mobile */
.mobile-related .related-post-card-thumb img {
  width: 100% !important;
  height: 120px !important;
  object-fit: cover !important;
}

/* Título e meta com espaçamento interno */
.mobile-related .related-post-card-title {
  margin: 0.5rem 1rem 0 !important;
  font-size: clamp(0.95rem, 2.5vw, 1rem) !important;
  line-height: 1.1 !important;
}

.mobile-related .related-post-card-meta {
  margin: 0.25rem 1rem !important;
  font-size: 0.75rem !important;
}

.mobile-related .related-post-card-excerpt {
  margin: 0.5rem 1rem 1rem !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
}

/* Pequeno spacing extra abaixo para separação do conteúdo principal */
.mobile-related + .some-next-section,
.mobile-related + * {
  margin-top: 2rem !important;
}
