/* frontend/assets/css/pages/blog.css */ 

/* =======================================
   BLOG CARDS
   ======================================= */
     
.container {
  margin-top: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 'Last News' Text */
.blog-title {
  margin-bottom: 1.5rem;
}

/* Image Container */
.blog-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
}

.blog-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating Tag ("Novedades", "Ahorro", etc.) */
.blog-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #ffb300;
  color: #333;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Text of the Post Card */
.blog-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Date of the Post */
.blog-date {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}

/* Title of the Post */
.blog-info h4 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

/* Little Description */ 
.blog-info p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
  
  /* limit to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Click to read the post */
.read-more {
  margin-top: auto;
  color: #00796b;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.blog-card:hover .read-more {
  color: #ffb300;
}

/* =======================================
   DESTACADOS Y PAGINACIÓN
   ======================================= */

/* Color especial para la etiqueta de destacado */
.featured-badge {
    background: #e53935; /* Un rojo llamativo, puedes ajustarlo */
    color: white;
}

/* Controles de paginación */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.btn-page {
    background-color: var(--secondary-color, #00796b);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-page:hover:not(:disabled) {
    background-color: var(--primary-color, #004d40);
}

.btn-page:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.page-info {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}