/* ==========================================================================
   1. VIEWS SLIDER CONTAINER & FLEX MECHANICS
   ========================================================================== */
.news-slider-custom {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.news-slider-custom .slider-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch; /* Forces all cards in a row to match equal height */
  will-change: transform;
}

/* Base Card Design */
.news-slider-custom .views-row {
  flex: 0 0 calc(100% - 20px); /* Mobile default: 1 card wide */
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 20px;
  margin: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  
  /* Flexbox column layout relies strictly on DOM order */
  display: flex;
  flex-direction: column; 
  box-sizing: border-box;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-slider-custom .views-row:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .news-slider-custom .views-row {
    flex: 0 0 calc(33.333% - 20px); /* Desktop: 3 cards wide */
  }
}

/* ==========================================================================
   2. TITLE (FS-5 EQUIVALENT) WITH BLACK-TO-GOLD GLOW
   ========================================================================== */
.news-slider-custom .views-field-title {
  margin-bottom: 15px;
}

/* High specificity to override native theme link colors */
.news-slider-custom .views-field-title a,
.news-slider-custom .views-field-title span {
  font-size: 1.25rem !important; /* Bootstrap fs-5 equivalent */
  font-weight: 700 !important;
  line-height: 1.3;
  
  /* Black to Gold Gradient */
  background: linear-gradient(135deg, #000000 0%, #D4AF37 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.3s ease;
}

.news-slider-custom .views-field-title a:hover {
  /* Glowing golden text effect on hover */
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.6); 
  opacity: 0.9;
}

/* ==========================================================================
   3. IMAGE UNIFORMITY
   ========================================================================== */
.news-slider-custom .views-field-field-news-media img,
.news-slider-custom .views-row img {
  width: 100% !important;
  aspect-ratio: 16 / 9; /* Locks all images to a perfect widescreen rectangle */
  object-fit: cover; /* Prevents stretching */
  border-radius: 6px;
  display: block;
  margin-bottom: 15px;
}

/* ==========================================================================
   4. KEY INSIGHTS TEXT CLAMP & SPACING
   ========================================================================== */
.news-slider-custom .views-field-field-news-paragraph-add-on {
  flex-grow: 1; /* Automatically pushes the Read More button to the very bottom */
  flex-shrink: 0; /* Prevents cards with long titles from squishing the text */
  min-height: 80px; /* Guarantees the box never collapses entirely */
  max-height: 160px; /* Limits text height to keep cards equal */
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: #444;
}

/* Smooth fade-out effect for cut-off text */
.news-slider-custom .views-field-field-news-paragraph-add-on::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  pointer-events: none;
}

/* Kill invisible empty tags from the text editor that push real text down */
.news-slider-custom .extracted-card-text p:empty,
.news-slider-custom .extracted-card-text p:first-child:empty {
  display: none !important;
}

/* Tame unformatted bullet points coming from paragraph text */
.news-slider-custom .extracted-card-text ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.news-slider-custom .extracted-card-text p {
  margin-bottom: 5px;
  line-height: 1.5;
}

/* ==========================================================================
   5. READ MORE BUTTON (BLACK-TO-GOLD GLOW)
   ========================================================================== */
.news-slider-custom .views-field-view-node {
  margin-top: auto; /* Ensures it sticks to the bottom regardless of text length */
}

.news-slider-custom .views-field-view-node a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  
  /* Black to Gold Background */
  background: linear-gradient(135deg, #000000 0%, #D4AF37 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important; /* Forces white text inside the gradient box */
  
  text-decoration: none !important;
  border-radius: 6px;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Default soft dark shadow */
  transition: all 0.3s ease;
}

.news-slider-custom .views-field-view-node a:hover {
  /* Emits a golden glow when hovered */
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.8); 
  transform: translateY(-2px); /* Slight lift effect */
  color: #ffffff !important;
}