/* ==========================================================================
   Estilos específicos para a página do Blog (home.php / category.php)
   BIM Works Theme
   ========================================================================== */

/* Container Geral da Página */
.blog-page {
  background: #0a0a0b;
  padding-top: 60px;
  padding-bottom: 80px;
  width: 100%;
}

.blog-page__container {
  width: 100%;
  max-width: 1494px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .blog-page__container {
    padding-left: 60px;
    padding-right: 60px;
  }
}

@media (min-width: 1024px) {
  .blog-page__container {
    padding-left: 95px;
    padding-right: 95px;
  }
}

/* Cabeçalho do Blog */
.blog-header {
  text-align: center;
  margin-bottom: 48px;
}

.blog-header__title {
  color: #e5e5e5;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 60px;
  font-style: normal;
  font-weight: 700;
  line-height: 66px;
  letter-spacing: -1.5px;
  margin: 0 0 15px 0;
  text-transform: uppercase;
}

.blog-header__description {
  color: #99a1af;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 26px;
  max-width: 760px;
  margin: 0 auto;
}

/* Filtros de Categorias */
.blog-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 48px;
}

/* Tablet e mobile: scroll horizontal quando houver muitas categorias */
@media (max-width: 1023px) {
  .blog-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 6px;
  }

  .blog-filters::-webkit-scrollbar {
    height: 3px;
  }

  .blog-filters::-webkit-scrollbar-track {
    background: transparent;
  }

  .blog-filters::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
  }
}

.blog-filters__btn {
  display: flex;
  flex-shrink: 0;
  height: 36px;
  padding: 9px 18px;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  border: 1.5px solid #7c3aed;
  background: linear-gradient(
    90deg,
    rgba(124, 58, 237, 0) 0%,
    rgba(124, 58, 237, 0) 65%,
    rgba(124, 58, 237, 0.18) 100%
  );
  color: #7c3aed;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-sizing: border-box;
  cursor: pointer;
}

.blog-filters__btn:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #9b6bf7;
  border-color: #9b6bf7;
}

.blog-filters__btn.active {
  border: 1.5px solid #7c3aed;
  background: #7c3aed;
  color: #ffffff;
  font-weight: 500;
}

/* Grid de Artigos */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  width: 100%;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-grid__item {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Paginação Customizada */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
  width: 100%;
}

.blog-pagination__btn {
  display: flex;
  width: 44px;
  padding: 12px 0;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  border: 1.5px solid rgba(71, 40, 118, 0.7);
  background: #0f0f11;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.blog-pagination__btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.blog-pagination__btn:hover {
  border-color: #7c3aed;
  background: #141416;
}

.blog-pagination__btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.blog-pagination__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-pagination__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #50505f;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
}

.blog-pagination__dot:hover:not(.blog-pagination__dot--active) {
  background: #7c3aed;
}

.blog-pagination__dot--active {
  width: 28px;
  height: 8px;
  border-radius: 4px;
  background: #7c3aed;
  cursor: default;
}

/* Responsividade Geral */
@media (max-width: 768px) {
  .blog-page {
    padding-top: 40px;
    padding-bottom: 60px;
  }

  .blog-header__title {
    font-size: 40px;
    line-height: 48px;
  }

  .blog-header__description {
    font-size: 16px;
    line-height: 24px;
  }

  .blog-filters {
    gap: 8px;
    margin-bottom: 32px;
  }

  .blog-filters__btn {
    padding: 8px 18px;
    font-size: 14px;
  }
}

/* ==========================================================================
   Card do Blog (Design específico para a listagem)
   ========================================================================== */

.blog-card {
  display: flex;
  width: 100%;
  max-width: 384px;
  height: 402px;
  padding: 0;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid #1e2939;
  background: #141416;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.blog-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Imagem do Card */
.blog-card__image-container {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.blog-card__image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(8, 8, 10, 0.85) 100%
  );
  z-index: 2;
  pointer-events: none;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  display: block;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
  /* filter: grayscale(100%) sepia(15%) hue-rotate(220deg) saturate(90%)
    brightness(75%); */
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

/* Tag da categoria */
.blog-card__category-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  height: 28px;
  padding: 7px 14px;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  background: #7c3aed;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  box-sizing: border-box;
}

/* Conteúdo inferior do card */
.blog-card__content {
  display: flex;
  padding: 16px 24px;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
  background: #141416;
  width: 100%;
  height: calc(402px - 200px);
  box-sizing: border-box;
}

.blog-card__date-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 13px;
}

.blog-card__date {
  color: #6a7282;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 300;
  line-height: normal;
}

.blog-card__title {
  margin: 0 0 auto 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card__title a {
  color: #e5e5e5;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card__title a:hover {
  color: #7c3aed;
}

/* Linha Divisória */
.blog-card__divider {
  background: rgba(255, 255, 255, 0.06);
  height: 1px;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 12px;
}

/* Link "Ler artigo" */
.blog-card__link {
  display: inline-flex;
  align-items: center;
  color: #7c3aed;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: color 0.3s ease;
}

.blog-card__link:hover {
  color: #9b6bf7;
}

@media (max-width: 767px) {
  .blog-card {
    max-width: 100%;
  }
}

/* ==========================================================================
   Página Interna do Post (single.php)
   ========================================================================== */

.single-post-page {
  background: #0a0a0b;
  padding-top: 60px;
  padding-bottom: 80px;
  width: 100%;
}

.single-post-container {
  width: 100%;
  max-width: 1494px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .single-post-container {
    padding-left: 60px;
    padding-right: 60px;
  }
}

@media (min-width: 1024px) {
  .single-post-container {
    padding-left: 95px;
    padding-right: 95px;
  }
}

/* Conter o conteúdo principal do artigo para garantir boa leitura */
.single-post-container article {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* Cabeçalho do Post */
.single-post-header {
  text-align: center;
  margin-bottom: 40px;
}

.single-post-badge {
  display: inline-flex;
  height: 28px;
  padding: 7px 14px;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  background: #7c3aed;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.single-post-badge:hover {
  background-color: #9b6bf7;
}

.single-post-title {
  color: #e5e5e5;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 44px;
  font-style: normal;
  font-weight: 700;
  line-height: 52px;
  letter-spacing: -1px;
  margin: 0 0 15px 0;
}

.single-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6a7282;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: normal;
  width: 100%;
}

.single-post-back-btn {
  color: #7c3aed;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
  cursor: pointer;
}

.single-post-back-btn:hover {
  color: #9b6bf7;
}

/* Imagem Destacada */
.single-post-thumbnail {
  position: relative;
  width: 100%;
  height: 450px;
  border-radius: 16px;
  border: 1px solid #1e2939;
  overflow: hidden;
  margin-bottom: 40px;
}

.single-post-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(8, 8, 10, 0.85) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.single-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  /* filter: grayscale(100%) sepia(15%) hue-rotate(220deg) saturate(90%)
    brightness(75%); */
}

/* Bloco de Conteúdo */
.single-post-content {
  color: #d1d5dc;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 300;
  line-height: 28px;
}

.single-post-content p {
  margin-top: 0;
  margin-bottom: 24px;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
  color: #e5e5e5;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
}

.single-post-content h2 {
  font-size: 28px;
  line-height: 36px;
}

.single-post-content h3 {
  font-size: 22px;
  line-height: 30px;
}

.single-post-content a {
  color: #7c3aed;
  text-decoration: none;
  transition: color 0.2s ease;
}

.single-post-content a:hover {
  color: #9b6bf7;
  text-decoration: underline;
}

.single-post-content ul,
.single-post-content ol {
  margin-top: 0;
  margin-bottom: 24px;
  padding-left: 24px;
}

.single-post-content li {
  margin-bottom: 8px;
}

/* Seção de Artigos Relacionados */
.related-posts {
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 48px;
}

.related-posts-title {
  color: #e5e5e5;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
  margin-top: 0;
  margin-bottom: 32px;
  text-align: center;
}

/* Responsividade do Post */
@media (max-width: 768px) {
  .single-post-page {
    padding-top: 40px;
    padding-bottom: 60px;
  }

  .single-post-title {
    font-size: 30px;
    line-height: 38px;
  }

  .single-post-meta {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .single-post-thumbnail {
    height: 280px;
    margin-bottom: 30px;
  }

  .related-posts {
    margin-top: 60px;
    padding-top: 36px;
  }

  .related-posts-title {
    font-size: 24px;
    margin-bottom: 24px;
  }
}
