.recent-news-wrapper {
  max-width: 100%;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header Styles */
.recent-news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  gap: 20px;
}

.recent-news-header-content {
  flex: 1;
}

.recent-news-widget-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.recent-news-description {
  font-size: 16px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

.recent-news-view-more-wrapper {
  flex-shrink: 0;
}

.recent-news-view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

.recent-news-view-more-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

.recent-news-view-more-btn.icon-position-before {
  flex-direction: row;
}

.recent-news-view-more-btn.icon-position-after {
  flex-direction: row;
}

/* Grid Layouts */
.recent-news-grid {
  display: grid;
  gap: 20px;
}

.recent-news-grid.mixed-layout {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
}

.recent-news-grid.grid-layout {
  grid-template-columns: repeat(3, 1fr);
}

.recent-news-grid.list-layout {
  grid-template-columns: 1fr;
}

.recent-news-grid.masonry-layout {
  column-count: 3;
  column-gap: 20px;
}

/* Post Styles */
.recent-news-post {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.recent-news-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Mixed Layout Specific */
.recent-news-post.featured-large {
  grid-row: 1 / 3;
}

.recent-news-post.small-right {
  grid-column: 2;
}

.recent-news-post.bottom-row {
  grid-column: 1 / -1;
}

/* Image Styles */
.recent-news-image {
  position: relative; 
  height: 250px;
}

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

.recent-news-post:hover .recent-news-image img {
  transform: scale(1.05);
}

.recent-news-image a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Badges Container - FIXED */
.recent-news-badges {
  
}

/* Category Badge */
.recent-news-category {
  display: inline-block;
  background-color: #dc2626;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
}

/* Date Badge - FIXED */
.recent-news-date {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  backdrop-filter: blur(4px);
}

/* Content Styles */
.recent-news-content {
  padding: 20px;
}

.recent-news-post-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.recent-news-post-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.3s ease;
}
 

.recent-news-excerpt {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.recent-news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.recent-news-read-more:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.recent-news-arrow {
  transition: transform 0.3s ease;
}

.recent-news-read-more:hover .recent-news-arrow {
  transform: translateX(4px);
}

/* Featured Post Variations */
.recent-news-post.featured-large .recent-news-image {
  height: 350px;
}

.recent-news-post.featured-large .recent-news-post-title {
  font-size: 24px;
}

.recent-news-post.featured-large .recent-news-content {
  padding: 24px;
}

/* Small Posts */
.recent-news-post.small-right .recent-news-image {
  height: 180px;
}

.recent-news-post.small-right .recent-news-post-title {
  font-size: 16px;
}

.recent-news-post.small-right .recent-news-content {
  padding: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .recent-news-grid.mixed-layout {
    grid-template-columns: 1fr;
  }

  .recent-news-post.featured-large,
  .recent-news-post.small-right,
  .recent-news-post.bottom-row {
    grid-column: 1;
  }

  .recent-news-grid.grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }

  .recent-news-grid.masonry-layout {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .recent-news-header { 
    align-items: flex-start;
    
    gap: 16px;
  }

  .recent-news-widget-title {
    font-size: 28px;
  }

  .recent-news-grid.grid-layout,
  .recent-news-grid.masonry-layout {
    grid-template-columns: 1fr;
    column-count: 1;
  }

  .recent-news-image {
    height: 200px !important;
  }

  .recent-news-post.featured-large .recent-news-image {
    height: 250px !important;
  }
}

@media (max-width: 480px) {
  .recent-news-widget-title {
    font-size: 24px;
  }

  .recent-news-description {
    font-size: 14px;
  }

  .recent-news-view-more-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .recent-news-content {
    padding: 16px;
  }

  .recent-news-post.featured-large .recent-news-content {
    padding: 20px;
  }

  .recent-news-badges {
    top: 12px;
    left: 12px;
  }

  .recent-news-category,
  .recent-news-date {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* List Layout Specific */
.recent-news-grid.list-layout .recent-news-post {
  display: flex;
  align-items: stretch;
}

.recent-news-grid.list-layout .recent-news-image {
  width: 300px;
  height: 200px;
  flex-shrink: 0;
}

.recent-news-grid.list-layout .recent-news-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .recent-news-grid.list-layout .recent-news-post {
    flex-direction: column;
  }

  .recent-news-grid.list-layout .recent-news-image {
    width: 100%;
    height: 200px;
  }
}

/* Masonry Layout Specific */
.recent-news-grid.masonry-layout .recent-news-post {
  break-inside: avoid;
  margin-bottom: 20px;
}

.recent-news-grid.masonry-layout .recent-news-image {
  height: auto;
  min-height: 200px;
}
