/* ═══════════════════════════════════════════
   Amazoca Posts Widget — Estilos
   Versão: 1.0.0
═══════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Wrapper + forçar Sora em tudo (sobrescreve tema) ── */
.ap-posts-wrapper {
  font-family: 'Sora', sans-serif !important;
  width: 100%;
}

.ap-posts-wrapper *,
.ap-posts-wrapper *::before,
.ap-posts-wrapper *::after {
  font-family: 'Sora', sans-serif !important;
}

/* ── Grid principal ── */
.ap-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* ── Card base ── */
.ap-card {
  background: #0D2B16;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ap-card:hover {
  border-color: rgba(177, 198, 57, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ── Imagem do card ── */
.ap-card-img {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}

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

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

/* Placeholder quando não há imagem */
.ap-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a3d22, #0d2b16);
}

/* ── Badge "Em Destaque" ── */
.ap-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(13, 43, 22, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Conteúdo do card ── */
.ap-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Categoria ── */
.ap-category {
  display: block;
  font-size: 0.67rem;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #7EC88A;
  margin-bottom: 10px;
}

/* ── Título ── */
.ap-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.ap-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ap-title a:hover {
  color: #B1C639;
}

/* ── Excerpt ── */
.ap-excerpt {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.65;
  color: #9DBFA8;
  margin-bottom: 20px;
  flex: 1;
}

/* ── Rodapé do card ── */
.ap-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}

/* ── Autor ── */
.ap-author {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ap-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1E4D2B;
  color: #7EC88A;
  font-size: 0.64rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(126, 200, 138, 0.25);
}

.ap-author-info {
  display: flex;
  flex-direction: column;
}

.ap-author-name {
  font-size: 0.75rem;
  font-weight: 400;
  color: #D4ECD9;
  line-height: 1.2;
}

.ap-author-date {
  font-size: 0.67rem;
  color: #6B9A78;
  line-height: 1.2;
}

/* ── Leia mais ── */
.ap-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 400;
  color: #7EC88A;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ap-read-more:hover {
  color: #B1C639;
  gap: 8px;
}

.ap-read-more svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ap-read-more:hover svg {
  transform: translateX(2px);
}

/* ══ CARD DESTAQUE ══ */
.ap-card-featured .ap-card-img {
  height: 280px;
}

.ap-card-featured .ap-title {
  font-size: 1.42rem;
  font-weight: 700;
}

/* ══ COLUNA SECUNDÁRIA ══ */
.ap-col-secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ap-card-small {
  flex: 1;
}

.ap-card-small .ap-card-img {
  height: 158px;
}

.ap-card-small .ap-title {
  font-size: 1rem;
}

.ap-card-small .ap-card-body {
  padding: 14px 16px 16px;
}

.ap-card-small .ap-card-footer {
  margin-top: 8px;
}

/* ── Cards menores: ocultar excerpt e autor no desktop ── */
@media (min-width: 768px) {
  .ap-excerpt-small {
    display: none;
  }

  .ap-author-small {
    display: none;
  }
}

/* ══ RESPONSIVE — Mobile ══ */
@media (max-width: 767px) {
  .ap-grid {
    grid-template-columns: 1fr;
  }

  .ap-card-featured .ap-card-img {
    height: 220px;
  }

  .ap-card-small .ap-card-img {
    height: 200px;
  }

  .ap-card-small .ap-title {
    font-size: 1.05rem;
  }

  /* No mobile todos os excerpts e autores aparecem */
  .ap-excerpt-small {
    display: block;
  }

  .ap-author-small {
    display: flex;
  }
}
