/* ================================
   Archivo del blog: /blog/, categorías y búsqueda (home.php).
   Depende de landing.css (tokens y componentes). Solo lo propio de esta vista.
   ================================ */

/* El contenedor de Astra es flex: sin esto, una búsqueda sin resultados encoge la página y se va a la izquierda. */
.bc-page.bc-blog {
  width: 100%;
}

/* Cabecera */
.bc-page .bc-blog-cabecera {
  padding: 64px 0 36px;
  background:
    radial-gradient(circle at 85% 0%, rgba(220, 165, 74, 0.12), transparent 50%),
    var(--bc-fondo);
}

.bc-page .bc-blog-migas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--bc-apagado);
  font-size: 13px;
  font-weight: var(--bc-peso-medio);
  letter-spacing: 0.04em;
}

.bc-page .bc-blog-migas a {
  color: var(--bc-oro);
  text-decoration: none;
}

.bc-page .bc-blog-migas a:hover {
  text-decoration: underline;
}

.bc-page .bc-blog-titulo {
  margin: 0 0 14px;
  color: var(--bc-titulo);
  font-family: var(--bc-letra-titulo);
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 400;
  line-height: 1.12;
}

.bc-page .bc-blog-sin-corte {
  white-space: nowrap;
}

.bc-page .bc-blog-intro {
  margin-bottom: 30px;
}

/* Categorías y buscador */
.bc-page .bc-blog-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.bc-page .bc-blog-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bc-page .bc-blog-pildora {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--bc-linea);
  border-radius: 999px;
  background: var(--bc-superficie);
  color: var(--bc-texto);
  font-size: 15px;
  font-weight: var(--bc-peso-medio);
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.bc-page .bc-blog-pildora:hover {
  border-color: rgba(220, 165, 74, 0.55);
  color: var(--bc-oro-suave);
}

.bc-page .bc-blog-pildora[aria-current="page"] {
  border-color: var(--bc-oro);
  background: var(--bc-oro);
  color: var(--bc-fondo);
}

.bc-page .bc-blog-pildora__n {
  color: var(--bc-sutil);
  font-size: 13px;
  font-weight: var(--bc-peso-fuerte);
}

.bc-page .bc-blog-pildora[aria-current="page"] .bc-blog-pildora__n {
  color: rgba(19, 18, 24, 0.65);
}

.bc-page .bc-blog-buscar {
  display: flex;
  align-items: center;
  width: min(100%, 320px);
  border: 1px solid var(--bc-linea);
  border-radius: 999px;
  background: var(--bc-campo);
  transition: border-color 0.18s ease;
}

.bc-page .bc-blog-buscar:focus-within {
  border-color: var(--bc-oro);
}

.bc-page .bc-blog-buscar__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Selector más fuerte: los estilos globales de campos del tema y de Elementor le ponían borde blanco. */
.bc-page.bc-blog .bc-blog-buscar input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 42px;
  min-height: 0;
  margin: 0;
  padding: 0 4px 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bc-texto);
  font: inherit;
  font-size: 15px;
  outline: none;
  box-shadow: none;
}

.bc-page.bc-blog .bc-blog-buscar input[type="search"]:focus {
  border: 0;
  outline: none;
  box-shadow: none;
}

.bc-page .bc-blog-buscar input[type="search"]::placeholder {
  color: var(--bc-sutil);
}

.bc-page .bc-blog-buscar button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bc-oro);
  cursor: pointer;
}

.bc-page .bc-blog-buscar button:hover {
  color: var(--bc-oro-suave);
}

/* Lista de artículos */
.bc-page .bc-blog-lista {
  padding: 28px 0 var(--bc-seccion);
}

.bc-page .bc-blog-grid {
  gap: 24px;
}

.bc-page .bc-blog-card {
  padding: 0;
  overflow: hidden;
}

.bc-page .bc-blog-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.bc-page .bc-blog-card img,
.bc-page .bc-blog-card__sin-foto {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bc-fondo-alt);
}

.bc-page .bc-blog-card__cuerpo {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.bc-page .bc-blog-card__cat {
  margin: 0 0 8px;
  color: var(--bc-oro);
  font-size: 12px;
  font-weight: var(--bc-peso-fuerte);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bc-page .bc-blog-card__titulo {
  margin: 0 0 10px;
  color: var(--bc-titulo);
  font-family: var(--bc-letra-texto);
  font-size: 19px;
  font-weight: var(--bc-peso-fuerte);
  line-height: 1.35;
}

.bc-page .bc-blog-card__resumen {
  flex: 1;
  margin: 0 0 16px;
  color: var(--bc-apagado);
  font-size: 15px;
  line-height: 1.55;
}

.bc-page .bc-blog-card__leer {
  color: var(--bc-oro-suave);
  font-size: 15px;
  font-weight: var(--bc-peso-medio);
  text-decoration: none;
}

.bc-page .bc-blog-card:hover .bc-blog-card__titulo {
  color: var(--bc-oro-suave);
}

/* Paginación */
.bc-page .bc-blog-paginas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
}

.bc-page .bc-blog-paginas .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--bc-linea);
  border-radius: var(--bc-radio-s);
  color: var(--bc-texto);
  font-size: 15px;
  font-weight: var(--bc-peso-medio);
  text-decoration: none;
}

.bc-page .bc-blog-paginas a.page-numbers:hover {
  border-color: rgba(220, 165, 74, 0.55);
  color: var(--bc-oro-suave);
}

.bc-page .bc-blog-paginas .page-numbers.current {
  border-color: var(--bc-oro);
  background: var(--bc-oro);
  color: var(--bc-fondo);
}

.bc-page .bc-blog-paginas .page-numbers.dots {
  border-color: transparent;
}

/* Sin resultados */
.bc-page .bc-blog-vacio {
  max-width: 640px;
  padding: 40px 0;
}

.bc-page .bc-blog-vacio p {
  color: var(--bc-apagado);
}

/* Remate hacia la Academia */
.bc-page .bc-blog-remate {
  padding: var(--bc-seccion) 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(220, 165, 74, 0.14), transparent 55%),
    var(--bc-fondo-alt);
  text-align: center;
}

.bc-page .bc-blog-remate p:not(.bc-kicker) {
  margin: 0 auto 26px;
  max-width: 560px;
  color: var(--bc-apagado);
}

@media (max-width: 900px) {
  .bc-page .bc-blog-cabecera {
    padding: 40px 0 28px;
  }

  .bc-page .bc-blog-filtros {
    flex-direction: column;
    align-items: stretch;
  }

  /* En el celular las categorías van en una fila que se desliza, sin ocupar media pantalla. */
  .bc-page .bc-blog-categorias {
    flex-wrap: nowrap;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bc-page .bc-blog-categorias::-webkit-scrollbar {
    display: none;
  }

  .bc-page .bc-blog-pildora {
    flex: 0 0 auto;
  }

  .bc-page .bc-blog-buscar {
    width: 100%;
  }
}
