

:root {
  --color1: #def0f9;
  --color2: #4167b1;
  --color2-rgba-18: rgba(65, 103, 177, 0.18);
  --color2-rgba-30: rgba(65, 103, 177, 0.3);
  --color2-rgba-15: rgba(65, 103, 177, 0.15);
  --primary-background-alpha-30: rgba(65, 103, 177, 0.3);
}

/* Visually hidden but available to search engines and screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@font-face {
  font-family: 'iconfont';  
  src: url('//at.alicdn.com/t/c/font_5091446_eg6aiit043t.woff2?t=1766025256880') format('woff2'),
       url('//at.alicdn.com/t/c/font_5091446_eg6aiit043t.woff?t=1766025256880') format('woff'),
       url('//at.alicdn.com/t/c/font_5091446_eg6aiit043t.ttf?t=1766025256880') format('truetype');
}

.iconfont {
  font-family: 'iconfont';
  font-size: 16px;
  font-style: normal;
  color: var(--color2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul,
li {
  list-style: none;
}

a {
  text-decoration: none;
  color: #000;
}

body {
  background-color: white;
  line-height: 1.4;
  overflow-x: hidden;
}




.header {
  background: var(--color1);
  color: white;
  padding: 8px 10px;
  position: relative;
  z-index: 10;
  height: auto;
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo p {
  font-size: 18px;
  font-weight: bold;
  color: var(--color2);
}
.logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* Language switcher dropdown */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
  /* margin-left: auto pins the switcher next to the right search box */
  margin: 0 8px 0 auto;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid rgba(164, 140, 230, 0.5);
  border-radius: 8px;
  color: var(--color2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.lang-switcher-btn:hover {
  border-color: var(--color2);
  box-shadow: 0 2px 10px rgba(65, 103, 177, 0.15);
}

.lang-switcher-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lang-switcher.open .lang-switcher-arrow {
  transform: rotate(180deg);
}

/* Dropdown drawer panel */
.lang-switcher-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(164, 140, 230, 0.25);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1000;
}

.lang-switcher.open .lang-switcher-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(164, 140, 230, 0.1);
}

.lang-option.active {
  color: var(--color2);
  font-weight: 700;
}

.lang-option-check {
  flex-shrink: 0;
  color: var(--color2);
}

@media (max-width: 768px) {
  .lang-switcher {
    margin: 0 6px 0 auto;
  }
  .lang-switcher-btn {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
  .lang-switcher-panel {
    min-width: 132px;
  }
}

@media (max-width: 700px) {
  .header-content {
    flex-wrap: wrap;
  }
  .lang-switcher {
    order: 5;
    width: 100%;
    margin: 0;
    padding-top: 6px;
    display: flex;
    justify-content: flex-end;
  }
  .lang-switcher-btn {
    height: 32px;
  }
  .lang-switcher-panel {
    right: 0;
  }
}



.logo-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  position: relative;
  z-index: 100;
  visibility: visible;
  opacity: 1;
  flex-shrink: 0;
  color: var(--color2);
}

.header-search-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.header-search-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.header-category-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
  position: relative;
  z-index: 100;
  visibility: visible;
  opacity: 1;
  flex-shrink: 0;
}

.header-category-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.header-category-icon {
  font-size: 0;
  line-height: 0;
  color: transparent;
  display: inline-block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  visibility: visible;
  opacity: 1;
  position: relative;
  vertical-align: middle;
  overflow: hidden;
}

.header-category-icon::before {
  content: '\e634';
  font-family: 'iconfont';
  font-style: normal;
  font-weight: normal;
  font-size: 22px;
  line-height: 22px;
  color: var(--color2);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}





.footer {
  margin-top: 30px;
  width: 100%;
  border-radius: 0;
  padding: 28px 12px 32px;
  background: var(--color1);
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.2fr;
  gap: 48px;
  align-items: start;
  text-align: left;
}

.footer-column {
  min-width: 0;
}

.footer-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
}

.footer-title--sm {
  margin: 2px 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.footer-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  max-width: 640px;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  color: var(--text-primary, #333);
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.footer-list a:hover {
  opacity: 1;
  color: var(--color2);
}

.footer-arrow {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #999;
  transition: transform 0.2s ease;
}

.footer-list a:hover .footer-arrow {
  transform: translateX(4px);
}

.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.6;
  color: var(--text-primary, #333);
  text-align: center;
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


.search-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.home-search-container {
  display: flex;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--color2-rgba-18);
  border: 1px solid var(--primary-background-alpha-30);
  transition: all 0.3s ease;
  margin: 0 20px;
}

.search-input-wrapper:focus-within {
  box-shadow: 0 6px 20px var(--color2-rgba-30),
    0 2px 8px var(--color2-rgba-15);
  border-color: var(--primary-background-alpha-30);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 999px 0 0 999px;
  font-size: 15px;
  outline: none;
  background: white;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  background: #fafafa;
}

.search-input::placeholder {
  color: #999;
}

.search-button {
  width: 52px;
  height: 42px;
  border: none;
  background: var(--color1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.search-button::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.search-button svg {
  width: 20px;
  height: 20px;
  color: var(--color2);
}

.search-button svg path {
  stroke: var(--color2) !important;
}

.search-clear {
  width: 46px;
  height: 42px;
  border: none;
  background: var(--color1);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.search-clear svg {
  width: 20px;
  height: 20px;
  color: var(--color2);
}

.search-clear svg path {
  stroke: var(--color2) !important;
}

.search-results-bar {
  background: #f8f9fa;
  border-bottom: 1px solid #e1e5e9;
  padding: 10px;
  display: none;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
}

.search-results-info {
  color: #666;
  font-size: 14px;
}

.search-results-info span {
  color: #333;
  font-weight: 600;
}

.clear-search-btn {
  color: var(--color2);
  background: transparent;
  border: 1px solid #999;
  padding: 5px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}


/* ============================================================
   Generic top-nav search box (non-home pages)
   ============================================================ */
.site-header-search {
  flex: none;
  width: 400px;
  max-width: 100%;
  margin: 0;
}

.site-header-search .search-input-wrapper {
  margin: 0;
}

.site-header-search .search-input,
.site-header-search .search-button,
.site-header-search .search-clear {
  height: 42px;
}

.site-header-search .search-input {
  font-size: 15px;
  padding: 0 16px;
}

.site-header-search .search-button {
  width: 52px;
}

.site-header-search .search-clear {
  width: 46px;
}

.site-header-search .search-button svg,
.site-header-search .search-clear svg {
  width: 20px;
  height: 20px;
}

.site-header-search .search-button::after {
  top: 12px;
  bottom: 12px;
}

@media (max-width: 700px) {
  .site-header-search {
    width: 220px;
  }
}


/* ============================================================
   Breadcrumb navigation
   ============================================================ */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 12px;
}

.breadcrumb-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color2);
  transition: opacity 0.15s ease;
}

.breadcrumb a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #ccc;
  line-height: 1;
}

.breadcrumb-current {
  color: #666;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}




.home-page {
  background-color: white;
}

.home-page .header {
  background: transparent;
}

.home-page .header-content {
  justify-content: space-between;
  max-width: 1300px;
}

.home-page-content {
  max-width: 1300px;
  margin: 0 auto;
}


.hero {
  background: var(--color1);
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-inner {
  position: relative;
  overflow: hidden;
  max-width: 1300px;
  margin: 0 auto;
  background: var(--color1);
}

.hero-item {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-areas: "visual copy";
  align-items: center;
  gap: 12px;
  position: absolute;
  inset: 0;
  padding: 12px 0 0 0;
  opacity: 0;
  transform: translateX(4%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  direction: ltr;
}

.hero-item.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
  cursor: pointer;
}

.hero-media {
  grid-area: visual;
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media::before {
  content: "";
  position: absolute;
  width: 66%;
  height: 66%;
  background: var(--color2);
  top: 0px;
  right: 6px;
  z-index: 1;
  opacity: 0.9;
}

.hero-img {
  position: relative;
  z-index: 2;
  width: 82%;
  height: 88%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-item.active:hover .hero-img {
  transform: scale(1.02);
}

.hero-body {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-title {
  font-size: 16px;
  margin: 0;
  color: var(--color2);
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: calc(1.4em * 5);
}

.hero-item.active:hover .hero-title {
  color: var(--color2);
  opacity: 0.9;
}

.hero-text {
  margin: 0;
  color: #666;
  line-height: 1.6;
  font-size: 14px;
}

.hero-btn {
  width: fit-content;
  padding: 6px 10px;
  background: var(--color2);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hero-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.hero-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--color2);
  background: transparent;
  opacity: 0.55;
  cursor: pointer;
  padding: 0;
}

.hero-dot.active {
  background: var(--color2);
  opacity: 1;
}


.category-bar-container {
  padding: 10px;
  max-width: 1300px;
  margin: 0 auto;
}

.category-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 5px;
}

.category-bar::-webkit-scrollbar {
  height: 4px;
}

.category-bar::-webkit-scrollbar-track {
  background: transparent;
}

.category-bar::-webkit-scrollbar-thumb {
  background: var(--color2);
  border-radius: 2px;
}

.category-bar::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.category-btn {
  flex: 0 0 auto;
  width: fit-content;
  min-width: fit-content;
  padding: 10px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: white;
  color: var(--color2);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  text-align: center;
  line-height: 1.4;
  font-family: inherit;
  white-space: nowrap;
}

.category-btn.active {
  background: var(--color1);
  border-color: var(--color1);
  color: var(--color2);
  font-weight: 500;
}

.category-btn .category-icon {
  margin-right: 6px;
  font-size: 24px;
  line-height: 1;
  color: var(--color2);
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.category-btn .category-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}



.articles-container {
  padding: 5px 10px;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0;
}

.category-results-container,
.search-results-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
  background: white;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.home-page .search-results-container {
  background: transparent;
  padding: 0;
}

.home-page .article-item {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 14px 14px 14px 6px;
}

.home-page .article-img {
  width: 135px;
  height: 135px;
  overflow: visible;
  background: transparent;
  position: relative;
  margin-left: auto;
  border-radius: 0;
}

.home-page .article-img::before {
  content: "";
  position: absolute;
  width: 88%;
  height: 88%;
  background: var(--color1);
  top: -12px;
  right: -16px;
  z-index: 1;
  opacity: 0.95;
}

.home-page .article-img .article-image-main,
.home-page .article-img img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-page .article-item {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-page .article-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.home-page .article-item:hover .article-img img {
  transform: scale(1.06);
}

.home-page .article-item:hover .article-title {
  color: #1c2c4a;
}

.home-page .article-info {
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 6px 0 0;
  max-width: 380px;
}

.home-page .article-title {
  color: var(--color2);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.home-page .article-date {
  color: #b6b0ad;
  margin-top: 0;
}

.home-page .article-summary {
  font-size: 13px;
  color: #7f7b78;
  line-height: 1.6;
  margin: 0;
}

.home-page .article-cta {
  display: inline-block;
  width: fit-content;
  padding: 6px 10px;
  background: var(--color2);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-page .article-cta:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* Category button row: category buttons on the left, reading time on the far right */
.home-page .article-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.home-page .article-readtime {
  flex-shrink: 0;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  margin-right: 10px;
}




.detail-page {
  padding-top: 0;
  background: white;
}

.detail-page .detail-page-layout {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.article-detail {
  width: 100%;
}


.detail-page .detail-content-wrapper {
  background:linear-gradient(to bottom, var(--color1) 150px, white 200px);;
  padding: 20px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.detail-title-wrapper {
  margin-bottom: 10px;
}

.article-detail-title {
  font-size: 20px;
  color: var(--color2);
  margin-bottom: 15px;
}

.article-detail-title.detail-page-title {
  font-weight: bold;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: #888;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.article-time,
.article-author {
  display: inline-flex;
  align-items: center;
}

.article-time::before {
  content: '🕒';
  margin-right: 5px;
}

.article-author::before {
  content: '✍️';
  margin-right: 5px;
}

.article-source {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
  padding: 10px 0;
  font-style: italic;
  border-bottom: 1px solid #e9ecef;
}

.detail-content-wrapper #articleImageContainer {
  width: 100%;
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-content-wrapper #articleMainImage {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  border-radius: 8px;
  object-fit: contain;
}

.article-detail-content {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.article-detail-content.detail-page-content {
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 15px;
}

.detail-page .article-detail-content .article-item {
  display: block;
  min-height: auto;
  height: auto;
  overflow: visible;
  cursor: default;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
  flex-direction: column;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.article-detail-content h1,
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4,
.article-detail-content h5,
.article-detail-content h6 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.article-detail-content h3 {
  color: var(--color2);
  margin: 25px 0 15px 0;
  font-size: 20px;
}

.article-detail-content p,
.article-detail-content li,
.article-detail-content span,
.article-detail-content div {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.article-detail-content p {
  margin-bottom: 15px;
}

.article-detail-content img {
  max-width: 100%;
  height: auto;
}

.article-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-detail-content th,
.article-detail-content td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  word-wrap: break-word;
  hyphens: auto;
  font-size: 14px;
}

.article-detail-content th {
  background-color: var(--color2);
  color: white;
  font-weight: 600;
}

.article-detail-content td {
  line-height: 1.5;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--color1);
  border-radius: 3px;
}


.recommended-section {
  padding: 20px;
  position: relative;
}

.recommended-section::before {
  content: "Hot Articles";
  display: block;
  font-size: 20px;
  font-weight: 400;
  color: var(--color2);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color2);
  position: relative;
}

.recommended-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 1300px;
  margin: 0 auto;
  padding: 0;
  gap: 15px;
}

.recommended-articles .article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--color1);
  background: var(--color1);
  min-height: 280px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recommended-articles .article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

.recommended-articles .article-card:hover .article-image img {
  transform: scale(1.06);
}

.recommended-articles .article-card:hover .article-title {
  color: #1c2c4a;
}

.recommended-articles .article-card .article-image {
  width: 100%;
  height: 180px;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.recommended-articles .article-card .article-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
}

.recommended-articles .article-card .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recommended-articles .article-card .article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  background: var(--color1);
}

.recommended-articles .article-card .article-title {
  font-size: 16px;
  color: var(--color2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.recommended-articles .article-card .article-tag {
  font-size: 12px;
  color: var(--color2);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}


/* ============================================================
   Detail page right sidebar
   ============================================================ */
.detail-main {
  min-width: 0;
}

.detail-sidebar {
  position: sticky;
  top: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--color1);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-widget-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--color2);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color1);
  position: relative;
}

.sidebar-widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: var(--color2);
}

/* Recent posts */
.recent-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.recent-post-item:hover {
  opacity: 0.85;
}

.recent-post-thumb {
  width: 100px;
  height: 68px;
  flex: none;
  overflow: hidden;
  background: var(--color1);
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-post-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recent-post-title {
  font-size: 15px;
  line-height: 1.45;
  color: var(--color2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.recent-post-item:hover .recent-post-title {
  color: #000;
}

.recent-post-date {
  font-size: 13px;
  color: #999;
}

/* Hot topics */
.hot-topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-topic-chip {
  display: inline-block;
  padding: 7px 14px;
  background: var(--color1);
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 14px;
  color: var(--color2);
  text-decoration: none;
  transition: all 0.2s ease;
}

.hot-topic-chip:hover {
  background: var(--color2);
  border-color: var(--color2);
  color: #fff;
}

/* Responsive: on narrow screens the sidebar moves below */
@media (max-width: 1100px) {
  .detail-page .detail-page-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .detail-sidebar {
    grid-template-columns: 1fr;
  }
}

/* Vertical share rail on the detail page */
.share-section {
  margin: 0 15px 18px;
  padding: 18px 0;
}

/* Drop extra margins when the share box sits inside a sidebar card */
.share-widget .share-section {
  margin: 0;
  padding: 0;
}

.share-section .detail-section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #333);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.social-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 20px;
  color: #ffffff;
  text-decoration: none;
  background: var(--share-color, rgba(255, 255, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.social-share-button:hover {
  transform: translateY(-3px) scale(1.08);
  filter: brightness(1.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.social-share-button__icon {
  width: 1em;
  height: 1em;
}

/* Brand colors per platform */
.social-share-button--twitter {
  --share-color: #000000;
  background: #000000;
}

.social-share-button--facebook {
  --share-color: #0866FF;
  background: #0866FF;
}

.social-share-button--pinterest {
  --share-color: #BD081C;
  background: #BD081C;
}

.social-share-button--linkedin {
  --share-color: #0A66C2;
  background: #0A66C2;
}

.social-share-button--whatsapp {
  --share-color: #25D366;
  background: #25D366;
}

/* Wide screens (>=1800px): pin the share box at the far right, vertically centered */
@media (min-width: 1800px) {
  .detail-page .share-widget {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 999;
    padding: 14px 12px;
    border-radius: 14px 0 0 14px;
    border-right: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .detail-page .share-widget .share-section {
    margin: 0;
    padding: 0;
  }

  .detail-page .share-widget .share-buttons {
    flex-direction: column;
    gap: 10px;
  }
}




.category-page {
  background: var(--color1);
}

.category-page main {
  margin-top: 58px;
}

.category-page .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.category-page .header-content {
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.category-page .page-title {
  font-size: 18px;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  color: var(--color2);
}

.category-wrapper {
  display: flex;
  flex-direction: row;
  min-height: calc(100vh - 58px);
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--color1);
  position: relative;
  color: var(--color2);
}

.category-sidebar {
  width: 120px;
  min-width: 120px;
  background: var(--color2);
  position: fixed;
  left: calc((100% - 1300px) / 2);
  top: 58px;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
  display: none;
}

@media (max-width: 1300px) {
  .category-sidebar {
    left: 0;
  }
}

.category-sidebar::-webkit-scrollbar {
  width: 4px;
}

.category-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.category-sidebar::-webkit-scrollbar-thumb {
  background: var(--primary-background-alpha-30);
  border-radius: 2px;
}

.category-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color2);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  gap: 8px;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
}

.sidebar-item.active {
  background: var(--color1);
  color: var(--color2);
  font-weight: 500;
}

.sidebar-item .category-icon {
  display: none;
  flex-shrink: 0;
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.3s ease;
  font-size: 24px;
  line-height: 32px;
  text-align: center;
}

.sidebar-item.active .category-icon {
  display: inline-block;
  opacity: 1;
}

.sidebar-item .category-icon:hover {
  opacity: 1;
}

.sidebar-item .category-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item .sidebar-divider {
  height: 0;
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
  margin: 8px 0 0 0;
  padding: 0;
  background: none;
  width: calc(100% - 16px);
  margin-left: 8px;
  margin-right: 8px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.category-content {
  flex: 1;
  background: var(--color1);
  min-height: calc(100vh - 58px);
  box-sizing: border-box;
}

.current-category-articles {
  position: relative;
  z-index: 1;
}

.category-articles {
  padding: 0;
  background: var(--color1);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  background: var(--color1);
  padding: 15px;
}

.category-grid .article-item {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.category-grid .article-img {
  width: 170px;
  height: 120px;
  overflow: hidden;
  flex-shrink: 0;
}

.category-grid .article-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.category-grid .article-info {
  flex: 1;
  min-width: 0;
  gap: 4px;
}

.category-grid .article-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--color2);
  margin: 0;
  line-height: 1.3;
}

.category-grid .article-date {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* Responsive fallback for the category grid on narrower viewports */
@media (max-width: 1100px) {
  .category-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 700px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.category-grid .category-tag {
  display: none;
}

.category-card {
  background: white;
  border-radius: 15px;
  padding: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
}

.category-card-content {
  flex: 1;
}

.category-card-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.category-card-count {
  font-size: 14px;
  color: #666;
}

.category-card-arrow {
  color: #999;
}

.category-card-arrow svg {
  width: 20px;
  height: 20px;
}




.about-page,
.privacy-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 15px;
}

.about-page .header,
.privacy-page .header {
  background: white;
  color: var(--color2);
}


.about-header,
.privacy-header {
  text-align: center;
  margin-bottom: 15px;
  padding: 15px;
  border: 2px dashed var(--color1);
  background: white;
  border-radius: 15px;
}

.about-header h1,
.privacy-header h1 {
  font-size: 28px;
  font-weight: bold;
  color: var(--color2);
  margin-bottom: 15px;
}

.about-header p,
.privacy-header p {
  font-size: 16px;
  color: var(--color2);
}

.about-content,
.privacy-content {
  background: white;
  border-radius: 15px;
  border: 2px dashed var(--color1);
  overflow: hidden;
}

.about-section,
.privacy-section {
  padding: 15px;
  border-bottom: 2px dashed var(--color1);
}

.about-section:last-child,
.privacy-section:last-child {
  border-bottom: none;
}

.about-section h2,
.privacy-section h2 {
  font-size: 20px;
  color: var(--color2);
  margin-bottom: 20px;
}

.about-section h3 {
  font-size: 20px;
  color: var(--color2);
  margin: 15px;
}

.privacy-section h3 {
  font-size: 20px;
  color: var(--color2);
  margin: 25px 0 15px 0;
}

.about-section p,
.privacy-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color2);
}

.about-section ul,
.privacy-section ul {
  margin: 15px 0;
  padding-left: 20px;
}

.about-section li,
.privacy-section li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color2);
  margin-bottom: 10px;
  list-style: disc;
}

.privacy-section strong {
  color: var(--color2);
  font-weight: 600;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.value-item {
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 5px;
  border: 2px dashed var(--color1);
}

.value-item h3 {
  font-size: 18px;
  color: var(--color2);
  margin-bottom: 10px;
}

.value-item p {
  font-size: 14px;
  color: var(--color2);
  line-height: 1.6;
}




.article-item,
.article-card {
  width: 100%;
  display: flex;
  margin: 0;
  align-items: stretch;
  cursor: pointer;
}

a.article-item,
a.article-card {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.article-item {
  height: auto;
  min-height: 80px;
  border: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-direction: row;
}

.article-card {
  border: 1px solid #999;
  overflow: hidden;
  box-shadow: none;
  height: auto;
}

.article-img,
.article-image {
  flex-shrink: 0;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.article-img {
  width: 140px;
  height: 110px;
  margin: 0;
}

.article-image {
  position: relative;
  border-radius: 0;
  background: #f0f0f0;
  width: 100%;
  height: 180px;
}

.article-img img,
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-info,
.article-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-title {
  color: #333;
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  line-height: 1.5;
  font-weight: 500;
}

.article-content .article-title {
  margin: 0 0 10px 0;
}

.article-tag {
  color: #999;
  font-size: 12px;
  margin-top: 0;
}

.article-type {
  color: var(--color2);
  opacity: 0.8;
}


.article-date {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  margin-top: auto;
}

.ads {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.ads > div {
  width: 100%;
  max-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}




.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state-text {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.empty-state-subtext {
  font-size: 14px;
  color: #999;
}

.empty-state-subtext a {
  color: var(--color1);
  text-decoration: none;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.error-state,
.loading-state,
.cache-notice,
.default-categories {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.error-icon,
.notice-icon,
.default-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.error-text,
.loading-text,
.notice-text,
.default-text {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
  font-weight: 500;
}

.notice-subtext,
.default-subtext {
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
}

.retry-btn,
.refresh-btn {
  padding: 10px 20px;
  background: #ba7ac7;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}


/* ============================================================
   PC-style layout for home page (max-width: 1300px)
   All rules scoped under .home-page so other pages are unaffected.
   ============================================================ */

/* Header & footer match the wider home content */
.home-page .footer-content {
  max-width: 1300px;
}

/* Wider search bar for PC */
.home-page .search-container {
  max-width: 720px;
}

/* Search bar lives inside the top navigation */
.home-page .header {
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

.home-page .header-content {
  gap: 16px;
}

.home-page .home-search-container {
  flex: none;
  width: 400px;
  max-width: 100%;
  margin: 0;
}

.home-page .search-input-wrapper {
  margin: 0;
}

/* Hero section: bigger media + readable copy on wide screens */
.home-page .hero {
  padding-bottom: 20px;
}

/* Today express bar */
.home-page .express-bar {
  display: flex;
  align-items: stretch;
  height: 44px;
  max-width: 1300px;
  margin: 12px auto 0;
  box-sizing: border-box;
}

.home-page .express-label {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color2);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 0 16px;
  border-radius: 0;
}

.home-page .express-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 6px 2px rgba(255, 59, 48, 0.55);
  animation: express-blink 1.2s ease-in-out infinite;
}

@keyframes express-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}

.home-page .express-carousel {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: var(--color1);
}

.home-page .express-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.home-page .express-slide.active {
  opacity: 1;
}

.home-page .express-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.home-page .express-title::before {
  content: "\201C";
  margin-right: 2px;
}

.home-page .express-title::after {
  content: "\201D";
  margin-left: 2px;
}

.home-page .express-slide:hover .express-title {
  color: #000;
}

/* ============================================================
   Home three columns below the feed: must-read / popular-nodes / featured
   ============================================================ */
.home-page .top-features {
  display: grid;
  grid-template-columns: 400px 400px 400px;
  justify-content: center;
  gap: 20px;
  max-width: 1300px;
  margin: 16px auto 10px;
  padding: 0 20px;
  box-sizing: border-box;
  align-items: stretch;
}

.home-page .feature-col {
  background: #fff;
  padding: 16px 18px;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
}

.home-page .feature-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-page .feature-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--color2);
  border-radius: 2px;
}

/* must-read: image on the left, text on the right; title + category */
.home-page .feature-mustread-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.home-page .mr-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
}

.home-page .mr-item:first-child {
  padding-top: 0;
}

.home-page .mr-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.home-page .mr-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  flex: none;
  background: #f5f5f5;
}

.home-page .mr-body {
  flex: 1;
  min-width: 0;
}

.home-page .mr-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.home-page .mr-item:hover .mr-title {
  color: var(--color2);
}

.home-page .mr-cat {
  margin-top: 6px;
  display: inline-block;
  font-size: 12px;
  color: #999;
  padding: 2px 0;
}

/* popular-nodes: rank + title + time */
.home-page .feature-popular-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.home-page .pn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
}

.home-page .pn-item:first-child {
  padding-top: 0;
}

.home-page .pn-item:last-child {
  padding-bottom: 0;
}

.home-page .pn-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--color2);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-page .pn-body {
  flex: 1;
  min-width: 0;
}

.home-page .pn-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.home-page .pn-item:hover .pn-title {
  color: var(--color2);
}

.home-page .pn-time {
  margin-top: 3px;
  display: block;
  font-size: 12px;
  color: #999;
}

/* Second card (popular-nodes) uses a dark background */
.home-page .feature-popular {
  background: #2a415f;
}

.home-page .feature-popular .feature-title {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.home-page .feature-popular .feature-title::before {
  background: #fff;
}

.home-page .feature-popular .pn-num {
  background: #2a415f;
  color: #ff5f40;
}

.home-page .feature-popular .pn-title {
  color: #fff;
}

.home-page .feature-popular .pn-item:hover .pn-title {
  color: #ffd9a0;
}

.home-page .feature-popular .pn-time {
  color: rgba(255, 255, 255, 0.6);
}

/* featured: image on top, category at the top-right, title below */
.home-page .feature-featured {
  border: 1px solid var(--color2);
}

.home-page .feature-featured-item {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.home-page .ff-media {
  position: relative;
  overflow: hidden;
  flex: none;
}

.home-page .ff-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
  transition: transform 0.3s ease;
}

.home-page .feature-featured-item:hover .ff-img {
  transform: scale(1.02);
}

.home-page .ff-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.home-page .ff-title {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.home-page .feature-featured-item:hover .ff-title {
  color: var(--color2);
}

.home-page .ff-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .home-page .top-features {
    grid-template-columns: minmax(0, 400px);
    justify-content: center;
  }
}

.home-page .hero-inner {
  padding: 0 20px;
}

.home-page .hero-item {
  gap: 28px;
  padding: 24px 0 0 0;
  align-items: stretch;
}

.home-page .hero-media {
  height: 440px;
}

.home-page .hero-body {
  gap: 14px;
  max-width: 520px;
  align-self: stretch;
  justify-content: flex-start;
}

.home-page .hero-title {
  margin-top: 30px;
  font-size: 24px;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  line-height: 1.3;
  max-height: calc(1.3em * 4);
}

.home-page .hero-text {
  font-size: 15px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-page .hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  margin-bottom: 44px;
}

.home-page .hero-read {
  font-size: 15px;
  font-weight: 600;
  color: var(--color2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.home-page .hero-read:hover {
  opacity: 0.8;
}

.home-page .hero-btn {
  padding: 8px 16px;
  font-size: 15px;
}

.home-page .hero-dot {
  width: 12px;
  height: 12px;
}

/* Category bar: center buttons, more breathing room */
.home-page .category-bar-container {
  padding: 16px 20px;
}

.home-page .category-bar {
  gap: 12px;
  justify-content: flex-start;
  overflow-x: auto;
}

.home-page .category-btn {
  padding: 10px 18px;
  font-size: 15px;
}

/* Articles container spacing */
.home-page .articles-container {
  padding: 10px 0;
}

/* Two-column grid for each category section on PC.
   JS fills each section with up to 2 articles — fits a 2-col grid perfectly. */
.home-page .category-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  padding: 18px 0;
}

/* Search results use the same two-column grid for consistency */
.home-page .search-results-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  padding: 18px 10px;
}

/* Article cards inside the grid: title on top, image below. */
.home-page .article-item {
  padding: 14px;
  flex-direction: column;
}

.home-page .article-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  margin-left: auto;
}

.home-page .article-img::before {
  width: 88%;
  height: 88%;
  top: -14px;
  right: -16px;
}

.home-page .article-info {
  max-width: none;
  gap: 12px;
}

.home-page .article-title {
  font-size: 18px;
}

.home-page .article-summary {
  font-size: 14px;
}

.home-page .article-cta {
  padding: 8px 14px;
  font-size: 14px;
}

/* Responsive fallback: collapse to 1 column on narrower viewports,
   and keep 1 column on mobile, so the layout never overflows. */
@media (max-width: 1100px) {
  .home-page .category-section,
  .home-page .search-results-container {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 700px) {
  .home-page .category-section,
  .home-page .search-results-container {
    grid-template-columns: 1fr;
  }

  .home-page .hero-media {
    height: 240px;
  }

  .home-page .hero-item {
    align-items: center;
  }

  .home-page .hero-title {
    font-size: 18px;
  }

  .home-page .hero-text {
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .home-page .express-carousel {
    height: 52px;
  }

  .home-page .express-label {
    font-size: 12px;
    padding: 0 10px;
  }

  .home-page .express-title {
    font-size: 14px;
  }

  /* Restore horizontal scrolling for the category bar on mobile */
  .home-page .category-bar {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

/* ============================================================
   Mobile experience fixes (<=700px)
   ============================================================ */
@media (max-width: 700px) {
  /* header: row 1 = logo + language switcher (right-aligned); row 2 = full-width search box */
  .header-content .logo {
    order: 1;
  }

  .header-content .logo img {
    height: 28px;
  }

  .header-content .lang-switcher {
    order: 2;
    width: auto;
    margin: 0 0 0 auto;
    padding-top: 0;
    display: flex;
    justify-content: flex-end;
  }

  .header-content .search-container {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
  }

  .header-content .search-container .search-input-wrapper {
    margin: 0;
  }

  .header-content .site-header-search {
    width: 100%;
  }

  /* Carousel: on mobile stack the image on top with the text below */
  .home-page .hero-item {
    grid-template-columns: 1fr;
    grid-template-areas: "visual" "copy";
    padding: 12px 0 0;
    gap: 10px;
  }

  .home-page .hero-title {
    margin-top: 2px;
    font-size: 17px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: calc(1.3em * 3);
  }

  .home-page .hero-actions {
    margin-bottom: 14px;
  }

  .home-page .hero-inner {
    padding: 0 12px;
  }

  /* Match the express bar height to the carousel content to avoid overflow */
  .home-page .express-bar {
    height: 52px;
  }

  .home-page .express-slide {
    padding: 0 10px;
  }

  /* Home 3-column cards: remove padding-induced crowding */
  .home-page .top-features {
    margin: 12px auto 8px;
    padding: 0 10px;
    gap: 14px;
  }

  .home-page .feature-col {
    padding: 14px;
  }

  /* Home article cards: on mobile put the title on top and the image below */
  .home-page .article-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 6px;
  }

  .home-page .article-img {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .home-page .article-img::before {
    top: -10px;
    right: -10px;
  }

  .home-page .article-info {
    max-width: none;
  }

  .home-page .article-title {
    font-size: 16px;
  }

  /* Narrow the detail page padding */
  .detail-page .detail-page-layout {
    padding: 10px 0;
  }

  .detail-page .detail-content-wrapper {
    padding: 14px 12px;
  }

  .detail-page .article-detail-title {
    font-size: 18px;
  }

  .recommended-section {
    padding: 14px 12px;
  }

  .recommended-articles {
    grid-template-columns: 1fr;
  }

  /* Breadcrumb */
  .breadcrumb {
    padding: 8px 10px;
  }

  /* Allow article meta to wrap */
  .article-meta {
    flex-wrap: wrap;
    gap: 8px 15px;
  }

  /* Search results bar */
  .search-results-bar {
    padding: 8px 10px;
  }
}
