/* ─── BLOG PAGE HEADER ─────────────────────────────────────────── */
.blog-header {
  background: linear-gradient(135deg, #0d1a2e 0%, #1565c0 100%);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
}

.blog-title {
  font-family: 'Raleway', sans-serif;
  font-size: 42px;
  font-weight: 800;
  margin: 20px 0;
  letter-spacing: -0.5px;
  color: white;
}

.blog-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

@media (max-width: 768px) {
  .blog-header {
    padding: 60px 0 40px;
  }
  .blog-title {
    font-size: 28px;
  }
  .blog-subtitle {
    font-size: 16px;
  }
}

/* ─── BLOG SECTION ─────────────────────────────────────────────── */
.blog-section {
  padding: 80px 0;
  background: white;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── BLOG CARD ────────────────────────────────────────────────── */
.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.blog-card__image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f3f4f6;
  position: relative;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

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

.blog-card__meta {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 10;
}

.blog-date {
  font-size: 12px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin: 0;
}

.blog-card__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  padding: 20px 20px 0;
  line-height: 1.3;
}

.blog-card__title a {
  color: #0d1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card__title a:hover {
  color: #1565c0;
}

.blog-card__excerpt {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  padding: 12px 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__link {
  display: inline-block;
  padding: 10px 16px;
  margin: auto 20px 20px;
  color: white;
  background: #84cc16;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
  border-radius: 6px;
}

.blog-card__link:hover {
  background: #65a30d;
}

.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  font-size: 16px;
}

/* ─── BLOG FICHA HEADER ────────────────────────────────────────── */
.blog-ficha-header {
  background: linear-gradient(135deg, #0d1a2e 0%, #1565c0 100%);
  color: white;
  padding: 80px 0 60px;
}

.blog-back {
  display: inline-block;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.blog-back:hover {
  color: white;
}

.blog-ficha-title {
  font-family: 'Raleway', sans-serif;
  font-size: 42px;
  font-weight: 800;
  margin: 0 0 24px;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.blog-ficha-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

/* ─── BLOG ARTICLE GALLERY ────────────────────────────────────── */
.blog-ficha-gallery {
  padding: 0;
  background: transparent;
  margin: 40px 0;
}

.blog-ficha-gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.blog-ficha-gallery__item {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-ficha-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.blog-ficha-gallery__item:hover img {
  transform: scale(1.05);
}

/* ─── BLOG ARTICLE CONTENT ─────────────────────────────────────── */
.blog-ficha-content {
  padding: 60px 0;
}

.blog-article {
  max-width: 800px;
  margin: 0 auto;
}

.blog-article__text {
  font-size: 16px;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 40px;
}

.blog-article__text p {
  margin-bottom: 20px;
}

.blog-article__text h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 40px 0 20px;
  color: #0d1a2e;
  border-bottom: 3px solid #1565c0;
  padding-bottom: 10px;
}

.blog-article__text h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 14px;
  color: #0d1a2e;
}

.blog-article__text ul,
.blog-article__text ol {
  margin: 20px 0;
  padding-left: 30px;
}

.blog-article__text li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.blog-article__text .table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blog-article__text .table th {
  background: linear-gradient(135deg, #0d1a2e 0%, #1565c0 100%);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
}

.blog-article__text .table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.blog-article__text .table tr:last-child td {
  border-bottom: none;
}

.blog-article__text .table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.blog-article__text .table tbody tr:hover {
  background: #f3f4f6;
}

.blog-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid #e5e7eb;
}

.blog-tag {
  display: inline-block;
  background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
  color: #1565c0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
  border: 1px solid rgba(21, 101, 192, 0.2);
  transition: all 0.2s;
}

.blog-tag:hover {
  background: linear-gradient(135deg, #c7d2fe 0%, #bfdbfe 100%);
  border-color: #1565c0;
}

/* ─── BLOG SECTION IN HOME ─────────────────────────────────────── */
.blog-home {
  padding: 80px 0;
  background: white;
}

.blog-home__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 40px;
}

.blog-home__grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 28px !important;
}

@media (max-width: 900px) {
  .blog-home__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Móvil: una tarjeta por línea (la regla base usa !important, por eso aquí también) */
@media (max-width: 768px) {
  .blog-home__grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .blog-home__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-home__grid {
    grid-template-columns: 1fr;
  }
}

.blog-card-home {
  display: flex !important;
  flex-direction: column !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: white !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  height: 100% !important;
}

.blog-card-home:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.blog-card-home__img {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f3f4f6;
}

.blog-card-home__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-home__date {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.blog-card-home__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
  color: #0d1a2e;
}

.blog-card-home__title a {
  color: #0d1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-home__title a:hover {
  color: #1565c0;
}

.blog-card-home__excerpt {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

