/* =============================================
   Blog Styles — Conpre Concretos
   ============================================= */

/* --- Blog Card Grid --- */
.blog-article .row > [class*="col-"] {
  margin-bottom: 30px;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0,0,0,.08);
  transition: transform .3s ease, box-shadow .3s ease;
  margin-bottom: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.blog-card__img {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.blog-card:hover .blog-card__img img {
  transform: scale(1.05);
}

.blog-card__img--gradient {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
}

/* Gradient fallback per category — Paleta institucional Conpre */
.blog-card__img--educativo {
  background: linear-gradient(135deg, #0B6B21 0%, #084f19 100%);
}
.blog-card__img--guias {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
}
.blog-card__img--consejos {
  background: linear-gradient(135deg, #ECC101 0%, #c9a401 100%);
}
.blog-card__img--tecnico {
  background: linear-gradient(135deg, #084f19 0%, #063d14 100%);
}
.blog-card__img--comparacion {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
}
.blog-card__img--local {
  background: linear-gradient(135deg, #0B6B21 0%, #084f19 100%);
}
.blog-card__img--marca {
  background: linear-gradient(135deg, #ECC101 0%, #c9a401 100%);
}
.blog-card__img--proceso {
  background: linear-gradient(135deg, #084f19 0%, #063d14 100%);
}

.blog-card__body {
  padding: 20px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
  margin-bottom: 12px;
  width: fit-content;
}

/* Category badge colors — Paleta institucional Conpre */
.badge--educativo  { background: #0B6B21; }
.badge--guias      { background: #1a1a2e; }
.badge--consejos   { background: #ECC101; color: #1a1a2e; }
.badge--tecnico    { background: #084f19; }
.badge--comparacion{ background: #1a1a2e; }
.badge--local      { background: #0B6B21; }
.badge--marca      { background: #ECC101; color: #1a1a2e; }
.badge--proceso    { background: #084f19; }

.blog-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #1a1a2e;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #0B6B21;
}

.blog-card__excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.blog-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
  margin-top: auto;
}

.blog-card__date {
  font-size: 13px;
  color: #888;
}

.blog-card__date i {
  margin-right: 5px;
}

.blog-card__link {
  font-size: 14px;
  font-weight: 600;
  color: #0B6B21;
  text-decoration: none;
}

.blog-card__link:hover {
  color: #BAF235;
}

.blog-card__link i {
  margin-left: 5px;
  transition: margin-left .2s;
}

.blog-card__link:hover i {
  margin-left: 10px;
}

/* --- Blog Article Page --- */
.blog-article {
  padding: 60px 0;
}

.blog-article__content {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 15px rgba(0,0,0,.06);
}

.blog-article__content h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 15px;
  line-height: 1.3;
}

.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.blog-article__meta span {
  font-size: 14px;
  color: #666;
}

.blog-article__meta i {
  margin-right: 5px;
  color: #0B6B21;
}

.blog-article__content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 35px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #0B6B21;
}

.blog-article__content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-top: 25px;
  margin-bottom: 12px;
}

.blog-article__content p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 18px;
}

.blog-article__content ul,
.blog-article__content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.blog-article__content li {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 8px;
}

.blog-article__content strong {
  color: #1a1a2e;
}

.blog-article__content blockquote {
  border-left: 4px solid #0B6B21;
  padding: 15px 20px;
  margin: 25px 0;
  background: #e8f5ee;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.blog-article__content blockquote p {
  margin-bottom: 0;
}

/* Data highlight box */
.blog-dato-clave {
  background: linear-gradient(135deg, #f0faf4 0%, #e8f5ee 100%);
  border-left: 4px solid #0B6B21;
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin: 25px 0;
}

.blog-dato-clave strong {
  color: #0B6B21;
}

/* Article CTA */
.blog-cta {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  margin-top: 40px;
}

.blog-cta h3 {
  color: #fff !important;
  margin-top: 0 !important;
  margin-bottom: 10px;
  font-size: 22px;
}

.blog-cta p {
  color: #ccc !important;
  margin-bottom: 20px;
}

/* --- Sidebar --- */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0,0,0,.06);
  margin-bottom: 25px;
}

.sidebar-widget__title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0B6B21;
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg, #0B6B21 0%, #084f19 100%);
  color: #fff;
  text-align: center;
}

.sidebar-cta .sidebar-widget__title {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.3);
}

.sidebar-cta p {
  color: rgba(255,255,255,.9);
  font-size: 14px;
  margin-bottom: 15px;
}

.sidebar-cta .vs-btn {
  background: #1a1a2e;
  color: #fff;
  width: 100%;
}

/* Related articles */
.sidebar-related__item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-related__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-related__num {
  min-width: 30px;
  height: 30px;
  background: #0B6B21;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-related__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.sidebar-related__title a {
  color: #333;
  text-decoration: none;
}

.sidebar-related__title a:hover {
  color: #0B6B21;
}

/* Categories list */
.sidebar-categories li {
  list-style: none;
}

.sidebar-categories li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

.sidebar-categories li:last-child a {
  border-bottom: none;
}

.sidebar-categories li a:hover {
  color: #0B6B21;
}

.sidebar-categories li a span {
  background: #f0f0f0;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .blog-article__content {
    padding: 25px;
  }
  .blog-sidebar {
    position: static;
    margin-top: 30px;
  }
}

@media (max-width: 575px) {
  .blog-article__content {
    padding: 20px 15px;
  }
  .blog-article__content h1 {
    font-size: 22px;
  }
  .blog-article__content h2 {
    font-size: 19px;
  }
  .blog-card__img {
    height: 160px;
  }
}
