/* ==============================================
   📰 JOURNALISTIC STYLE READ MORE LINK
   ============================================== */

.read-more-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d62828; /* SDN Buzz red accent */
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 2px solid transparent;
}

.read-more-link .arrow {
  transition: transform 0.3s ease, color 0.3s ease;
  font-size: 1rem;
  line-height: 1;
}

/* Underline and arrow movement on hover */
.read-more-link:hover {
  color: #b81f1f;
  border-bottom: 2px solid #b81f1f;
}

.read-more-link:hover .arrow {
  transform: translateX(4px);
  color: #b81f1f;
}

/* Optional subtle fade animation when hovering */
.news-card:hover .read-more-link {
  color: #b81f1f;
}

/* Smaller tweak for mobile */
@media (max-width: 768px) {
  .read-more-link {
    font-size: 0.85rem;
  }
}

/* =======================================================
   📰 LATEST NEWS RIBBON HEADER
   ======================================================= */
.section-header {
  position: relative;
  width: 100%;
}

.ribbon {
  position: relative;
  background: linear-gradient(90deg, #d62828 0%, #b81f1f 100%);
  color: #fff;
  display: inline-block;
  padding: 10px 24px;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(214, 40, 40, 0.25);
  overflow: hidden;
  z-index: 1;
}

/* Ribbon edge cut */
.ribbon::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-right: 15px solid #b81f1f;
}

/* Text and icon */
.ribbon-title {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Merriweather', serif;
}

/* Optional: add a subtle "news texture" background */
.ribbon {
  background-image: 
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 6px 6px;
  background-color: #d62828;
}

/* Hover glow (optional) */
.ribbon:hover {
  box-shadow: 0 6px 16px rgba(214, 40, 40, 0.35);
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ribbon {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  .ribbon::before {
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-right: 12px solid #b81f1f;
  }
}


.ribbon-title i {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}


/* 📰 "Other News" Ribbon (Different Color Tone) */
.ribbon.other-news {
  background: linear-gradient(90deg, #555 0%, #333 100%);
  color: #fff;
}

.ribbon.other-news::before {
  border-right-color: #333;
}

.ribbon.other-news .ribbon-title i {
  color: #ffc107; /* golden newspaper feel */
}


/* ==========================================================
   📰 SDN BUZZ — RESPONSIVE NEWS GRID & DESIGN
   ========================================================== */

/* 🗞 General Card Structure */
.news-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
}

.news-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 🖼 News Image */
.news-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-img {
  transform: scale(1.04);
}

/* 📰 Content */
.news-content {
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  line-height: 1.45;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.news-card:hover .news-title {
  color: #d62828;
}

.text-muted small {
  color: #777;
  font-size: 0.9rem;
}

/* 🗞 Read More (Editorial Style) */
.read-more-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d62828;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 2px solid transparent;
}

.read-more-link .arrow {
  transition: transform 0.3s ease;
  font-size: 1rem;
}

.read-more-link:hover {
  color: #b81f1f;
  border-bottom: 2px solid #b81f1f;
}

.read-more-link:hover .arrow {
  transform: translateX(4px);
}

/* ==========================================================
   🎨 RIBBON HEADER
   ========================================================== */
.section-header {
  position: relative;
  width: 100%;
}

.ribbon {
  position: relative;
  background: linear-gradient(90deg, #d62828 0%, #b81f1f 100%);
  color: #fff;
  display: inline-block;
  padding: 10px 24px;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(214, 40, 40, 0.25);
}

.ribbon::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-right: 15px solid #b81f1f;
}

.ribbon.other-news {
  background: linear-gradient(90deg, #444 0%, #222 100%);
}
.ribbon.other-news::before {
  border-right-color: #222;
}
.ribbon.other-news .ribbon-title i {
  color: #ffc107;
}

/* ==========================================================
   📱 RESPONSIVE OPTIMIZATION
   ========================================================== */

/* 🧱 Tablet (<= 992px) */
@media (max-width: 992px) {
  .news-img {
    height: 200px;
  }

  .news-title {
    font-size: 1rem;
    line-height: 1.4;
  }

  .read-more-link {
    font-size: 0.85rem;
  }

  .ribbon {
    padding: 8px 20px;
    font-size: 0.95rem;
  }
}

/* 📱 Mobile (<= 768px) */
@media (max-width: 768px) {
  .news-card {
    margin-bottom: 20px;
  }

  .news-img {
    height: 180px;
  }

  .news-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .text-muted.small {
    font-size: 0.8rem;
  }

  .read-more-link {
    font-size: 0.8rem;
    letter-spacing: 0.3px;
  }

  .ribbon {
    font-size: 0.9rem;
    padding: 7px 14px;
  }

  .ribbon::before {
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-right: 12px solid #b81f1f;
  }
}

/* 🧭 Very Small Devices (<= 480px) */
@media (max-width: 480px) {
  .news-img {
    height: 160px;
  }

  .news-title {
    font-size: 0.9rem;
  }

  .read-more-link {
    font-size: 0.75rem;
  }

  .ribbon {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

