/* Y-styles.css - 重写样式文件 */



/* 全局变量 */

:root {

  --color-primary: #002972;

  --color-primary-rgb: 0,41,114;

  --ad-title: 'Advertisement';

  --page-bg-color: #fff;

  --page-text-color: #41414C;

}



/* 头部样式 */

.y_content_header {

  width: 100%;

  position: fixed;

  top: 0;

  left: 0;

  z-index: 999;

  background-color: white;

}



.y_content_header::after {

  content: '';

  position: absolute;

  bottom: 0;

  left: 0;

  right: 0;

  height: 1px;

  background-color: rgba(0,0,0,0.1);

}



/* @media (min-width: 768px) { */

  .y_content_header {

    background-color: var(--color-primary);

  }

/* } */



.y_content_header-container {

  display: flex

;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    height: 72px;

    padding: 0 16px;

    max-width: 1200px;

    margin: 0 auto;

}



.y_content_logo {

  display: block;

}



.y_content_logo-pc,.y_content_logo-mobile {

  filter: invert(1);

  height: 64px;

  width: auto;

  display: none;

}



.y_content_logo-mobile {

  filter: invert(1);

  height: 64px;

  width: auto;

  display: block;

}



@media (min-width: 768px) {

  .y_content_logo-pc {

    display: block;

  }

  

  .y_content_logo-mobile {

    display: none;

  }

}



/* @media (max-width: 767px) {

  .y_content_logo-pc {

    height: 28px;

  }

  

  .y_content_logo-mobile {

    height: 28px;

  }

} */



/* 搜索框样式 */

.y_content_search-pc {

  display: none;

}



@media (min-width: 768px) {

  .y_content_search-pc {

    display: block;

  }

}



.y_content_search-container {

  background-color: var(--page-bg-color);

  position: relative;

  border: 1px solid var(--color-primary);

  display: flex;

  /* justify-content: center; */

  align-items: center;

  margin: 0 auto;

  border-radius: 100px;

  overflow: hidden;

  width: 420px;

  height: 42px;

  position: fixed;

  top: 16px;

  left: 50%;

  transform: translateX(-50%);

  z-index: 9991;

}



.y_content_search-input {

  width: 100%;

  height: 100%;

  padding: 0 86px 0 16px;

  border: none;

  outline: none;

  background: transparent;

}



.y_content_search-input::placeholder {

  color: rgba(65, 65, 76, 0.4);

}



.y_content_search-clear {

  position: absolute;

  right: 1.4rem;

  top: 0.16rem;

  background: url(/icons/icon-clear.svg) no-repeat center;

  background-size: cover;

  width: 0.48rem;

  height: 0.48rem;

  margin-right: 0.16rem;

  display: none;

}



.y_content_search-btn {

  position: absolute;

  right: 2px;

  top: 2px;

  display: block;

  width: 70px;

  height: 36px;

  background-color: var(--color-primary);

  background-image: url(/icons/icon-search.svg);

  background-size: 24px;

  background-repeat: no-repeat;

  background-position: center;

  cursor: pointer;

  border-radius: 2rem;

  z-index: 9992;

}



/* 移动端控制按钮 */

.y_content_mobile-controls {

  display: flex;

  align-items: center;

}



@media (min-width: 768px) {

  .y_content_mobile-controls {

    display: none;

  }

}



.y_content_download-btn {

  display: flex;

  align-items: center;

  justify-content: center;

  height: 28px;

  width: 28px;

  border-radius: 50%;

  margin-right: 24px;

  background-color: var(--color-primary);

  color: white;

  box-shadow: 0 2px 4px rgba(0,0,0,0.1);

}



@media (min-width: 768px) {

  .y_content_download-btn {

    background-color: white;

    color: var(--color-primary);

  }

}



@media (max-width: 767px) {

  .y_content_download-btn {

    height: 24px;

    width: 24px;

    margin-right: 20px;

  }

}



.y_content_icon {

  width: 18px;

  height: 18px;

  color: inherit;

}



@media (max-width: 767px) {

  .y_content_icon {

    width: 16px;

    height: 16px;

  }

}



.y_content_menu-btn {

  display: block;

}



@media (min-width: 768px) {

  .y_content_menu-btn {

    display: none;

  }

}



.y_content_menu-icon {

  width: 24px;

  height: 24px;

  color: #ffffff;

}



@media (max-width: 767px) {

  .y_content_menu-icon {

    width: 20px;

    height: 20px;

  }

}



/* 侧边栏样式 */

.y_content_sidebar {

  position: fixed;

  top: 0;

  right: -100%;

  width: 100%;

  height: 100vh;

  background-color: white;

  z-index: 1000;

  transition: right 0.3s ease;

  padding: 20px;

  box-sizing: border-box;

}



.y_content_sidebar.show {

  right: 0;

}



.y_content_close-icon {

  width: 24px;

  height: 24px;

  margin: 10px 15px 34px auto;

  color: #41414C;

  display: block;

}



/* 侧边栏搜索框独立，宽度不超过侧边栏 */

.y_content_sidebar-search {

  width: 100%;

  max-width: 100%;

  box-sizing: border-box;

  margin: 2.2rem 0 0 0;

  padding: 0.5rem 1rem;

  border-radius: 2rem;

  background: var(--page-bg-color);

  position: relative;

  display: flex;

  align-items: center;

  justify-content: center;

}

.y_content_sidebar-search-input {

  flex: 1 1 0%;

  min-width: 0;

  height: 2.2rem;

  border-radius: 2rem;

  border: 1.5px solid #bfc8d6;

  outline: none;

  background: transparent;

  box-sizing: border-box;

  display: block;

  font-size: 1rem;

  padding: 0 1rem;

  transition: border-color 0.2s;

}

.y_content_sidebar-search-input:focus {

  border-color: var(--color-primary);

}

.y_content_sidebar-search-btn {

  margin-left: 0.5rem;

  background: #002972;

  border: none;

  border-radius: 50%;

  width: 2.2rem;

  height: 2.2rem;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  padding: 0;

}

.y_content_sidebar-search-btn img {

  width: 1.2rem;

  height: 1.2rem;

  object-fit: contain;

  display: block;

}



/* Category标题居中，放到分类列表上方，增加上下间距 */

.y_content_sidebar-title {

  display: block;

  text-align: center;

  font-size: 1.2rem;

  font-weight: bold;

  margin: 1.2rem 0 0.8rem 0;

  color: #41414C;

}



/* 分类列表 */

.y_content_sidebar-categories {

  list-style: none;

  margin: 0;

  padding: 0 1.2rem;

  flex: 1;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: flex-start;

  gap: 1rem;

  overflow-y: auto;

}



.y_content_sidebar-categories li a {

  color: #002972;

  font-size: 1.1rem;

  text-decoration: none;

  padding: 0.4rem 0;

  display: block;

  border-radius: 0.4rem;

  transition: background 0.2s;

  text-align: center;

  min-width: 6rem;

}



.y_content_sidebar-categories li a:hover {

  background: #f5f7fa;

}



/* PC端控制按钮 */

.y_content_pc-controls {

  display: none;

  align-items: center;

}



@media (min-width: 768px) {

  .y_content_pc-controls {

    display: flex;

  }

}



.y_content_download-btn-pc {

  display: flex;

  align-items: center;

  justify-content: center;

  height: 28px;

  width: 28px;

  border-radius: 50%;

  margin-right: 24px;

  background-color: var(--color-primary);

  color: white;

  box-shadow: 0 2px 4px rgba(0,0,0,0.1);

}



@media (max-width: 767px) {

  .y_content_download-btn-pc {

    height: 24px;

    width: 24px;

    margin-right: 20px;

  }

}



.y_content_category-dropdown {

  position: relative;

  cursor: pointer;

  margin-right: 90px;

}



.y_content_dropdown-icon {

  width: 24px;

  height: 24px;

  color: #ffffff;

}



@media (max-width: 767px) {

  .y_content_dropdown-icon {

    width: 20px;

    height: 20px;

  }

}



.y_content_dropdown-menu {

  position: absolute;

  top: 100%;

  right: 0;

  background-color: white;

  border: 1px solid rgba(0,0,0,0.1);

  border-radius: 8px;

  padding: 10px 0;

  margin: 0;

  list-style: none;

  min-width: 150px;

  box-shadow: 0 4px 6px rgba(0,0,0,0.1);

  display: none;

  z-index: 2000;

}



.y_content_category-dropdown:hover .y_content_dropdown-menu,

.y_content_dropdown-menu:hover {

  display: block;

}



.y_content_dropdown-menu li {

  margin: 0;

}



.y_content_dropdown-menu a {

  display: block;

  padding: 8px 16px;

  color: #41414C;

  text-decoration: none;

}



.y_content_dropdown-menu a:hover {

  background-color: rgba(0,0,0,0.05);

  color: var(--color-primary);

}



/* 主要内容区域 */

.y_content_main {

  padding: 0 0.3rem;

  max-width: 100%;

}



@media (min-width: 768px) {

  .y_content_main {

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 16px;

  }

}



.y_content_article {

  margin-top: 20px;

  padding-top: 88px;

}



@media (max-width: 767px) {

  .y_content_article {

    margin-top: 16px;

    padding-top: 80px;

  }

}



.y_content_mobile-search {

  display: block;

}



@media (min-width: 768px) {

  .y_content_mobile-search {

    display: none;

  }

}



.y_content_mobile-search-container {

  background-color: var(--page-bg-color);

  position: relative;

  /* border: 1px solid var(--color-primary); */  /* 去掉边框 */

  display: flex;

  justify-content: center;

  align-items: center;

  margin: 0 10vw;         /* 左右各10vw，避免太靠右 */

  border-radius: 2rem;

  overflow: hidden;

  width: 80vw;

  max-width: 420px;

  height: 3.5rem;

  min-height: 2.5rem;

  min-width: 10rem;

  transition: all 0.2s;

}



@media (max-width: 767px) {

  .y_content_mobile-search-container {

    width: 80vw;

    max-width: 18rem;

    min-width: 7rem;

    height: 2.2rem;

    border-radius: 1.1rem;

    margin: 0 10vw;      /* 小屏幕下同样左右10vw */

  }

}



.y_content_mobile-search-input {

  width: 100%;

  height: 100%;

  padding: 0 9.44rem 0 1.28rem;

  border: none;

  outline: none;

  background: transparent;

  box-sizing: border-box;

  display: block;

  font-size: 1rem;

}



@media (min-width: 768px) {

  .y_content_mobile-search-input {

    padding: 0 86px 0 16px;

    font-size: 0.9rem;

  }

}



.y_content_mobile-search-clear {

  position: absolute;

  right: 5.6rem;

  top: 0.64rem;

  background: url(/icons/icon-clear.svg) no-repeat center;

  background-size: cover;

  width: 1.92rem;

  height: 1.92rem;

  margin-right: 0.64rem;

  display: block;

  z-index: 9992;

}



@media (min-width: 768px) {

  .y_content_mobile-search-clear {

    display: none;

  }

}



.y_content_mobile-search-btn {

  position: absolute;

  right: 0.08rem;

  top: 0.08rem;

  display: flex;

  align-items: center;

  justify-content: center;

  width: 5.6rem;

  height: 2.72rem;

  background-color: var(--color-primary);

  cursor: pointer;

  border-radius: 2rem;

  z-index: 9992;

}



.y_content_mobile-search-btn img {

  width: 50%;

  height: 50%;

  object-fit: contain;

}



@media (min-width: 768px) {

  .y_content_mobile-search-btn {

    width: 70px;

    height: 36px;

  }

  

  .y_content_mobile-search-btn img {

    width: 24px;

    height: 24px;

  }

}



/* 广告容器 */

.y_content_ad-container {

  width: 100vw;

  min-height: 391px;

  margin-left: -0.3rem;

}



.y_content_ad-title {

  font-size: 0.875rem;

  color: rgba(65, 65, 76, 0.4);

  line-height: 16px;

  padding: 0 0.3rem;

}



/* 推荐标题 */

.y_content_recommend-title {

  font-size: 1.5rem;

  font-weight: bold;

  margin: 20px 0;

  color: #41414C;

  line-height: 1.4;

  position: relative;

  padding-left: 16px;

}



.y_content_recommend-title::before {

  content: "";

  background-color: var(--color-primary);

  width: 4px;

  height: 100%;

  display: block;

  position: absolute;

  top: 0;

  left: 0;

}



@media (max-width: 767px) {

  .y_content_recommend-title {

    font-size: 1.25rem;

    margin: 16px 0;

    line-height: 1.3;

    padding-left: 14px;

  }

  

  .y_content_recommend-title::before {

    width: 3px;

  }

}



@media (max-width: 480px) {

  .y_content_recommend-title {

    font-size: 1.125rem;

    margin: 14px 0;

    line-height: 1.2;

    padding-left: 12px;

  }

  

  .y_content_recommend-title::before {

    width: 3px;

  }

}



/* 无限滚动容器 */

.y_content_infinite-scroll {

  width: 100%;

}



.y_content_grid {

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 0.32rem;

}



@media (min-width: 768px) {

  .y_content_grid {

    gap: 16px;

    grid-template-columns: repeat(3, 1fr);

  }

}



@media (min-width: 1024px) {

  .y_content_grid {

    gap: 24px;

    grid-template-columns: repeat(4, 1fr);

  }

}



@media (max-width: 678px) {

  .y_content_grid {

    gap: 0.5rem;

  }

}



/* 卡片样式 */

.y_content_card {

  display: flex;

  flex-direction: column;

  text-decoration: none;

  color: inherit;

}



.y_content_card-image {

  overflow: hidden;

  object-fit: cover;

  max-width: 100%;

  margin-right: 0;

  border-radius: 0.38rem;

  width: 100%;

  height: auto;

  aspect-ratio: 366/223;

}



@media (min-width: 768px) {

  .y_content_card-image {

    border-radius: 8px;

  }

}



.y_content_card-title {

  font-size: 20px;

  line-height: 1.5;

  margin-top: 8px;

  overflow: hidden;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;

  color: #41414C;

}



@media (max-width: 767px) {

  .y_content_card-title {

    font-size: 16px;

    line-height: 1.4;

    margin-top: 6px;

  }

}



/* 页脚样式 */

.y_content_footer {

  width: 100%;

  color: rgba(65, 65, 76, 0.6);

  font-size: 0.875rem;

  border-top: 1px solid rgba(0,0,0,0.1);

}



.y_content_footer-container {

  padding: 0.16rem 0;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: space-between;

  line-height: 1;

}



@media (min-width: 768px) {

  .y_content_footer-container {

    height: 52px;

    padding: 0 12px;

    flex-direction: row;

    max-width: 1200px;

    margin: 0 auto;

    padding: 0;

    line-height: 1;

    box-sizing: content-box;

  }

}



.y_content_footer-link {

  padding-right: 6px;

  border-right: 1px solid rgba(0,0,0,0.1);

  line-height: 1;

  display: inline-block;

  color: inherit;

  text-decoration: none;

}



@media (min-width: 768px) {

  .y_content_footer-link {

    padding-right: 9px;

  }

}



.y_content_footer-link:not(:first-child) {

  padding-left: 6px;

}



@media (min-width: 768px) {

  .y_content_footer-link:not(:first-child) {

    padding-left: 0;

  }

}



.y_content_footer-link:last-child {

  border-right: none;

  padding-left: 6px;

}



@media (min-width: 768px) {

  .y_content_footer-link:last-child {

    padding-left: 9px;

  }

}



.y_content_copyright {

  margin-top: 0.12rem;

}



@media (min-width: 768px) {

  .y_content_copyright {

    margin-top: 0;

  }

}

.y_content_mobile-search-container {

  background-color: var(--page-bg-color);

  position: relative;

  border: 1px solid var(--color-primary);

  display: flex;

  justify-content: center;

  align-items: center;

  margin: 0 auto;

  border-radius: 2rem;

  overflow: hidden;

  width: 90vw;

  max-width: 420px;

  height: 3.5rem;

  min-height: 2.5rem;

  min-width: 10rem;

  transition: all 0.2s;

}



@media (min-width: 768px) {

  .y_content_mobile-search-container {

    width: 420px;

    height: 42px;

    border-radius: 100px;

    position: fixed;

    top: 16px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 9991;

  }

}



.y_content_mobile-search-input {

  width: 100%;

  height: 100%;

  padding: 0 3.5rem 0 1rem;

  border: none;

  outline: none;

  background: transparent;

  font-size: 1rem;

  box-sizing: border-box;

}



@media (min-width: 768px) {

  .y_content_mobile-search-input {

    padding: 0 86px 0 16px;

    font-size: 1rem;

  }

}



.y_content_mobile-search-clear {

  position: absolute;

  right: 3rem;

  top: 50%;

  transform: translateY(-50%);

  background: url(/icons/icon-clear.svg) no-repeat center/cover;

  width: 2rem;

  height: 2rem;

  margin-right: 0;

  display: block;

  z-index: 9992;

  border: none;

  background-color: transparent;

}



@media (min-width: 768px) {

  .y_content_mobile-search-clear {

    display: none;

  }

}



.y_content_mobile-search-btn {

  position: absolute;

  right: 0.5rem;

  top: 50%;

  transform: translateY(-50%);

  display: flex;

  align-items: center;

  justify-content: center;

  width: 3rem;

  height: 2.2rem;

  background-color: var(--color-primary);

  cursor: pointer;

  border-radius: 2rem;

  z-index: 1;

  border: none;

  padding: 0;

}



.y_content_mobile-search-btn img {

  width: 1.5rem;

  height: 1.5rem;

  object-fit: contain;

  display: block;

}



@media (min-width: 768px) {

  .y_content_mobile-search-btn {

    width: 70px;

    height: 36px;

    border-radius: 100px;

  }

  .y_content_mobile-search-btn img {

    width: 24px;

    height: 24px;

  }

}

.y_content_menu-btn{

  border: none;

  margin-right: 30px;

  background-color: #002972ff;

}

/* 遮罩层 */

.y_content_sidebar-mask {

  position: fixed;

  inset: 0;

  background: rgba(0,0,0,0.45); /* 比原来更深一点 */

  z-index: 1001;

  transition: opacity 0.3s;

  opacity: 0;

  pointer-events: none;

  display: block;

}

.y_content_sidebar-mask.show {

  opacity: 1;

  pointer-events: auto;

}



/* 侧边栏本体 */

.y_content_sidebar {

  position: fixed;

  top: 0;

  left: 0;

  width: 80vw;

  max-width: 360px;

  height: 100vh;

  background: #fff;

  z-index: 1002;

  box-shadow: 2px 0 16px rgba(0,0,0,0.08);

  transform: translateX(-100%);

  transition: transform 0.3s cubic-bezier(.4,0,.2,1);

  display: flex;

  flex-direction: column;

  padding: 0;

}

.y_content_sidebar.show {

  transform: translateX(0);

}



/* 侧边栏头部 */

.y_content_sidebar-header {

  display: flex;

  align-items: center;

  justify-content: flex-end;

  height: 3.2rem;

  padding: 0 1.2rem;

  border-bottom: 1px solid #eee;

  flex-shrink: 0;

}

.y_content_sidebar-title {

  font-size: 1.2rem;

  font-weight: bold;

}

.y_content_sidebar-close {

  background: none;

  border: none;

  font-size: 2rem;

  line-height: 1;

  cursor: pointer;

  color: #888;

}



/* 分类列表 */

.y_content_sidebar-categories {

  list-style: none;

  margin: 0;

  padding: 0 1.2rem;

  flex: 1;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: flex-start;

  gap: 1rem;

  overflow-y: auto;

}

.y_content_sidebar-categories li a {

  color: #002972;

  font-size: 1.1rem;

  text-decoration: none;

  padding: 0.4rem 0;

  display: block;

  border-radius: 0.4rem;

  transition: background 0.2s;

}

.y_content_sidebar-categories li a:hover {

  background: #f5f7fa;

}



/* PC端隐藏侧边栏 */

@media (min-width: 1024px) {

  .y_content_sidebar,

  .y_content_sidebar-mask {

    display: none !important;

  }

}



/* 保证侧边栏隐藏时，搜索框也隐藏 */

.y_content_sidebar:not(.show) .y_content_sidebar-search {

  display: none !important;

}



/* 侧边栏显示时，搜索框正常显示 */

.y_content_sidebar.show .y_content_sidebar-search {

  display: flex !important;

}







