/*
 Theme Name:   Newsera Child
 Description:  Newsera 的子主題，自訂首頁等
 Author:       haowan
 Template:newsera
 Version:      1.0.0
*/
/* 最新ニュース 區塊 - 移動端優先 */

/* 首页文章+广告板块容器 */
/* 整体板块容器 */
/* 最新ニュース板块核心样式 */
.real-time-news {
  width: 100%;
  box-sizing: border-box;
}

/* 标题样式（还原原版渐变文字） */
.news-title {
  font-size: 1.5rem; /* 移动端2xl */
  font-weight: bold;
  margin: 1.25rem 0 1rem; /* mt-5 mb-4 */
  padding: 0 1rem; /* wrapper 内边距 */
}
.news-title-text {
  display: inline-block;
  background: linear-gradient(to right, #5E39DB, #16161A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 主容器：响应式布局 */
.news-main-wrapper {
  display: flex;
  flex-direction: column; /* 移动端上下 */
  justify-content: space-between;
  padding: 0 1rem; /* wrapper 内边距 */
  box-sizing: border-box;
}

/* 左侧列 */
.news-left-column {
  max-width: 970px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border-right: none; /* 移动端无边框 */
  padding-right: 0; /* 移动端无内边距 */
  margin-right: 0; /* 移动端无外边距 */
}

/* 广告位通用样式 */
.ad-box {
  box-sizing: border-box;
}
.ad-label {
  background: rgba(0, 0, 0, 0.3); /* bg-text/30 */
  color: white;
  padding-left: 0.25rem; /* pl-1 */
  margin: 0;
}

/* 移动端广告显示，PC端隐藏 */
.ad-mobile-only {
  display: block;
}
.ad-pc-only {
  display: none;
}

/* 左侧大文章样式（移动端） */
.news-left-article {
  text-decoration: none;
  color: inherit;
}
.news-left-article-inner {
  background: white;
  display: flex;
  flex-direction: column;
  margin: 0 -1rem; /* -mx-4 */
  padding-bottom: 0.75rem; /* pb-3 */
}
.news-left-img {
  width: 100%;
  height: auto;
  aspect-ratio: 375/160; /* 移动端图片比例 */
  object-fit: cover;
  border-radius: 0; /* 移动端无圆角 */
}
.news-left-title {
  font-size: 18px;
  font-weight: bold;
  color: #000; /* text-text */
  margin: 0.75rem 1rem 0; /* mt-3 mx-4 */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* line-clamp-2 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-left-excerpt {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.6); /* text-text/60 */
  margin: 0.25rem 1rem 0; /* mt-1 mx-4 */
  display: -webkit-box;
  -webkit-line-clamp: 1; /* line-clamp-1 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 右侧列 */
.news-right-column {
  flex: 1;
  box-sizing: border-box;
  margin-top: 1rem;
}

/* 移动端内容（PC端隐藏） */
.news-mobile-content {
  display: flex;
  flex-direction: column;
}
/* 移动端小文章 */
.news-mobile-article {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* border-text/10 */
  padding: 1.25rem 0 0.75rem; /* pt-5 pb-3 */
}
.news-mobile-article-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem; /* gap-3 */
}
.news-mobile-img {
  width: 120px;
  height: 80px;
  aspect-ratio: 120/80;
  border-radius: 0.25rem; /* rounded-sm */
  object-fit: cover;
}
.news-mobile-text {
  flex: 1;
}
.news-mobile-title {
  font-size: 18px;
  font-weight: 500; /* font-medium */
  color: #000;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-mobile-excerpt {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  margin: 0.5rem 0 0; /* mt-2 */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PC端内容（移动端隐藏） */
.news-pc-content {
  display: none;
}

/* ======================
   PC端样式（屏幕≥768px）
   ====================== */
@media (min-width: 768px) {
  /* 标题PC样式 */
  .news-title {
    font-size: 2.5rem; /* 40px */
    font-weight: 900; /* font-black */
    margin: 2.5rem 0 2rem; /* mt-10 mb-8 */
    padding-bottom: 2.5rem; /* pc:pb-10 */
  }

  /* 主容器PC布局：左右分栏 */
  .news-main-wrapper {
    flex-direction: row; /* pc:flex-row */
  }

  /* 左侧列PC样式 */
  .news-left-column {
    border-right: 1px solid rgba(0, 0, 0, 0.2); /* border-text/20 */
    padding-right: 2rem; /* pc:pr-8 */
    margin-right: 2rem; /* pc:mr-8 */
    max-width: 970px;
  }

  /* PC端广告显示，移动端隐藏 */
  .ad-pc-only {
    display: block;
  }
  .ad-mobile-only {
    display: none;
  }

  /* 左侧大文章PC样式 */
  .news-left-article-inner {
    background: transparent; /* pc:bg-transparent */
    margin: 0 auto; /* pc:mx-auto */
    padding-bottom: 0;
  }
  .news-left-img {
    aspect-ratio: 970/444; /* pc:aspect-970/444 */
    border-radius: 0.5rem; /* pc:rounded-lg */
  }
  .news-left-title {
    margin-left: 0; /* pc:mx-0 */
    margin-right: 0;
  }
  .news-left-excerpt {
    margin-left: auto; /* pc:mx-auto */
    margin-right: auto;
    -webkit-line-clamp: 2; /* pc:line-clamp-2 */
  }

  /* 右侧列PC样式 */
  .news-right-column {
    margin-top: 0;
  }

  /* 移动端内容PC端隐藏 */
  .news-mobile-content {
    display: none;
  }

  /* PC端内容显示 */
  .news-pc-content {
    display: block;
  }
  /* PC端右侧大卡片 */
  .news-pc-article {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
  }
  .news-pc-article-mt {
    margin-top: 1.5rem; /* mt-6 */
  }
  .news-pc-img {
    width: 486px;
    height: 320px;
    aspect-ratio: 486/320;
    border-radius: 0.5rem; /* rounded-lg */
    object-fit: cover;
  }
  .news-pc-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 500; /* font-medium */
    color: #000;
    margin: 0.75rem 0 0; /* mt-3 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news-pc-excerpt {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    margin: 0.5rem 0 0; /* mt-2 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}