/**
 * Latest News Block - Clean Professional Design
 */

/* News List Container */
ul.list-unstyled.news-listing {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* News Item - Card Style */
.latest-news-item {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.latest-news-item:last-child {
  margin-bottom: 0;
}

.latest-news-item:hover {
  border-color: #18453b;
  box-shadow: 0 4px 12px rgba(24, 69, 59, 0.15);
  transform: translateY(-2px);
}

/* Card - Now just a wrapper */
.latest-news-card {
  background: transparent;
}

/* Row Layout */
.latest-news-row {
  display: flex;
  align-items: stretch;
  min-height: 100px;
}

/* Image Section */
.latest-news-image {
  flex: 0 0 240px;
  width: 240px;
  min-height: 160px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.latest-news-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.latest-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.latest-news-item:hover .latest-news-image img {
  transform: scale(1.08);
}

/* Image Overlay */
.latest-news-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(24, 69, 59, 0.25) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.latest-news-item:hover .latest-news-image-overlay {
  opacity: 1;
}

/* Content Body */
.latest-news-body {
  flex: 1;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  min-width: 0;
}

/* Date */
.latest-news-date {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.latest-news-date svg {
  flex-shrink: 0;
  color: #18453b;
  stroke-width: 2.5;
}

/* Title */
.latest-news-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.4;
  color: #212529;
}

.latest-news-title a {
  color: #212529;
  text-decoration: none;
  transition: color 0.2s ease;
}

.latest-news-title a:hover,
.latest-news-title a:focus {
  color: #18453b;
  text-decoration: underline;
}

/* Description */
.latest-news-description {
  margin: 0;
  font-size: 1.0625rem !important;
  font-weight: 400;
  line-height: 1.6;
  color: #343a40;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-news-item .latest-news-description {
  font-size: 1.0625rem !important;
}

.latest-news-description p {
  margin: 0;
  font-size: inherit !important;
}

/* Read More */
.latest-news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #18453b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: auto;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.latest-news-read-more:hover,
.latest-news-read-more:focus {
  gap: 0.5rem;
  color: #0f2b23;
  text-decoration: none;
}

.latest-news-read-more svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.latest-news-read-more:hover svg,
.latest-news-read-more:focus svg {
  transform: translateX(2px);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
  .latest-news-item {
    margin-bottom: 0.875rem;
  }

  .latest-news-image {
    flex: 0 0 200px;
    width: 200px;
    min-height: 130px;
  }

  .latest-news-body {
    padding: 0.75rem 0.875rem;
    gap: 0.375rem;
  }

  .latest-news-title {
    font-size: 1rem;
  }

  .latest-news-description {
    font-size: 0.875rem !important;
    line-height: 1.6;
    -webkit-line-clamp: 2;
  }

  .latest-news-item .latest-news-description {
    font-size: 0.875rem !important;
  }

  .latest-news-date {
    font-size: 0.625rem;
  }

  .latest-news-read-more {
    font-size: 0.6875rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 576px) {
  .latest-news-item {
    margin-bottom: 0.875rem;
  }

  .latest-news-row {
    flex-direction: column;
    min-height: auto;
  }

  .latest-news-image {
    flex: 0 0 180px;
    width: 100%;
    height: 180px;
  }

  .latest-news-body {
    padding: 1rem;
    gap: 0.5rem;
  }

  .latest-news-title {
    font-size: 1.125rem;
  }

  .latest-news-description {
    font-size: 0.9375rem !important;
    line-height: 1.6;
    -webkit-line-clamp: 3;
  }

  .latest-news-item .latest-news-description {
    font-size: 0.9375rem !important;
  }

  .latest-news-date {
    font-size: 0.6875rem;
  }

  .latest-news-read-more {
    font-size: 0.75rem;
  }
}

/* Accessibility - Focus State */
.latest-news-title a:focus,
.latest-news-read-more:focus {
  outline: 3px solid #18453b;
  outline-offset: 2px;
}

.latest-news-title a:focus:not(:focus-visible),
.latest-news-read-more:focus:not(:focus-visible) {
  outline: none;
}

.latest-news-title a:focus-visible,
.latest-news-read-more:focus-visible {
  outline: 3px solid #18453b;
  outline-offset: 2px;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .latest-news-item,
  .latest-news-image img,
  .latest-news-image-overlay,
  .latest-news-title,
  .latest-news-title a,
  .latest-news-read-more,
  .latest-news-read-more svg {
    transition: none;
  }

  .latest-news-item:hover {
    transform: none;
  }

  .latest-news-item:hover .latest-news-image img {
    transform: none;
  }

  .latest-news-read-more:hover svg,
  .latest-news-read-more:focus svg {
    transform: none;
  }
}

/* Loading Animation */
@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.latest-news-item {
  animation: slideInFade 0.4s ease-out backwards;
}

/* Stagger animation delays */
.latest-news-item:nth-child(1) {
  animation-delay: 0.05s;
}

.latest-news-item:nth-child(2) {
  animation-delay: 0.1s;
}

.latest-news-item:nth-child(3) {
  animation-delay: 0.15s;
}

.latest-news-item:nth-child(4) {
  animation-delay: 0.2s;
}

.latest-news-item:nth-child(5) {
  animation-delay: 0.25s;
}

.latest-news-item:nth-child(6) {
  animation-delay: 0.3s;
}

.latest-news-item:nth-child(7) {
  animation-delay: 0.35s;
}

/* Disable animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .latest-news-item {
    animation: none;
  }
}
