/* Isolated blog archive module. */

body {
  background: #f4f4f4;
}

.nexo-blog {
  --nexo-blog-accent: #ec641c;
  --nexo-blog-accent-dark: #c94e0d;
  --nexo-blog-ink: #202020;
  --nexo-blog-muted: #686868;
  --nexo-blog-line: #dedede;
  --nexo-blog-surface: #ffffff;
  background: #f4f4f4;
  color: var(--nexo-blog-ink);
  padding: clamp(8rem, 10vw, 10rem) 1.25rem clamp(2.5rem, 6vw, 5.5rem);
}

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

.nexo-blog__container {
  margin: 0 auto;
  max-width: 73.75rem;
  width: 100%;
}

.nexo-blog__title {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.nexo-blog a {
  color: inherit;
  text-decoration: none;
}

.nexo-blog img {
  display: block;
  max-width: 100%;
}

.nexo-blog-featured {
  background: var(--nexo-blog-surface);
  border: 1px solid var(--nexo-blog-line);
  border-radius: 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  min-height: 28rem;
  overflow: hidden;
}

.nexo-blog-featured__media,
.nexo-blog-card__media {
  background: #d9d9d9;
  display: block;
  overflow: hidden;
  position: relative;
}

.nexo-blog-featured__media img,
.nexo-blog-card__media img {
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
  width: 100%;
}

.nexo-blog-featured:hover .nexo-blog-featured__media img,
.nexo-blog-card:hover .nexo-blog-card__media img {
  transform: scale(1.025);
}

.nexo-blog-featured__media--placeholder,
.nexo-blog-card__media--placeholder {
  align-items: center;
  background: linear-gradient(
    135deg,
    #292929 0%,
    #454545 70%,
    var(--nexo-blog-accent) 150%
  );
  display: flex;
  justify-content: center;
}

.nexo-blog__placeholder-text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nexo-blog-featured__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.75rem);
}

.nexo-blog-featured__category,
.nexo-blog-card__category,
.nexo-blog-popular-card__category {
  color: var(--nexo-blog-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nexo-blog-featured__eyebrow {
  color: var(--nexo-blog-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0.9rem 0 0;
  text-transform: uppercase;
}

.nexo-blog-featured__title {
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0.6rem 0 1rem;
}

.nexo-blog-featured__title a:hover,
.nexo-blog-card__title a:hover,
.nexo-blog-popular-card__title a:hover {
  color: var(--nexo-blog-accent);
}

.nexo-blog-featured__excerpt,
.nexo-blog-card__excerpt {
  color: var(--nexo-blog-muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

.nexo-blog-featured__button,
.nexo-blog-card__button {
  align-items: center;
  align-self: flex-start;
  background: var(--nexo-blog-accent);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.4rem;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.nexo-blog-featured__button:hover,
.nexo-blog-card__button:hover,
.nexo-blog-featured__button:focus-visible,
.nexo-blog-card__button:focus-visible {
  background: var(--nexo-blog-accent-dark);
  transform: translateY(-1px);
}

.nexo-blog-filters {
  align-items: flex-end;
  border-bottom: 1px solid var(--nexo-blog-line);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin: 2.5rem 0;
  padding-bottom: 1.25rem;
}

.nexo-blog-categories {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nexo-blog-categories__link {
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  white-space: nowrap;
}

.nexo-blog-categories__link:hover,
.nexo-blog-categories__link.is-active {
  background: var(--nexo-blog-ink);
  color: #fff;
}

.nexo-blog-search {
  flex: 0 0 19rem;
}

.nexo-blog-search__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.nexo-blog-search__control {
  display: flex;
}

.nexo-blog-search__input {
  background: var(--nexo-blog-surface);
  border: 1px solid var(--nexo-blog-line);
  border-radius: 0.6rem 0 0 0.6rem;
  color: var(--nexo-blog-ink);
  font: inherit;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  width: 100%;
}

.nexo-blog-search__button {
  background: var(--nexo-blog-ink);
  border: 0;
  border-radius: 0 0.6rem 0.6rem 0;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
}

.nexo-blog__body {
  align-items: start;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 17.5rem minmax(0, 1fr);
}

.nexo-blog-sidebar {
  display: grid;
  gap: 1.5rem;
  position: sticky;
  top: 1.5rem;
}

.nexo-blog-popular,
.nexo-blog-catalog-cta {
  background: var(--nexo-blog-surface);
  border: 1px solid var(--nexo-blog-line);
  border-radius: 1rem;
}

.nexo-blog-popular {
  padding: 1.5rem;
}

.nexo-blog-sidebar__title {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

.nexo-blog-popular-card {
  border-top: 1px solid var(--nexo-blog-line);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 2rem minmax(0, 1fr);
  padding: 1rem 0;
}

.nexo-blog-popular-card__index {
  color: #bcbcbc;
  font-size: 1.2rem;
  font-weight: 700;
}

.nexo-blog-popular-card__title {
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0.3rem 0 0;
}

/* Ajuste visual do bloco Mais lidos na página Blog */
.nexo-blog .nexo-blog-sidebar__title {
  font-weight: 700;
}

.nexo-blog .nexo-blog-popular-card__title {
  font-weight: 500;
}

.nexo-blog .nexo-blog-popular-card__title a {
  font-weight: inherit;
}

.nexo-blog-catalog-cta {
  align-items: flex-end;
  background: var(--nexo-blog-ink);
  color: #fff !important;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr auto;
  min-height: 15rem;
  overflow: hidden;
  padding: 1.5rem;
  position: relative;
}

.nexo-blog-catalog-cta__image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

.nexo-blog-catalog-cta::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.72) 55%,
    rgba(0, 0, 0, 0.88) 100%
  );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.nexo-blog-catalog-cta__label,
.nexo-blog-catalog-cta__arrow {
  font-size: 1.15rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.nexo-blog-catalog-cta__arrow {
  color: var(--nexo-blog-accent);
  font-size: 1.6rem;
}

.nexo-blog__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nexo-blog-card {
  background: var(--nexo-blog-surface);
  border: 1px solid var(--nexo-blog-line);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nexo-blog-card__media {
  aspect-ratio: 16 / 9;
}

.nexo-blog-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.nexo-blog-card__title {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
  margin: 0.65rem 0 0.8rem;
}

.nexo-blog-card__excerpt {
  font-size: 0.92rem;
}

.nexo-blog-card__button {
  margin-top: auto;
}

.nexo-blog__empty {
  background: var(--nexo-blog-surface);
  border: 1px solid var(--nexo-blog-line);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
}

.nexo-blog__empty h2,
.nexo-blog__empty p {
  margin: 0;
}

.nexo-blog__empty p {
  color: var(--nexo-blog-muted);
  margin-top: 0.5rem;
}

.nexo-blog-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.nexo-blog-pagination .page-numbers {
  align-items: center;
  background: var(--nexo-blog-surface);
  border: 1px solid var(--nexo-blog-line);
  border-radius: 0.55rem;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  justify-content: center;
  min-height: 2.6rem;
  min-width: 2.6rem;
  padding: 0.55rem 0.8rem;
}

.nexo-blog-pagination .page-numbers.current,
.nexo-blog-pagination a.page-numbers:hover {
  background: var(--nexo-blog-accent);
  border-color: var(--nexo-blog-accent);
  color: #fff;
}

.nexo-blog :focus-visible {
  outline: 3px solid rgba(236, 100, 28, 0.45);
  outline-offset: 3px;
}

/* ==========================================================================
   Blog: arredondamento dos botões
   ========================================================================== */

.nexo-blog-featured__button,
.nexo-blog-card__button,
.nexo-blog-categories__link,
.nexo-blog-pagination .page-numbers {
  border-radius: 8px;
}

.nexo-blog-search__input {
  border-radius: 8px 0 0 8px;
}

.nexo-blog-search__button {
  border-radius: 0 8px 8px 0;
}

@media (max-width: 64rem) {
  .nexo-blog-featured {
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 24rem;
  }

  .nexo-blog-filters {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .nexo-blog-search {
    flex-basis: auto;
    max-width: 28rem;
  }

  .nexo-blog__body {
    grid-template-columns: 1fr;
  }

  .nexo-blog-sidebar {
    grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 0.6fr);
    position: static;
  }
}

@media (max-width: 47.9375rem) {
  .nexo-blog {
    padding: clamp(7rem, 28vw, 9rem) 1rem 3rem;
  }

  .nexo-blog-featured {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .nexo-blog-featured__media {
    aspect-ratio: 16 / 10;
  }

  .nexo-blog-featured__content {
    padding: 1.5rem;
  }

  .nexo-blog-featured__title {
    font-size: 1.85rem;
  }

  .nexo-blog-filters {
    margin: 1.5rem 0;
  }

  .nexo-blog-categories {
    margin-right: -1rem;
    padding-right: 1rem;
  }

  .nexo-blog-search {
    max-width: none;
    width: 100%;
  }

  .nexo-blog__body,
  .nexo-blog-sidebar {
    gap: 1.25rem;
    grid-template-columns: 1fr;
  }

  .nexo-blog__grid {
    grid-template-columns: 1fr;
  }

  .nexo-blog-catalog-cta {
    min-height: 12rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nexo-blog *,
  .nexo-blog *::before,
  .nexo-blog *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
