/* ==========================================================================
   CCPCH — Componentes compartidos (formularios, widgets, paginación)
   ========================================================================== */

.search-form { display: flex; gap: 10px; margin-bottom: 40px; max-width: 620px; }
.search-form input[type='search'] {
  flex: 1;
  padding: 13px 16px;
  font-family: inherit; font-size: .93rem;
  background: var(--gris);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-sm);
}
.search-form input[type='search']:focus { outline: none; background: #fff; border-color: var(--rojo); }

.pagination { margin-top: 56px; }
.pagination ul { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600;
  color: var(--texto);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.pagination a:hover { border-color: var(--rojo); color: var(--rojo); }
.pagination .current { background: var(--rojo); border-color: var(--rojo); color: #fff; }

.widget { margin-bottom: 34px; }
.widget-title {
  font-size: 1.02rem; margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--rojo);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--gris-borde); font-size: .88rem; }
.widget li:last-child { border-bottom: none; }

.widget-posts a { display: flex; gap: 12px; align-items: center; color: inherit; }
.widget-posts img { width: 62px; height: 62px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.widget-posts strong { display: block; font-family: var(--font-serif); font-size: .9rem; line-height: 1.35; color: var(--navy); }
.widget-posts a:hover strong { color: var(--rojo); }
.widget-posts time { font-size: .74rem; color: var(--texto-suave); }

.content-none { text-align: center; padding: 60px 0; }
.content-none .search-form { margin-inline: auto; }

.error-404 { padding: calc(var(--nav-height) + 90px) 0 110px; text-align: center; }
.error-code {
  display: block;
  font-family: var(--font-serif); font-size: clamp(5rem, 16vw, 10rem);
  font-weight: 700; line-height: 1;
  color: rgba(184, 35, 47, .12);
  margin-bottom: -.2em;
}
.error-404 .search-form { margin-inline: auto; }
.error-404 .btn-row { justify-content: center; }
