/* ================================
   FILTRO POR CATEGORÍA
   ================================ */
.blog-filter {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2.5rem;
}

.blog-filter-form {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: auto;
}

.blog-filter-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  white-space: nowrap;
}

.blog-filter-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.45rem 2.2rem 0.45rem 1rem;
  border-radius: 50px;
  border: 1.5px solid var(--color-border);
  background-color: var(--bg-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232a7f2a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.blog-filter-select:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(42, 127, 42, 0.1);
}

.blog-filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(42, 127, 42, 0.15);
}

/* ================================
   BLOG GRID
   ================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* ================================
   BLOG CARD
   ================================ */
.blog-card {
  background-color: var(--bg-white);
  border-radius: 8px; /* Original */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Original */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: relative;
  border: 1px solid var(--color-border);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.blog-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem;
  color: var(--color-text);
}

/* Imagen real */
.blog-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Placeholder cuando no hay imagen */
.blog-card__placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #66bb6a;
  font-size: 3rem;
}

/* Tipo */
.blog-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(42, 127, 42, 0.88);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}

.blog-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__body h3 {
  margin-bottom: 0.5rem;
  color: #2a7f2a;
  font-size: 1.1rem;
}

.blog-card__body p {
  margin-bottom: 1rem;
  color: #666;
  flex: 1;
}

.blog-card__btn {
  align-self: flex-start;
}

/* ================================
   DATA
   ================================ */
.post-date {
  opacity: 0.65;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

/* ================================
   EMPTY STATE
   ================================ */
.blog-empty {
  text-align: center;
  padding: 5rem 0;
  color: #aaa;
}

.blog-empty i {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #ccc;
}

/* ================================
   PAGINACIÓN
   ================================ */
.blog-pagination {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

.agrivall-pagination {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.agrivall-pag-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: white;
  border: 1.5px solid #2a7f2a;
  color: #2a7f2a;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.agrivall-pag-btn:hover:not(.disabled) {
  background: #2a7f2a;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(42, 127, 42, 0.2);
}

.agrivall-pag-btn.disabled {
  border-color: #eee;
  color: #ccc;
  cursor: not-allowed;
}

.agrivall-pag-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.agrivall-pag-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  color: #666;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.agrivall-pag-num:hover:not(.active) {
  background: #f0f9f0;
  color: #2a7f2a;
}

.agrivall-pag-num.active {
  background: #2a7f2a;
  color: white;
}

.agrivall-pag-dot {
  color: #ccc;
}

@media (max-width: 576px) {
  .agrivall-pag-numbers {
    display: none; /* Simplifica en móvil ocultando números */
  }
}

/* ================================
   POST DETAIL
   ================================ */
.post-detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #2a7f2a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.post-back:hover {
  text-decoration: underline;
}

.post-detail__type {
  margin-bottom: 0.5rem;
}

/* Imagen real del detalle */
.post-detail__img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 14px;
  margin: 1.5rem 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Placeholder del detalle */
.post-detail__placeholder {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #66bb6a;
  margin: 1.5rem 0;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #444;
  white-space: pre-line;
  margin-top: 1.5rem;
}

.post-detail__footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}