/**
 * 最新消息組件樣式
 * @package mytheme
 */

/* 最新消息區塊 */
.section-latest-news {
  padding: 190px 0 204px;
  position: relative;
}

.latest-news-header {
  position: relative;
  text-align: center;
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
}

.latest-news-header-container {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 646px;
  width: 100%;
  height: 80px;
}

.latest-news-title {
  font-size: 1.75rem;
  font-weight: 500;
  white-space: nowrap;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 1;
  align-content: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: row;
  gap: 18px;
}

.latest-news-slider {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  margin: 69px 0 59px;
  max-width: 1440px;
  width: 100%;
  overflow: hidden;
}

.latest-news-card {
  flex-shrink: 0;
  width: calc((100% - 4rem) / 3);
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.3s ease;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14.9px 14.9px rgba(0, 0, 0, 0.15);
}

.latest-news-image-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.latest-news-image-link:hover {
  filter: brightness(1.2);
}

.latest-news-image {
  width: 100%;
  height: 408px;
  object-fit: cover;
  display: block;
}

.latest-news-empty {
  width: 100%;
  text-align: center;
  color: #000;
  font-size: 1.5rem;
  padding: 0;
}

.latest-news-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.latest-news-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.latest-news-link-wrapper {
  text-decoration: none;
  flex: 1;
}

.latest-news-post-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #000;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.latest-news-date {
  font-size: 1.25rem;
  color: #000;
  white-space: nowrap;
  flex-shrink: 0;
}

.latest-news-excerpt {
  font-weight: 400;
  color: #000;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-news-link {
  display: flex;
  color: #000;
  text-decoration: none;
  font-size: 1.5rem;
  transition: color 0.3s ease;
  margin-top: auto;
  padding: 20px 60px;
  height: 60px;
  text-align: center;
  align-items: center;
  border-radius: 3rem;
  background: conic-gradient(
    from 270deg at 85.1% 50%,
    rgba(255, 242, 103, 0.72) 0deg,
    #ffac27 360deg
  );
}

.latest-news-link:hover {
  color: #fff;
  text-decoration: none;
}

/* 響應式：最新消息 - 1440px */
@media (max-width: 1440px) {
  .latest-news-card {
    width: calc((100% - 2rem) / 2);
  }
}

/* 響應式：最新消息 - 1024px */
@media (max-width: 1024px) {
  .latest-news-slider {
    width: 100%;
    margin: 1rem 0 0;
  }
}

/* 響應式：最新消息 - 480px */
@media (max-width: 480px) {
  .latest-news-title {
    gap: 5px;
  }

  .latest-news-card {
    width: 100%;
  }

  .latest-news-slider {
    width: 100%;
    margin: 0;
  }

  .section-latest-news {
    padding: 0 0 82px;
  }

  .latest-news-header-container {
    height: 23px;
    max-width: 190px;
    margin-bottom: 8.55px;
  }

  .latest-news-header {
    margin-bottom: 0;
    gap: 0;
  }

  .latest-news-card {
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  }

  .latest-news-image {
    height: auto;
  }

  .latest-news-post-title {
    font-size: 12px;
  }

  .latest-news-date {
    font-size: 6px;
  }

  .latest-news-excerpt {
    font-size: 8px;
  }

  .latest-news-link {
    font-size: 15px;
    padding: 5px 18px;
    height: auto;
    align-self: center;
    background: radial-gradient(circle, #fff267 5%, #ffac27 100%);
  }
}
