/* ==========================================================================
   Malamute Theme — Lucas Kallas: Blog, Single, Page & 404 Styles
   ========================================================================== */

/* ---------- Breadcrumbs (Rank Math) ---------- */
.rank-math-breadcrumb {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 24px;
}

.rank-math-breadcrumb a {
  color: var(--cedar);
  transition: color 0.2s ease;
}

.rank-math-breadcrumb a:hover {
  color: var(--hematite);
}

.rank-math-breadcrumb .separator {
  margin: 0 8px;
  color: #a09d94;
}

/* ---------- Cabeçalho de Seções Internas ---------- */
.page-header-internal {
  padding: 64px 0 44px;
  border-bottom: 1px solid #c9c6bb;
  margin-bottom: 48px;
}

.page-header-internal h1 {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--graphite);
  margin-top: 12px;
}

.page-header-internal .sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 64ch;
  margin-top: 16px;
  line-height: 1.6;
}

/* ---------- Layout com Barra Lateral (Blog, Categorias e Single) ---------- */
.blog-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
}

.blog-main-col {
  min-width: 0;
}

.blog-sidebar-col {
  min-width: 0;
}

.blog-sidebar .sidebar-sticky-inner {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Widgets da Barra Lateral */
.sidebar-widget {
  background: var(--paper);
  border: 1px solid #d3d0c5;
  padding: 28px 24px;
}

.sidebar-widget-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--graphite);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d3d0c5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Widget: Autor / Lucas Kallas */
.widget-author {
  background: var(--stone-3);
  border-left: 3px solid var(--cedar);
}

.sidebar-author-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.sidebar-author-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.2;
}

.sidebar-author-role {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.sidebar-author-bio {
  font-size: 14px;
  color: #4a4a41;
  line-height: 1.55;
  margin-bottom: 16px;
}

.sidebar-author-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cedar);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.sidebar-author-links a:hover {
  color: var(--hematite);
  gap: 10px;
}

/* Widget: Lista de Categorias */
.sidebar-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 14.5px;
  color: var(--graphite);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-left-color 0.2s ease;
  border-left: 2px solid transparent;
}

.sidebar-cat-list li a:hover {
  background: var(--stone-3);
  color: var(--cedar);
  border-left-color: var(--brass);
}

.sidebar-cat-list li.is-active a {
  background: var(--stone-3);
  color: var(--cedar);
  font-weight: 600;
  border-left-color: var(--cedar);
}

.sidebar-cat-list .cat-name {
  flex-grow: 1;
}

.sidebar-cat-list .cat-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--stone-2);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 10px;
}

.sidebar-cat-list li.is-active .cat-count {
  background: var(--cedar);
  color: #f4f2ea;
}

/* Widget: Artigos Recentes */
.sidebar-recent-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-recent-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2dfd5;
  transition: opacity 0.2s ease;
}

.sidebar-recent-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-recent-item:hover .sidebar-recent-title {
  color: var(--cedar);
}

.sidebar-recent-item time {
  font-size: 11.5px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.sidebar-recent-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--graphite);
  transition: color 0.2s ease;
}

/* Single Post Main Adjustments */
.single-post-main {
  padding-top: 48px;
}

.single-article-content {
  background: var(--paper);
  border: 1px solid #d3d0c5;
  padding: 48px 44px;
}

/* ---------- Grid do Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}

.article-card {
  background: var(--paper);
  border: 1px solid #d3d0c5;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.07);
  border-color: #b0aba0;
}

.article-card-thumb {
  aspect-ratio: 16/9;
  background: var(--stone-2);
  overflow: hidden;
  border-bottom: 1px solid #d3d0c5;
  display: block;
  position: relative;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

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

.article-card-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  background:
    radial-gradient(120% 80% at 50% 0%, #26463612 0, transparent 60%),
    linear-gradient(160deg, #20402f, #16281f);
  color: var(--brass);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 48px;
  font-weight: 500;
}

.article-card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.article-card-category {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--hematite);
  font-size: 12px;
}

.meta-dot {
  color: #b5b2a6;
}

.article-card-readtime {
  color: var(--muted);
}

.article-card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--graphite);
}

.article-card-title a {
  color: inherit;
  transition: color 0.2s ease;
}

.article-card-title a:hover {
  color: var(--cedar);
}

.article-card-excerpt {
  font-size: 15.5px;
  color: #4a4a41;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 24px;
}

.article-card-footer {
  border-top: 1px solid #e0ddd2;
  padding-top: 18px;
  margin-top: auto;
}

.article-card-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cedar);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.article-card:hover .article-card-link {
  gap: 12px;
  color: var(--hematite);
}

/* ---------- Artigo de Destaque (Featured Hero Post) ---------- */
.article-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
}

.article-card-featured .article-card-thumb {
  aspect-ratio: auto;
  min-height: 380px;
  border-bottom: none;
  border-right: 1px solid #d3d0c5;
}

.article-card-featured .article-card-body {
  padding: 44px 40px;
  justify-content: center;
}

.article-card-featured .article-card-title {
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1.2;
  margin-bottom: 18px;
}

.article-card-featured .article-card-excerpt {
  font-size: 16.5px;
  line-height: 1.65;
}

/* ---------- Single Post (Leitor Imersivo) ---------- */
.single-article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.single-header {
  margin-bottom: 36px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.single-category {
  color: var(--hematite);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12.5px;
}

.single-title {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--graphite);
  margin-bottom: 20px;
}

.single-featured-image {
  margin: 36px 0 44px;
  border: 1px solid #d3d0c5;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.single-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  font-size: 18px;
  line-height: 1.78;
  color: #383830;
}

.entry-content p {
  margin-bottom: 26px;
}

.entry-content .lead {
  font-size: 21px;
  line-height: 1.65;
  color: #2b2b24;
  font-weight: 500;
  margin-bottom: 32px;
}

.entry-content h2 {
  font-size: 30px;
  font-weight: 500;
  margin: 48px 0 20px;
  color: var(--graphite);
  line-height: 1.2;
}

.entry-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 36px 0 16px;
  color: var(--graphite);
}

.entry-content blockquote {
  margin: 40px 0;
  padding: 24px 32px;
  background: var(--stone-3);
  border-left: 4px solid var(--cedar);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--cedar);
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 28px 28px;
}

.entry-content li {
  margin-bottom: 10px;
}

/* Navegação entre Posts */
.post-navigation-editorial {
  border-top: 1px solid #c9c6bb;
  margin-top: 64px;
  padding-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.post-nav-item {
  max-width: 48%;
}

.post-nav-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.post-nav-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--graphite);
  line-height: 1.3;
}

.post-nav-title:hover {
  color: var(--cedar);
}

/* ---------- Página 404 ---------- */
.error-404-container {
  text-align: center;
  padding: 110px 24px;
  max-width: 640px;
  margin: 0 auto;
}

.error-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(80px, 12vw, 140px);
  font-weight: 600;
  color: var(--hematite);
  line-height: 1;
  margin-bottom: 12px;
}

.error-title {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--graphite);
}

.error-desc {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Responsividade Blog */
@media (max-width: 900px) {
  .blog-layout-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .blog-sidebar .sidebar-sticky-inner {
    position: static;
  }
  .single-article-content {
    padding: 32px 20px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .article-card-featured {
    grid-template-columns: 1fr;
  }
  .article-card-featured .article-card-thumb {
    min-height: 240px;
    border-right: none;
    border-bottom: 1px solid #d3d0c5;
  }
  .article-card-featured .article-card-body {
    padding: 32px;
  }
  .post-navigation-editorial {
    flex-direction: column;
    gap: 24px;
  }
  .post-nav-item {
    max-width: 100%;
  }
}
