/**
 * News Listing Page Styles
 * 
 * Merged from archive-news.css and news-listing.css
 * Styles for the news archive/listing page (post_type: 'post')
 * 
 * @package YL_Theme
 * @since 1.0.0
 */

.entry-content > h1 {
  margin-bottom: 2rem;
}

/* Breadcrumb Styles (from archive-news.css) */
.yl-news-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
  font-size: 14px;
  color: #666;
  padding: 0 40px;
}

.yl-news-breadcrumb-home {
  display: inline-flex;
  align-items: center;
  color: #666;
  text-decoration: none;
}

.yl-news-breadcrumb-home:hover {
  color: #333;
}

.yl-news-breadcrumb-home svg {
  width: 16px;
  height: 16px;
}

.yl-news-breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
  padding: 2px 8px;
  border-radius: 3px;
}

.yl-news-breadcrumb a:hover {
  color: #333;
  text-decoration: underline;
}

/* Highlight "News" link in breadcrumb */
.yl-news-breadcrumb .breadcrumb-blogs-link {
  background-color: #FFD700;
  color: #333;
  font-weight: 500;
}

.yl-news-breadcrumb .breadcrumb-blogs-link:hover {
  background-color: #FFC700;
  text-decoration: none;
}

.breadcrumb-separator {
  color: #999;
  margin: 0 4px;
}

.breadcrumb-current {
  color: #333;
  font-weight: 500;
}

/* News Header with Title and Search */
.yl-news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  gap: 20px;
}

.yl-news-title {
  font-size: 48px;
  font-weight: bold;
  margin: 0;
  color: #1e1e1e;
  line-height: 1.2;
}

.yl-news-search {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.yl-news-search-input {
  width: 100%;
  padding: 12px 40px 12px 45px !important;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.yl-news-search-input:focus {
  border-color: #B88917;
}

.yl-news-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #666;
  pointer-events: none;
  z-index: 1;
  flex-shrink: 0;
}

.yl-news-search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}

.yl-news-search-clear:hover {
  color: #B88917;
}

/* Featured Article and Latest Sidebar Section */
.yl-news-featured-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 60px;
}

/* Featured Article (Left) */
.yl-news-featured-article {
  position: relative;
  height: 600px;
  overflow: hidden;
  border-radius: 8px;
}

.yl-news-featured-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.yl-news-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.yl-news-featured-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 55%;
  min-height: 468px;
  background: #7F98B3D9;
  z-index: 2;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  border-bottom-right-radius: 64px;
}

.yl-news-featured-date {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 16px;
  color: #fff;
  opacity: 0.9;
}

.yl-news-featured-title {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.3;
  margin: 0 0 20px 0;
  color: #fff;
}

.yl-news-featured-title a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.yl-news-featured-title a:hover {
  opacity: 0.9;
}

.yl-news-featured-summary {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #fff;
  opacity: 0.95;
}

.yl-news-featured-readmore {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.yl-news-featured-readmore:hover {
  opacity: 0.8;
}

/* Latest Sidebar (Right) */
.yl-news-latest-sidebar {
  background: #F7F7F1;
  border-top-right-radius: 40px;
  border-bottom-left-radius: 40px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

.yl-news-latest-title {
  font-size: 32px;
  font-weight: bold;
  color: #1e1e1e;
  flex-shrink: 0;
  padding: 20px;
}

.yl-news-latest-list {
  display: flex;
  padding: 0 24px;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #d0d0d0 #F7F7F1;
}

.yl-news-latest-list::-webkit-scrollbar {
  width: 6px;
}

.yl-news-latest-list::-webkit-scrollbar-track {
  background: #F7F7F1;
  border-radius: 10px;
}

.yl-news-latest-list::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 10px;
  transition: background 0.2s;
}

.yl-news-latest-list::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

.yl-news-latest-item {
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.yl-news-latest-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.yl-news-latest-date {
  font-size: 14px;
  color: #999;
  margin-bottom: 8px;
}

.yl-news-latest-item-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yl-news-latest-item-title a {
  color: #1e1e1e;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}

.yl-news-latest-item-title a:hover {
  color: #B88917;
}

.yl-news-latest-item-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yl-news-latest-empty {
  color: #999;
  font-size: 14px;
  text-align: center;
  padding: 40px 0;
}

/* News Grid (2 columns) */
.yl-news-container {
  margin: 0 auto;
}

.yl-news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.yl-news-card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  border-radius: 8px;
}

.yl-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.yl-news-card-image {
  width: 240px;
  height: 180px;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
  flex-shrink: 0;
}

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

.yl-news-card:hover .yl-news-card-image img {
  transform: scale(1.05);
}

.yl-news-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0e0e0;
}

.yl-placeholder-text {
  color: #999;
  font-size: 14px;
}

.yl-news-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 24px;
  justify-content: center;
}

/* Alternate background colors: odd items (1, 3, 5...) = white, even items (2, 4, 6...) = light green/beige */
.yl-news-card:nth-child(odd) {
  background: #EFF2F6;
}

.yl-news-card:nth-child(even) {
  background: #f7f7f1;
}

.yl-news-card-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 400;
}

.yl-news-card-title {
  margin-bottom: 12px;
}

.yl-news-card-title h3 {
  font-size: 20px;
  font-weight: 800;
  color: #333;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yl-news-card-title-link {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.yl-news-card-title-link:hover {
  color: #B88917;
}

.yl-news-card-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Load More button spinner icon */
.lazy-load.load-more .button.-pagination .loadmore-text {
  display: inline-block;
}

.lazy-load.load-more .button.-pagination .loading-text {
  display: none;
}

.lazy-load.load-more.active .button.-pagination .loadmore-text {
  display: none !important;
}

.lazy-load.load-more.active .button.-pagination .loading-text {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.lazy-load.load-more.active .button.-pagination .loading-text::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 50%;
  animation: yl-news-spinner 0.75s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

/* Prevent duplicate spinner from btn-loading class */
.lazy-load.load-more.active .button.-pagination.btn-loading::before,
.lazy-load.load-more.active .button.-pagination.btn-loading::after {
  display: none !important;
}

@keyframes yl-news-spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.yl-news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 18px;
}

.yl-news-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
}

.entry-content > h1 {
  margin-bottom: 2rem;
}
/* Responsive padding for .entry-content and .breadcrumb-holder */
@media (max-width: 1200px) {
  .page-container-full-w > .breadcrumb-holder { padding-left: 3rem; padding-right: 3rem; }
}
@media (max-width: 768px) {
  .page-container-full-w > .breadcrumb-holder { padding-left: 2rem; padding-right: 2rem; }
}
@media (max-width: 480px) {
  .page-container-full-w > .breadcrumb-holder { padding-left: 1rem; padding-right: 1rem; }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .yl-news-featured-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .yl-news-featured-overlay {
    width: 80%;
  }
  
  .yl-news-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .yl-news-breadcrumb {
    padding: 0 20px;
  }
  
  .yl-news-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .yl-news-title {
    font-size: 32px;
    margin-bottom: 20px;
  }
  
  .yl-news-search {
    width: 100%;
    padding: 0;
  }
  
  .yl-news-featured-article {
    height: auto;
    min-height: 400px;
    display: flex;
    flex-direction: column;
  }

  .yl-news-featured-image {
    position: relative;
    width: 100%;
    height: 300px;
    flex-shrink: 0;
  }
  
  .yl-news-featured-article {
    border-radius: 0;
  }

  .yl-news-featured-overlay {
    position: relative;
    width: 98%;
    padding: 30px 20px;
    min-height: auto;
    margin-top: -60px;
    z-index: 2;
    left: 0;
    top: auto;
  }

  .yl-news-featured-title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .yl-news-featured-summary {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .yl-news-latest-sidebar {
    max-height: none;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-radius: 0;
  }

  .yl-news-latest-title {
    font-size: 28px;
  }
  
  .yl-news-card-content {
    padding: 18px 24px;
  }
  
  .yl-news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .yl-news-card {
    flex-direction: column;
  }
  
  .yl-news-card-image {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .yl-news-breadcrumb {
    padding: 0 16px;
  }
  
  .yl-news-title {
    padding: 0 16px;
    font-size: 28px;
  }

  .yl-news-featured-article {
    min-height: 350px;
  }

  .yl-news-featured-image {
    height: 250px;
  }

  .yl-news-featured-overlay {
    padding: 25px 20px;
    margin-top: -60px;
    width: 96%;
  }

  .yl-news-latest-item-title {
    font-size: 16px;
  }
  
  .yl-news-featured-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .yl-news-featured-summary {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .yl-news-featured-readmore {
    font-size: 14px;
  }

  .yl-news-latest-title {
    font-size: 24px;
    padding: 16px;
  }

  .yl-news-latest-list {
    padding: 0 16px;
    gap: 20px;
  }

  .yl-news-card {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    border-radius: 0;
    border-bottom-right-radius: 16px;
  }

  .yl-news-card-image {
    width: 120px;
    min-width: 120px;
    height: 90px;
    flex-shrink: 0;
  }

  .yl-news-card-content {
    padding: 0 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .yl-news-card-date {
    font-size: 12px;
    color: #6b7a8f;
    margin-bottom: 0;
    font-weight: 400;
  }

  .yl-news-card-title {
    margin-bottom: 0;
  }

  .yl-news-card-title h3 {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 0;
  }

  .yl-news-card-excerpt {
    display: none;
  }
}

/* No Results Found - Same styling as shop page */
.no-results-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  margin: 40px 0;
}

.no-results-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.no-results-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0;
  line-height: 1.6;
}
