/* Visual quality restore after PageSpeed purge — prefer layout fidelity over micro PSI wins.
   Linked from hub pages; does not depend on purged arbitrary Tailwind utilities. */

/* --- News listing layout --- */
.pp-news-layout {
  display: block;
}
@media (min-width: 1024px) {
  .pp-news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(300px, 28vw);
    gap: 2.25rem;
    align-items: start;
  }
}
.pp-news-layout > aside {
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .pp-news-layout > aside {
    max-width: none;
    margin: 0;
    position: sticky;
    top: 7rem;
  }
}

.pp-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .pp-news-grid {
    /* auto-fill keeps card width stable when few results (avoids half-empty rows) */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
@media (min-width: 1280px) {
  .pp-news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
  }
}

/* Pager — compact control group instead of loose text */
.pp-news-pager {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.dark .pp-news-pager {
  border-color: #1f2937;
  background: #0f0f0f;
}
.pp-news-pager__btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}
.pp-news-pager__btn:hover:not(:disabled) {
  background: rgba(234, 179, 8, 0.12);
  color: #EAB308;
}
.pp-news-pager__btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.pp-news-pager__info {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 0 0.65rem;
  white-space: nowrap;
}

.pp-news-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
}
.dark .pp-news-card {
  border-color: #1f2937;
  background: #0f0f0f;
}
.pp-news-card:hover {
  border-color: rgba(234, 179, 8, 0.45);
}
.pp-news-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0a0a;
  flex-shrink: 0;
}
.pp-news-card__media img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center;
  display: block;
  transition: transform 0.45s ease;
}
.pp-news-card:hover .pp-news-card__media img {
  transform: scale(1.04);
}
.pp-news-card__body {
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.35rem;
}
.pp-news-card__cat {
  font-size: 0.625rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #EAB308;
  margin: 0;
}
.pp-news-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
  flex: 1;
}
.dark .pp-news-card__title {
  color: #fff;
}
.pp-news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
}
.pp-news-card__meta time {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
}
.pp-news-card__more {
  font-size: 0.625rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}
.pp-news-card:hover .pp-news-card__more {
  color: #EAB308;
}

/* --- Promo / ad creatives (iPad + desktop) --- */
.pp-promo-slot {
  display: block;
  width: 100%;
}
.pp-promo-card {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.pp-promo-card img {
  display: block;
  width: 100%;
  height: auto !important;
  max-width: 100%;
  object-fit: contain !important;
  object-position: center center;
}

/* Wide in-content banner — full width of news column, no side gutters */
.pp-promo-desktop {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: transparent;
}
.pp-promo-desktop img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center;
  border-radius: inherit;
}

/* Cell creatives — square polished frame, full art visible */
.pp-promo-cell {
  width: 100%;
  max-width: 17.5rem;
  aspect-ratio: 1 / 1;
  background: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-promo-cell img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center;
}

/* Tall sidebar blog banner */
.pp-promo-tall {
  width: 100%;
  max-width: 18rem;
}
.pp-promo-tall img {
  width: 100% !important;
  height: auto !important;
  max-height: min(78vh, 720px) !important;
  object-fit: contain !important;
  object-position: top center;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .pp-promo-cell { max-width: 16rem; }
  .pp-promo-tall { max-width: 16rem; }
}

#adListingTop .pp-promo-desktop,
#adListingMid .pp-promo-desktop,
#adTop .pp-promo-desktop,
#adBottom .pp-promo-desktop,
.pp-ad-inarticle .pp-promo-desktop {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
#adListingMid .pp-promo-cell {
  margin-left: auto;
  margin-right: auto;
}

.pp-promo-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.pp-promo-stack .pp-promo-card {
  width: 100%;
}

/* Footer / listing wide banner under grid */
.pp-promo-footer-banner {
  display: block;
  max-width: 56rem;
  margin: 3.5rem auto 0;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.dark .pp-promo-footer-banner {
  border-color: #1f2937;
}
.pp-promo-footer-banner img {
  width: 100%;
  height: auto !important;
  object-fit: contain !important;
  display: block;
}

/* --- Aprendizado feature mockups: equal square frames --- */
.pp-feature-grid {
  align-items: stretch;
}
.pp-feature-card {
  height: 100%;
  align-self: stretch;
}
.pp-feature-shot {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem !important;
  overflow: hidden;
}
.pp-feature-shot img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center;
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
}
.pp-feature-shot--wide {
  aspect-ratio: 1 / 1 !important;
  max-height: none;
}
.pp-feature-shot.pp-feature-shot--live,
.pp-feature-shot.pp-feature-shot--phone {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0;
  max-height: none !important;
  align-items: center;
  justify-content: center;
  padding: 0.7rem !important;
  overflow: hidden;
}

/* Media inside aspect boxes must beat global img{height:auto} */
.aspect-\[16\/10\] img,
.aspect-\[4\/3\] img,
[class*="aspect-"] > img.h-full {
  height: 100% !important;
  max-width: none;
  object-fit: cover;
}
.object-top {
  object-position: top center;
}
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
@media (min-width: 1024px) {
  .lg\:sticky { position: sticky; }
  .lg\:top-28 { top: 7rem; }
  .lg\:max-w-none { max-width: none; }
  .lg\:mt-0 { margin-top: 0; }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_340px\] {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .lg\:grid-cols-\[minmax\(0\,1fr\)_280px\] {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
