/* Blog: página de entradas y archivos (template-parts/blog/archive-posts.php) */

/* Hero */
.blog-hero {
  padding-bottom: 0;
}

.blog-hero__box {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 40rem;
  padding: 4.8rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-primary);
  color: var(--color-text-on-dark);
}

.blog-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-hero__box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.blog-hero__inner {
  width: 100%;
  min-width: 0;
}

.blog-hero__inner > * + * {
  margin-top: 1.6rem;
}

.blog-hero .breadcrumb,
.blog-hero__title,
.blog-hero__text {
  color: var(--color-text-on-dark);
}

.blog-hero__title {
  max-width: 90rem;
  font-size: clamp(3.4rem, 4.6vw, 5.2rem);
  line-height: 1.15;
}

.blog-hero__text {
  display: block;
  max-width: 72rem;
  font-size: 1.8rem;
  line-height: 1.6;
}

/* Listado */
.blog-archive__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
}

.blog-archive__empty {
  padding: 4.8rem 2.4rem;
  border: 0.1rem dashed var(--color-border-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}

/* Indicador de carga */
.blog-archive__loader {
  display: flex;
  justify-content: center;
  padding-block: 4.8rem 1.6rem;
}

.blog-archive__loader[hidden] {
  display: none;
}

.blog-archive__spinner {
  width: 4rem;
  height: 4rem;
  border: 0.4rem solid var(--color-border-soft);
  border-top-color: var(--color-secondary);
  border-radius: 50%;
  animation: blog-archive-spin 0.8s linear infinite;
}

@keyframes blog-archive-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-archive__spinner {
    animation-duration: 2.4s;
  }
}

.blog-archive__more {
  margin-top: 3.2rem;
  text-align: center;
}

@media (max-width: 1024px) {
  .blog-archive__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-hero__box {
    min-height: 32rem;
    padding: 3.2rem 2.4rem;
  }

  .blog-hero .breadcrumb__list {
    flex-wrap: nowrap;
  }

  .blog-hero .breadcrumb__item:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .blog-hero__title {
    font-size: 3.4rem;
  }

  .blog-hero__text {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .blog-archive__list {
    grid-template-columns: 1fr;
  }
}
