/* ==========================================================================
   Blog page - layout fixo (integração depois)
   ========================================================================== */

#page-blog {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

/* ==========================================================================
   Hero do blog (header da página)
   ========================================================================== */

#page-blog .section-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 570px;
  padding: 0;
  background-color: #1d1434;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  #page-blog .section-hero {
    height: auto;
    min-height: 400px;
    padding: 80rem 0 60rem;
  }
}

#page-blog .section-hero .background {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  min-width: 100vw;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#page-blog .section-hero .container {
  position: relative;
  z-index: 3;
}

#page-blog .section-hero .wrapper-title {
  color: #fff;
  font-size: 52rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16rem;
}

@media (max-width: 1023px) {
  #page-blog .section-hero .wrapper-title {
    font-size: 38rem;
  }
}

#page-blog .section-hero .wrapper-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 20rem;
  font-weight: 400;
  line-height: 1.4;
}

/* ==========================================================================
   Header: Últimos Artigos + categorias + busca (fechada → abre ao clicar)
   ========================================================================== */

#page-blog .section-blog-header {
  padding: 40rem 0 0;
  background: #fff;
  overflow: visible;
}

#page-blog .blog-header-row {
  display: flex;
  align-items: center;
  gap: 16rem;
  padding-bottom: 48rem;
  margin-bottom: 0;
  overflow: visible;
}

#page-blog .blog-title {
  color: #252525;
  font-size: 32rem;
  font-weight: 400;
  margin: 0;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

#page-blog .blog-categories {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  overflow-x: visible;
  overflow-y: visible;
  padding-bottom: 12px;
}

#page-blog .blog-categories ul {
  align-items: center;
}

#page-blog .categories-nav {
  flex-shrink: 0;
  width: 32rem;
  height: 32rem;
  border: 0;
  background: transparent;
  color: #9900FF;
  font-size: 18rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

#page-blog .categories-nav:hover {
  opacity: 0.85;
}

#page-blog .categories-nav img {
  display: block;
}

#page-blog .categories-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  max-width: 715px;
  padding-bottom: 0;
  border-bottom: none;
}

#page-blog .categories-list::-webkit-scrollbar {
  display: none;
}

#page-blog .categories-list li {
  flex-shrink: 0;
  white-space: nowrap;
}

#page-blog .categories-list li.categories-list-spacer {
  width: 32rem;
  min-width: 32rem;
  padding: 0;
  pointer-events: none;
}

#page-blog .categories-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  min-height: 28rem;
  color: #6E6E6E;
  font-size: 13rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 0;
  transition: color 0.2s;
  box-sizing: border-box;
  background: transparent;
  border-bottom: 2px solid #CFDAE1;
}

#page-blog .categories-list a:hover {
  background: #F6EBFF;
  color: #9900FF;
  border-color: #9900FF;
  border-radius: 8px 8px 0 0;
}

#page-blog .categories-list a:hover::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: #9900FF;
  border-radius: 1px;
}

#page-blog .categories-list a.is-active {
  background: transparent;
  color: #9900FF;
}

#page-blog .categories-list a.is-active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: #9900FF;
  border-radius: 1px;
}

#page-blog .search-trigger {
  flex-shrink: 0;
  width: 32rem;
  height: 32rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

#page-blog .search-trigger:hover {
  opacity: 0.85;
}

#page-blog .search-trigger-icon {
  display: block;
  width: 18rem;
  height: 18rem;
  object-fit: contain;
}

#page-blog .search-trigger-icon-close {
  display: none;
}

#page-blog .section-blog-header.is-search-open .search-trigger-icon-search {
  display: none;
}

#page-blog .section-blog-header.is-search-open .search-trigger-icon-close {
  display: block;
}

#page-blog .blog-search-wrap {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f9fafb;
}

#page-blog .section-blog-header.is-search-open .blog-search-wrap {
  max-height: 140rem;
  opacity: 1;
  padding: 24rem 0 32rem;
  margin-top: 0;
  margin-bottom: 40rem;
}

#page-blog .blog-search-wrap .blog-search {
  opacity: 0;
  transform: translateY(-8rem);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.06s,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.06s;
}

#page-blog .section-blog-header.is-search-open .blog-search-wrap .blog-search {
  opacity: 1;
  transform: translateY(0);
}

#page-blog .blog-search {
  position: relative;
  max-width: 560rem;
  margin: 0 auto;
}

#page-blog .blog-search .search-icon {
  position: absolute;
  left: 18rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20rem;
  height: 20rem;
  object-fit: contain;
  pointer-events: none;
}

#page-blog .search-input {
  width: 100%;
  padding: 14rem 44rem 14rem 50rem;
  border: 0;
  border-radius: 10px;
  font-size: 16rem;
  color: #1d1434;
  background: #fff;
  outline: 0;
  text-align: center;
}

#page-blog .search-input::placeholder {
  color: #9ca3af;
}

#page-blog .search-input:focus {
  outline: 0;
}

#page-blog .search-input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

#page-blog .search-clear {
  position: absolute;
  right: 14rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28rem;
  height: 28rem;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 20rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

#page-blog .search-clear:hover {
  color: #6b7280;
}

@media (max-width: 767px) {
  #page-blog .blog-header-row {
    flex-wrap: wrap;
    gap: 16rem;
  }

  #page-blog .blog-title {
    width: 100%;
  }

  #page-blog .blog-categories {
    order: 2;
    width: 100%;
  }

  #page-blog .search-trigger {
    order: 1;
    margin-left: auto;
  }
}

/* ==========================================================================
   Destaque: 1 card grande
   ========================================================================== */

#page-blog .section-featured {
  padding: 0 0 48rem;
}

#page-blog .featured-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48rem;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 1023px) {
  #page-blog .featured-card {
    grid-template-columns: 1fr;
  }
}

#page-blog .featured-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

#page-blog .featured-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
}

#page-blog .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#page-blog .featured-content {
  padding: 40rem 40rem 40rem 0;
}

@media (max-width: 1023px) {
  #page-blog .featured-content {
    padding: 24rem;
  }
}

#page-blog .featured-tag {
  display: inline-block;
  padding: 6rem 12rem;
  background: #F6EBFF;
  color: #9900FF;
  font-size: 12rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 8rem;
}

#page-blog .featured-date {
  color: #9ca3af;
  font-size: 14rem;
  margin-left: 12rem;
}

#page-blog .featured-title {
  color: #1d1434;
  font-size: 28rem;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 16rem;
}

#page-blog .featured-excerpt {
  color: #6b7280;
  font-size: 16rem;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Grid 3 artigos + botão
   ========================================================================== */

#page-blog .section-posts-grid {
  padding: 0 0 64rem;
}

#page-blog .posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32rem;
  margin-bottom: 48rem;
}

@media (max-width: 1023px) {
  #page-blog .posts-grid {
    grid-template-columns: 1fr;
    gap: 24rem;
  }
}

#page-blog .post-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity 0.2s;
}

#page-blog .post-card:hover {
  opacity: 0.95;
}

#page-blog .post-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

#page-blog .post-card-image {
  width: 100%;
  aspect-ratio: 395/239;
  overflow: hidden;
  background: #e0e7ec;
  border-radius: 8px;
}

#page-blog .post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#page-blog .post-card-tag {
  display: inline-block;
  padding: 6rem 10rem;
  background: #F6EBFF;
  color: #9900FF;
  font-size: 12rem;
  font-weight: 600;
  border-radius: 4px;
  margin: 16rem 0 16rem 0;
}

#page-blog .post-card-date {
  color: #9ca3af;
  font-size: 14rem;
  margin-left: 16rem;
}

#page-blog .post-card-title {
  color: #1d1434;
  font-size: 18rem;
  font-weight: 400;
  line-height: 1.35;
  padding: 0;
}

#page-blog .section-cta {
  text-align: center;
}

#page-blog .button-outline {
  display: inline-block;
  padding: 14rem 32rem;
  border: 1px solid #DDE0E3;
  border-radius: 6px;
  background: #fff;
  color: #9900FF;
  font-size: 16rem;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#page-blog .button-outline:hover {
  background: #9900FF;
  color: #fff;
  border-color: #9900FF;
}

/* ==========================================================================
   Newsletter (pixel perfect)
   ========================================================================== */

#page-blog .section-newsletter {
  padding: 56px 0;
  background: #F9F5FF;
}

#page-blog .newsletter-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 150px;
  margin: 0 auto;
  max-width: 100%;
}

@media (max-width: 1023px) {
  #page-blog .newsletter-inner {
    flex-direction: column;
    gap: 32px;
  }

  #page-blog .form-fields-row {
    flex-direction: column;
    align-items: stretch;
  }

  #page-blog .form-row .form-input {
    width: 100%;
    min-width: 0;
  }

  #page-blog .button-subscribe {
    width: 100%;
  }
}

#page-blog .newsletter-text {
  flex-shrink: 0;
}

#page-blog .newsletter-icon {
  display: block;
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  margin-bottom: 12px;
  object-fit: contain;
}

#page-blog .newsletter-heading {
  color: #2E2E2E;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.01em;
}

#page-blog .newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}

/* CF7: form e wrappers herdando o layout da newsletter */
#page-blog .newsletter-form .wpcf7 {
  flex: 1;
  min-width: 0;
}

#page-blog .newsletter-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}

#page-blog .newsletter-form .wpcf7-form fieldset.hidden-fields-container {
  display: none !important;
}

#page-blog .newsletter-form .wpcf7-spinner {
  display: none !important;
}

#page-blog .newsletter-form .wpcf7-form-control-wrap {
  display: block;
  min-width: 0;
}

#page-blog .newsletter-form .form-row .wpcf7-form-control-wrap {
  display: block;
}

/* Submit está dentro de <p>; manter na mesma linha dos campos */
#page-blog .newsletter-form .form-fields-row>p {
  margin: 0;
  flex-shrink: 0;
  display: block;
}

#page-blog .newsletter-form .form-fields-row>.wpcf7-form-control-wrap {
  flex-shrink: 0;
  display: block;
}

/* Remover margem e <br> dos <p> que o CF7 adiciona */
#page-blog .newsletter-form .form-row p,
#page-blog .newsletter-form .form-consent p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  min-width: 0;
}

#page-blog .newsletter-form .form-row p br,
#page-blog .newsletter-form .form-consent p br {
  display: none;
}

#page-blog .newsletter-form .form-consent p {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

#page-blog .form-fields-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

#page-blog .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#page-blog .newsletter-form .form-row p {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#page-blog .form-row .form-input {
  width: 288px;
  min-width: 288px;
  box-sizing: border-box;
}

/* Inputs da newsletter: garantir tamanho e aparência (CF7 pode usar outras classes) */
#page-blog .newsletter-form .form-row input[type="text"],
#page-blog .newsletter-form .form-row input[type="email"],
#page-blog .newsletter-form input.wpcf7-form-control.wpcf7-text,
#page-blog .newsletter-form input.wpcf7-form-control.wpcf7-email,
#page-blog .newsletter-form .form-row input[type="text"]:not([type="hidden"]),
#page-blog .newsletter-form .form-row input[type="email"]:not([type="hidden"]) {
  display: block !important;
  width: 288px !important;
  min-width: 288px !important;
  height: 60px !important;
  padding: 12px 16px !important;
  border: 1px solid #DDDDDD !important;
  border-style: solid !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  color: #1d1434 !important;
  background: #fff !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

#page-blog .newsletter-form .form-row .wpcf7-form-control-wrap {
  display: block;
  width: 288px;
  min-width: 288px;
}

#page-blog .form-label {
  color: #2E2E2E;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

#page-blog .form-input {
  padding: 12px 16px;
  height: 60px;
  border: 1px solid #DDDDDD;
  border-radius: 8px;
  font-size: 16px;
  color: #1d1434;
  background: #fff;
  line-height: 1.25;
  box-sizing: border-box;
}

#page-blog .form-input::placeholder {
  color: #9CA3AF;
}

#page-blog .button-subscribe {
  padding: 12px 24px;
  height: 60px;
  background: #9900FF;
  width: 181px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(153, 0, 255, 0.25);
  line-height: 1.25;
  box-sizing: border-box;
  white-space: nowrap;
}

#page-blog .button-subscribe:hover {
  opacity: 0.95;
  box-shadow: 0 6px 16px rgba(153, 0, 255, 0.3);
}

#page-blog .form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
}

#page-blog .newsletter-form .form-consent .form-consent-text {
  display: block;
  flex: 1;
  min-width: 0;
  max-width: 576px;
}

#page-blog .form-consent input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #9900FF;
}

#page-blog .form-consent label {
  flex: 1;
  min-width: 0;
  color: #2E2E2E;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  max-width: 576px;

  display: flex;
  gap: 10px;
}

#page-blog .form-consent-text {
  display: block;
}

#page-blog .form-consent a {
  color: #9900FF;
  text-decoration: underline;
  font-weight: 500;
}

#page-blog .form-consent a:hover {
  text-decoration: none;
}

#page-blog .newsletter-form .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

#page-blog .newsletter-form .wpcf7-not-valid-tip {
  font-size: 13px;
  margin-top: 4px;
}

/* ==========================================================================
   Mais lidas
   ========================================================================== */

#page-blog .section-most-read {
  padding: 64rem 0 80rem;
  background: #fff;
}

#page-blog .most-read-title {
  display: flex;
  align-items: center;
  gap: 8rem;
  color: #1d1434;
  font-size: 26rem;
  font-weight: 400;
  margin: 0 0 32rem;
}

#page-blog .most-read-icon {
  display: inline-block;
  width: 24rem;
  height: 24rem;
  max-width: 24px;
  max-height: 24px;
  vertical-align: middle;
  object-fit: contain;
  margin-left: 32px;
}

#page-blog .most-read-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32rem;
}

@media (max-width: 1023px) {
  #page-blog .most-read-grid {
    grid-template-columns: 1fr;
    gap: 24rem;
  }
}

#page-blog .post-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity 0.2s;
}

#page-blog .post-card:hover {
  opacity: 0.95;
}

#page-blog .post-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

#page-blog .post-card-image {
  width: 100%;
  aspect-ratio: 395/239;
  overflow: hidden;
  background: #e0e7ec;
  border-radius: 8px;
}

#page-blog .post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#page-blog .post-card-tag {
  display: inline-block;
  padding: 6rem 10rem;
  background: #F6EBFF;
  color: #9900FF;
  font-size: 12rem;
  font-weight: 600;
  border-radius: 4px;
  margin: 16rem 0 16rem 0;
}

#page-blog .post-card-date {
  color: #9ca3af;
  font-size: 14rem;
  margin-left: 16rem;
}

#page-blog .post-card-title {
  color: #1d1434;
  font-size: 18rem;
  font-weight: 400;
  line-height: 1.35;
  padding: 0;
}