/* ===============================
   SINGLE POST STYLES
   Arquivo: single.css
=============================== */

/* Container principal */
.single-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  padding: 20px;
  box-sizing: border-box;
}

/* Conteúdo principal */
.single-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* Sidebar */
.single-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* Imagem destaque */
.post-thumbnail {
  width: 100%;
  height: auto !important;
  flex: 1 1 auto !important;
  margin-bottom: 20px;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

/* Cabeçalho do post */
.post-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #000;
  margin: 15px 0 10px 0;
  position: relative;
  z-index: 2;
}

.post-meta {
  font-size: 1rem;
  color: #555;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
}

/* ===============================
   CONTEÚDO DO POST
=============================== */
.post-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #222;
  margin-bottom: 35px;
  word-break: break-word;
}

/* Parágrafos */
.post-content p {
  margin: 0 0 1.5em;
}

/* Cabeçalhos */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 1.5em 0 0.5em;
  font-weight: 600;
  line-height: 1.4;
  color: #000;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.6rem; }
.post-content h4 { font-size: 1.4rem; }
.post-content h5 { font-size: 1.2rem; }
.post-content h6 { font-size: 1rem; }

/* Listas */
.post-content ul,
.post-content ol {
  margin: 0 0 1.5em 1.5em;
  padding: 0;
}

.post-content li {
  margin-bottom: 0.5em;
}

/* Links */
.post-content a {
  color: #03A250;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.post-content a:hover {
  color: #007b5e;
  text-decoration: none;
}

/* Imagens dentro do conteúdo */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
  border-radius: 6px;
}

/* Blockquotes */
.post-content blockquote {
  margin: 1.5em 0;
  padding: 10px 15px;
  border-left: 4px solid #03A250;
  background: #f9f9f9;
  font-style: italic;
}

/* Citações em destaque dentro do texto */
.post-content q {
  quotes: "“" "”" "‘" "’";
}

.post-content q:before { content: open-quote; }
.post-content q:after { content: close-quote; }

/* Tabelas */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.post-content th,
.post-content td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.post-content th {
  background: #f4f4f4;
  font-weight: 600;
}

/* Código e pré-formatado */
.post-content pre,
.post-content code {
  font-family: monospace;
  background: #f4f4f4;
  padding: 4px 8px;
  border-radius: 4px;
  overflow-x: auto;
}

/* Destaques */
.post-content strong {
  font-weight: 600;
}

.post-content em {
  font-style: italic;
}

/* Footer do post */
.post-footer {
  font-size: 0.95rem;
  color: #444;
  margin-top: 25px;
}

/* Navegação entre posts */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin: 30px 0;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
  .single-container {
    flex-direction: column;
    max-width: 95%;
    gap: 20px;
  }
  .single-sidebar {
    width: 100%;
  }
  .post-thumbnail {
    margin: 0 0 18px 0;
  }
  .related-post-item {
    flex: 1 1 48%;
  }
}

@media (max-width: 600px) {
  .related-post-item {
    flex: 1 1 100%;
  }
}

/* ===============================
   POSTS RELACIONADOS
=============================== */
.related-posts {
    margin: 40px 0 20px;
}

.related-posts h3 {
    font-size: 1.6rem;
    color: #03A250;
    margin-bottom: 15px;
}

.related-posts-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.related-post-item {
    flex: 1 1 calc(33.333% - 10px);
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.related-post-item:hover {
    transform: translateY(-3px);
}

.related-post-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.related-post-title {
    padding: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}

/* ===============================
   RESPONSIVIDADE POSTS RELACIONADOS
=============================== */
@media (max-width: 1024px) {
    .related-post-item {
        flex: 1 1 48%;
    }
}

@media (max-width: 600px) {
    .related-post-item {
        flex: 1 1 100%;
    }
}
