/* footer rules removed to footer.css */

.cta-final {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cta-final.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-final .cta-btn {
  border: 1px solid rgba(142, 177, 153, 0.5);
  box-shadow: 0 0 10px rgba(142, 177, 153, 0.5);
}

.cta-final .cta-btn:hover {
  box-shadow: 0 0 15px rgba(142, 177, 153, 0.8);
}

@media (max-width: 768px) {
  .header-content h1 {
    font-size: 2.8rem;
  }

  .logo-central { width: 140px; }
  section h2, section h3, .titulo-secao { font-size: 2rem; }

  .cta-final h2 {
    font-size: 2rem;
  }

  .cta-final .subtitulo {
    font-size: 1rem;
  }

  .cta-final .cta-btn {
    padding: 12px 25px;
    font-size: 1rem;
    width: 100%;
    text-align: center;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  /* footer responsive rules moved to footer.css */
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 2rem;
  }
}

.blog-cards {
  display: grid;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px 0;
  justify-content: center;
}

.blog-card {
  --img-scale: 1.001;
  --title-color: var(--marrom);
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;
  border-radius: 12px;
  box-shadow: none;
  background: var(--branco);
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  width: 300px;
  height: 380px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--verde);
  cursor: pointer;
}

.blog-card h2 {
  margin: 0px 0 8px 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--title-color);
  transition: color 0.3s ease-out;
  text-align: left;
}

figure {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.blog-card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  transform-origin: center;
  transform: scale(var(--img-scale));
  transition: transform 0.4s ease-in-out;
}

.card-body {
  padding: 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card .meta {
  font-size: 0.75rem;
  margin: -60px 0 8px 0;
  color: #777;
  margin-bottom: 8px;
  text-align: center;
}

.blog-card .excerpt {
  font-size: 0.8rem;
  color: var(--marrom);
  margin-bottom: 8px;
  text-align: left;
  line-height: 1.4;
  flex-grow: 1;
}

.blog-card a.read-more {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--verde);
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  bottom: auto;
  left: auto;
  opacity: 1;
  background: none;
  z-index: 1;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

.blog-card a:focus {
  outline: 1px dotted var(--verde);
}

.blog-card a .icon {
  min-width: 18px;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  transform: translateX(var(--link-icon-translate));
  opacity: var(--link-icon-opacity);
  transition: all 0.3s;
}

.blog-card:hover,
.blog-card:focus {
  --img-scale: 1.1;
  --title-color: var(--verde);
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media screen and (max-width: 992px) {
  .blog-cards {
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
  }
}

@media screen and (max-width: 600px) {
  .blog-cards {
    grid-template-columns: 1fr;
    justify-content: center;
  }
  
  .blog-card {
    width: 100%;
    height: auto;
    min-height: 360px;
  }
  
  .blog-card h2 {
    font-size: 1.1rem;
  }
  
  .blog-card .meta {
    font-size: 0.7rem;
  }
  
  .blog-card .excerpt {
    font-size: 0.75rem;
  }
  
  .blog-card a.read-more {
    font-size: 0.8rem;
  }
}

.blog-content {
  margin-top: 190px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  line-height: 1.7;
}

.blog-post-single {
  max-width: 780px;
  margin-top: 200px !important;
  margin: 150px auto 60px;
  padding: 0 20px;
}

.post-cover {
  width: 100%;
  max-height: 350px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 30px;
}

.post-cover img {
  width: 100%;
  height: auto;
  object-fit: fill;
}

.blog-post-single h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--marrom);
}

.blog-post-single .meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 20px;
}

.blog-post-single p,
.blog-post-single ul {
  font-size: 0.95rem;
  margin-bottom: 18px;
  color: var(--marrom);
}

.back-link {
  display: inline-block;
  background: var(--verde);
  color: var(--branco);
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  margin-top: 40px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.back-link:hover {
  background: #6fa687;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

main.blog-content {
  flex: 1 0 auto;
}

/* footer.rodape moved to footer.css */

#post-content img {
  max-width: 250px;
  height: auto;
  display: block;
  margin: 12px auto;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.post-tags .tag {
  background: #f8f8f8;
  color: #555;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: default;
}

.post-tags .tag:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.post-not-found,
.error-loading {
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 40px auto;
}

.post-not-found h1,
.error-loading h1 {
  color: #333;
  margin-bottom: 20px;
}

.post-not-found a,
.error-loading a {
  display: inline-block;
  margin-top: 20px;
  color: #2e7d32;
  text-decoration: none;
  font-weight: 500;
}

.post-not-found a:hover,
.error-loading a:hover {
  text-decoration: underline;
}

.related-posts {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.related-posts h2 {
  margin-bottom: 30px;
  color: #7f6449 !important;
}

/* ESTILOS PARA POSTS RELACIONADOS - AGORA IDÊNTICOS AOS CARDS NORMAIS */

#related-posts-container {
  display: grid;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px 0;
  justify-content: center;
}

#related-posts-container .blog-card {
  --img-scale: 1.001;
  --title-color: var(--marrom);
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;
  border-radius: 12px;
  box-shadow: none;
  background: var(--branco);
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  width: 300px;
  height: 380px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--verde);
  cursor: pointer;
}

#related-posts-container .blog-card h2 {
  margin: 0px 0 8px 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--title-color);
  transition: color 0.3s ease-out;
  text-align: left;
}

#related-posts-container .blog-card .meta {
  font-size: 0.75rem;
  margin: -60px 0 8px 0;
  color: #777;
  margin-bottom: 8px;
  text-align: center;
}

#related-posts-container .blog-card .excerpt {
  font-size: 0.8rem;
  color: var(--marrom);
  margin-bottom: 8px;
  text-align: left;
  line-height: 1.4;
  flex-grow: 1;
}

#related-posts-container .blog-card a.read-more {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--verde);
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  bottom: auto;
  left: auto;
  opacity: 1;
  background: none;
  z-index: 1;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

#related-posts-container .blog-card:hover,
#related-posts-container .blog-card:focus {
  --img-scale: 1.1;
  --title-color: var(--verde);
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

/* Responsividade para posts relacionados */
@media screen and (max-width: 992px) {
  #related-posts-container {
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
  }
}

@media screen and (max-width: 600px) {
  #related-posts-container {
    grid-template-columns: 1fr;
    justify-content: center;
  }
  
  #related-posts-container .blog-card {
    width: 100%;
    height: auto;
    min-height: 360px;
  }
  
  #related-posts-container .blog-card h2 {
    font-size: 1.1rem;
  }
  
  #related-posts-container .blog-card .meta {
    font-size: 0.7rem;
  }
  
  #related-posts-container .blog-card .excerpt {
    font-size: 0.75rem;
  }
  
  #related-posts-container .blog-card a.read-more {
    font-size: 0.8rem;
  }
}

/* Estilo para quando houver apenas 1 card relacionado */
#related-posts-container.single-card {
  display: flex;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

/* Ajuste para quando tiver apenas 1 card */
@media screen and (min-width: 601px) {
  #related-posts-container.single-card {
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
  }
}

.loading-placeholder {
  opacity: 0.7;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 0.4; }
  100% { opacity: 0.7; }
}

.image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}