:root {
  --news-card-bg: rgba(255, 255, 255, 0.05);
  --news-card-border: rgba(255, 255, 255, 0.12);
  --news-card-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  --news-tag-info: #5bc0f8;
  --news-tag-event: #ffc107;
  --news-tag-promo: #ff6b6b;
  --news-tag-alert: #f94144;
}

.news-section {
  width: 100%;
  padding: 2rem 0 4rem;
  text-align: center;
  color: #fff;
}

.news-section .news-title {
  font-family: 'Graphik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 50px;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.news-grid-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.news-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--news-card-bg);
  border-radius: 18px;
  border: 1px solid var(--news-card-border);
  box-shadow: var(--news-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
}

.news-card .card-image-wrapper {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.news-card .card-image-wrapper::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(7, 14, 35, 0.85));
}

.news-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .card-image {
  transform: scale(1.05);
}

.news-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: left;
}

.news-card .card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  border: 1px solid transparent;
  color: #ffffff;
}

.card-tag.info {
  color: #ffffff;
  border-color: rgba(91, 192, 248, 0.5);
  background: rgba(91, 192, 248, 0.25);
}

.card-tag.evento {
  color: #ffffff;
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(255, 193, 7, 0.25);
}

.card-tag.promo {
  color: #ffffff;
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.25);
}

.card-tag.alerta {
  color: #ffffff;
  border-color: rgba(249, 65, 68, 0.55);
  background: rgba(249, 65, 68, 0.25);
}

.news-card .card-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.news-card .card-description {
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 1.25rem;
  line-height: 1.5;
  font-size: 0.95rem;
  flex-grow: 1;
}

.news-card .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(90deg, #ffe066 0%, #ffd43b 100%);
  color: #0f1f47;
  box-shadow: 0 8px 18px rgba(255, 208, 77, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card .card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 208, 77, 0.45);
}

.news-card .card-cta span {
  transition: transform 0.2s ease;
}

.news-card .card-cta:hover span {
  transform: translateX(3px);
}

/* Mobile swipeable layout */
@media (max-width: 768px) {
  .news-grid-wrapper {
    max-width: 100%;
    padding: 0 1rem;
  }

  .news-cards-container {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 0 0.5rem 1.5rem;
    scrollbar-width: none;
  }

  .news-cards-container::-webkit-scrollbar {
    display: none;
  }

  .news-card {
    flex: 0 0 85%;
    min-width: 260px;
    max-width: 320px;
    scroll-snap-align: center;
  }
}

@media (max-width: 640px) {
  .news-section {
    padding: 1.5rem 0 3rem;
  }

  .news-section .news-title {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  .news-card .card-content {
    padding: 1rem 1.25rem 1.25rem;
  }
}
