/* ---------------- Desktop ---------------- */
.news-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
  padding-top: 80px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
}

.card-item.tall { height: 60vh; }
.card-item.short { height: 40vh; }

.card-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: transform 0.3s ease;
}

.card-item:hover .card-overlay {
  transform: scale(1.03);
}

.tag-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.tag-card-category a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}


.content-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.content-card h3 a {
  color: #fff;
  text-decoration: none;
}

.card-date {
  display: block;
  font-size: 0.9rem;
  margin-top: 0.4rem;
  color: rgba(255,255,255,0.8);
}

.card-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-masonry .btn-dlc-news {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: var(--primary-color);;
  padding: 1.0rem 1.2rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.btn-dlc-news:hover {
  background: var(--primary-color);
  color: #fff
}

.read-more {
  color: #fff;
  text-decoration: underline;
  font-size: 0.9rem;
}

/* ---------------- Header ---------------- */
.news-masonry .news-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.news-masonry .news-header-text {
  flex: 0 0 70%;
  max-width: 70%;
}

.news-masonry .news-header-text p {
  margin: 0;
  color: #555;
  line-height: 1.4;
}

.news-masonry .news-header-button {
  flex: 0 0 30%;
  max-width: 30%;
  text-align: right;
}

.news-masonry .btn-dlc-primary {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: 25px;
  background: var(--primary-color);; 
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.mobile-header-button {
  display: none;
}

@media (max-width: 992px) {
  .news-masonry {
    display: grid; /* Mantener grid desktop */
    grid-template-columns: 1fr; /* 1 columna */
    gap: 20px;
    margin: 2rem 0;
  }

  .news-masonry .news-header-text {
    flex: 0px;
    max-width: 100%;
  }

  .column {
    display: contents; /* ignora flex columns */
  }

  /* Forzar altura igual para todas las cards */
  .card-item {
    height: 40vh !important; /* o el valor que quieras para todas las cards */
    border-radius: 16px;
    overflow: hidden;
    background: none; /* mantener la imagen de fondo */
    color: #fff;
    position: relative; /* para overlay absoluto */
  }

  .card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
  }

  /* Mantener overlay igual que desktop */
  .card-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: absolute;
    inset: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
  }

  .card-item:hover .card-overlay {
    transform: scale(1.03);
  }

  .tag-card-category,
  .content-card,
  .card-footer {
    position: absolute;
    z-index: 2;
    color: #fff;
  }

  .tag-card-category { top: 1rem; left: 1rem; }
  .content-card { top: calc(3rem + 30px); left: 1rem; }
  .card-footer { bottom: 2rem; left: 1rem; display: flex; gap: 10px; }

  /* Ocultar contenido móvil alternativo */
  .mobile-content { display: none; }

  /* Botón header oculto en móvil */
  .news-header-button { display: none; }

  /* Botón al final de las cards */
  .mobile-header-button {
    display: block;
    margin-top: 1rem;
    text-align: left;
  }
  .news-masonry {
    padding-top: 64px;
  }
}






.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
    display: block; /* cambiar de flex a block */
    padding: 1rem 2rem;
}

/* Tag arriba */
.tag-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

/* Título y fecha 30px debajo del tag */
.content-card {
    position: absolute;
    top: calc(3rem + 30px); /* tag + 30px */
    left: 1rem;
    color: white;
    z-index: 2;
}

/* Footer siempre abajo */
.card-footer {
    position: absolute;
    bottom: 2rem;
    left: 1rem;
    display: flex;
    gap: 10px;
    z-index: 2;
}
