/* Blog — páginas de listagem (/blog) e postagem (/blog/{slug}).
   Segue o tema do site: 1rem = 10px, vermelho #ea3636, cards brancos com
   raio 20px, container 110rem. Carregado via @stack('styles') nas views. */

.blog-page {
  padding: 5rem 0 8rem;
}

/* Cabeçalho da listagem */
.blog-head {
  max-width: 70rem;
  margin: 0 auto 4rem;
  text-align: center;
}

.blog-head h1 {
  font-size: 3.2rem;
  color: #2d3643;
}

/* Filtro por categoria */
.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.blog-categories a,
.blog-categories span.active {
  padding: 1rem 2.4rem;
  border-radius: 3rem;
  background: #ffffff;
  color: #2d3643;
  font-size: 1.5rem;
  border: 1px solid rgba(45, 54, 67, 0.12);
  transition: all 0.3s ease;
}

.blog-categories a:hover,
.blog-categories span.active {
  background: #ea3636;
  border-color: #ea3636;
  color: #ffffff;
}

/* Grade de cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.blog-empty {
  text-align: center;
  font-size: 1.8rem;
  color: #2d3643;
  opacity: 0.7;
  padding: 6rem 0;
}

/* Card de postagem (listagem e relacionados) */
.blog-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 1rem 3rem rgba(45, 54, 67, 0.12);
  transform: translateY(-4px);
}

.blog-card .cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-card .desc {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card .desc span {
  color: #ea3636;
  font-size: 1.3rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.blog-card .desc h2 {
  font-size: 2rem;
  line-height: 1.3;
  color: #2d3643;
  margin-top: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .desc p {
  font-size: 1.5rem;
  color: #2d3643;
  opacity: 0.75;
  margin-top: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card .desc .card-btn {
  align-self: flex-start;
  background: #ea3636;
  color: #ffffff;
  font-size: 1.5rem;
  padding: 1rem 3rem;
  border-radius: 3rem;
  margin-top: 2rem;
  transition: background 0.3s ease;
}

.blog-card:hover .desc .card-btn {
  background: #ba1717;
}

/* Paginação */
.blog-pagination {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 5rem;
}

.blog-pagination a,
.blog-pagination span {
  padding: 0.8rem 1.6rem;
  border-radius: 1rem;
  background: #ffffff;
  color: #2d3643;
  font-size: 1.5rem;
  border: 1px solid rgba(45, 54, 67, 0.12);
}

.blog-pagination span.active {
  background: #ea3636;
  border-color: #ea3636;
  color: #ffffff;
}

.blog-pagination span.disabled {
  opacity: 0.4;
}

.blog-pagination a:hover {
  border-color: #ea3636;
  color: #ea3636;
}

/* Página da postagem */
.post-article {
  max-width: 90rem;
  margin: 0 auto;
}

.post-article .back {
  display: inline-block;
  font-size: 1.5rem;
  color: #2d3643;
  opacity: 0.7;
  margin-bottom: 3rem;
  transition: color 0.3s ease;
}

.post-article .back:hover {
  color: #ea3636;
  opacity: 1;
}

.post-article .chip {
  display: inline-block;
  padding: 0.6rem 1.8rem;
  border-radius: 3rem;
  background: #ea3636;
  color: #ffffff;
  font-size: 1.3rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.post-article h1 {
  font-size: 3.4rem;
  line-height: 1.2;
  color: #2d3643;
  margin-top: 2rem;
}

.post-article .meta {
  font-size: 1.5rem;
  color: #2d3643;
  opacity: 0.6;
  margin-top: 1.2rem;
}

.post-media {
  margin: 3.5rem 0;
}

.post-media .video {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 20px;
  overflow: hidden;
  background: #2d3643;
}

.post-media .video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-media img {
  width: 100%;
  max-height: 50rem;
  object-fit: cover;
  border-radius: 20px;
}

.post-article .lead {
  font-size: 2rem;
  line-height: 1.6;
  color: #2d3643;
  opacity: 0.85;
  margin-bottom: 3rem;
}

.post-content {
  font-size: 1.8rem;
  line-height: 1.7;
  color: #2d3643;
}

.post-content p {
  margin-bottom: 2rem;
}

.post-content a {
  color: #ea3636;
  display: inline;
  text-decoration: underline;
}

.post-content h2,
.post-content h3 {
  margin: 3rem 0 1.5rem;
  line-height: 1.3;
}

.post-content h2 {
  font-size: 2.6rem;
}

.post-content h3 {
  font-size: 2.2rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 2rem 2.5rem;
  list-style: revert;
}

.post-content blockquote {
  border-left: 4px solid #ea3636;
  padding: 1rem 0 1rem 2rem;
  margin-bottom: 2rem;
  opacity: 0.85;
}

.post-article .btn-youtube {
  display: inline-block;
  margin-top: 1rem;
  background: #ea3636;
  color: #ffffff;
  font-size: 1.6rem;
  padding: 1.2rem 3.5rem;
  border-radius: 3rem;
  transition: background 0.3s ease;
}

.post-article .btn-youtube:hover {
  background: #ba1717;
}

/* Postagens relacionadas */
.related {
  margin-top: 7rem;
}

.related h2 {
  font-size: 2.6rem;
  color: #2d3643;
  margin-bottom: 3rem;
}

/* Responsivo */
@media (max-width: 991px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-article h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 560px) {
  .blog-page {
    padding: 3rem 0 5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .post-article h1 {
    font-size: 2.4rem;
  }
}
