/* =========================================================================
   STITCH "Estilo UDG" NOTICIAS BLOCK STYLES
   ========================================================================= */

:root {
  --udg-primary: #5F5078;
  --udg-accent: #785177;
  --udg-link-color: #265986;
  --udg-secondary: #505f7c;
  --surface-lowest: #ffffff;
  --text-on-primary: #ffffff;
  --text-secondary: rgba(80, 95, 124, 0.8);
}

/* CSS Grid Container */
.noticias-grid-container {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem; /* gap-8 */
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .noticias-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .noticias-grid-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card Styling */
.noticia-card {
  position: relative;
  background-color: transparent;
  border-radius: 0.75rem; /* rounded-xl */
  padding: 1px; /* The gap for the border glow */
  box-shadow: 0px 12px 32px rgba(25, 28, 30, 0.06);
  height: 100%;
  z-index: 1;
  overflow: hidden; /* Clips the spinning glow */
}

/* Inner mask that hides the center of the spinning gradient */
.noticia-card-inner {
  background-color: var(--surface-lowest);
  border-radius: calc(0.75rem - 1px);
  position: relative;
  height: 100%;
  z-index: 2;
  overflow: hidden;
}

.noticia-card-inner.glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.95);
}

/* Hover Border Gradient pseudo element (behind inner mask, inside card) */
.noticia-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%; /* Large enough to cover corners while rotating */
  height: 250%;
  transform: translate(-50%, -50%);
  z-index: 0;
  /* Concentrated glow line structure */
  background: conic-gradient(from 0deg, transparent 0%, transparent 35%, var(--udg-primary) 50%, transparent 65%, transparent 100%);
  opacity: 0.1; /* Subtle default presence */
  transition: opacity 0.5s ease;
  animation: border-spin 4s linear infinite;
  animation-play-state: paused;
}

@keyframes border-spin {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.noticia-card:hover::before {
  opacity: 1; /* Encender resplandor morado con hover */
  animation-play-state: running; 
}

.noticia-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
}

/* Image Wrapper */
.noticia-card-img-wrapper {
  aspect-ratio: 4 / 3;
  border-top-left-radius: calc(0.75rem - 1px);
  border-top-right-radius: calc(0.75rem - 1px);
}

.noticia-imagen-hover-scale {
  transition: transform 0.7s ease;
}

.noticia-card:hover .noticia-imagen-hover-scale {
  transform: scale(1.15); /* More prominent zoom just for the image */
}

/* Badge */
.noticia-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 9px;
  font-weight: 700;
  text-transform: none !important;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bg-primary { background-color: var(--udg-primary); }
.bg-accent { background-color: var(--udg-accent); }
.bg-link-color { background-color: var(--udg-link-color); }
.bg-green-700 { background-color: #15803d; }
.text-on-primary, .text-white { color: #ffffff; }

/* Content Typography */
.noticia-card-content {
  display: flex;
  flex-direction: column;
}

.noticia-fecha {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: none !important;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem; /* Reduced mb */
}

.noticia-titulo-card {
  font-size: 1rem; /* text-base (reduced from text-xl) */
  font-weight: 700;
  line-height: 1.3;
  color: var(--udg-primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-transform: none !important;
  transition: color 0.3s ease;
}
.noticia-titulo-card a, .noticia-titulo-card a:hover {
  color: inherit;
  text-decoration: none;
  text-transform: none !important;
}
.noticia-card:hover .noticia-titulo-card {
  color: var(--udg-accent);
}

.noticia-resumen-card {
  font-size: 0.75rem; /* text-xs (reduced from text-sm) */
  line-height: 1.5;
  color: var(--text-secondary);
  text-transform: none !important;
  margin-bottom: 1rem; /* Reduced mb */
}

.noticia-resumen-card p {
  margin: 0;
  text-transform: none !important;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-leer-mas-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--udg-link-color);
  font-weight: 700;
  font-size: 0.7rem; /* Reduced text-xs further slightly */
  text-transform: none !important;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  text-decoration: none;
}

.noticia-leer-mas-btn:hover {
  gap: 0.8rem;
  text-decoration: none;
  color: var(--udg-primary);
  text-transform: none !important;
}

.noticia-leer-mas-btn .glyphicon {
  font-size: 0.75rem;
}
