
:root {
  --color1: #f9f0ed;
  --text-primary: #black;
  --texture-img: url("../images/bedge-grunge.png");
  --texture-color: #8abe98;
}
.bg-texture,
.header,
.footer,
.sidebar,
.sidebar-menu,
.search-button,
.search-clear,
.results-clear,
.home-page .category-tag,
.category-grid .category-tag,
.about-header,
.privacy-header,
.about-content,
.privacy-content {
  background-color: var(--texture-color);
  background-repeat: repeat;
  background-size: auto;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Screen-reader-only: gives pages with no visible title an H1 without changing the layout */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

ul,
li {
  list-style: none;
}

a {
  text-decoration: none;
  color: #000;
}

html,
body {
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  line-height: 1.4;
  overflow-x: clip;
  font-family: "Exo", Sans-Serif;
}

.home-page {
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
}

.home-page-content {
  max-width: 1800px;
  margin: 0 auto;
  padding-top: 64px;
}

/* Breadcrumb navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  max-width: 1800px;
  margin: 64px auto 0;
  width: 100%;
  font-size: 13px;
  color: #999;
  box-sizing: border-box;
}

.detail-page .breadcrumb {
  margin-top: 0;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-color, #ff4d4f);
}

.breadcrumb .breadcrumb-sep {
  color: #ccc;
}

.breadcrumb .breadcrumb-current {
  color: #333;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main .about-page,
main .privacy-page {
  margin: 0 auto;
}

.category-page main {
  margin-top: 0;
}


.detail-page {
  padding-top: 64px;
  position: relative;
  min-height: 100vh;
  background-color: transparent;
}

.detail-page .detail-page-content {
  max-width: 1800px;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}



.category-wrapper {
  display: flex;
  flex-direction: row;
  min-height: calc(100vh - 64px);
  width: 100%;
  overflow-x: hidden;
}

@media (min-width: 800px) {
  .category-wrapper {
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
  }
}

.about-page,
.privacy-page {
  margin: 64px auto 0;
  max-width: 1800px;
  padding: 15px;
}



.header {
  padding: 5px 10px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.home-page .header-content {
  justify-content: space-between;
  max-width: 1800px;
  gap: 12px;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar {
  display: none;
}

.header-nav-item {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  opacity: 0.85;
}
.header-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
  opacity: 1;
}
.header-nav-item.active {
  background-color: rgba(255, 255, 255, 0.25);
  opacity: 1;
}

.home-page .logo {
  cursor: pointer;
}

@media (max-width: 799px) {
  .header-nav {
    display: none;
  }
  .home-page .header-content {
    justify-content: space-between;
  }
}

.search-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
  position: relative;
  width: 40px;
  height: 40px;
}


.search-toggle svg {
  width: 24px;
  height: 24px;
}

.search-toggle .search-icon {
  display: block;
}

.search-toggle .close-icon {
  display: none;
}

.search-toggle.active .search-icon {
  display: none;
}

.search-toggle.active .close-icon {
  display: block !important;
}


.category-page .header-content,
.detail-page .header-content {
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.logo .logo-img {
  width: auto;
  max-width: 220px;
  height: 40px;
  object-fit: contain;
  display: block;
  animation: logoFloat 2.8s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(255, 214, 110, 0);
  }
  50% {
    transform: translateY(-3px) scale(1.07);
    box-shadow: 0 0 18px rgba(255, 214, 110, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo .logo-img {
    animation: none;
  }
}

/* Unified header: logos are left-aligned, not absolutely centered anymore */
.detail-page .logo,
.logo-center {
  position: static;
  left: auto;
  transform: none;
  pointer-events: auto;
}

.detail-page .logo img,
.logo-center img {
  pointer-events: auto;
  cursor: pointer;
}


.back-btn {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 400;
  font-size: 14px;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.category-page .back-btn {
  padding: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  justify-content: center;
}

.category-page .back-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3));
}

.detail-page .back-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3));
}






.footer {
  margin-top: 30px;
  width: 100%;
  border-radius: 0;
  padding: 28px 12px 32px;
}

.footer-content {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.2fr;
  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: #b03a2e;
}

.footer-arrow {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #b03a2e;
  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: 10px auto 0;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

/* All pages: keep the search box visible inside the top header */
.header-content .search-container {
  max-width: 340px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.header-content .search-wrapper {
  margin: 0;
}

@media (max-width: 799px) {
  .header-content .search-container {
    max-width: none;
    flex: 1;
    min-width: 0;
  }
}

.search-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: all 0.3s ease;
  margin: 0 20px;
}

.search-wrapper:focus-within {
  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;
  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;
}

.search-clear {
  width: 46px;
  height: 42px;
  border: none;
  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;
}

.search-clear svg path {
  stroke: white;
}

.results-bar {
  background: #f8f9fa;
  border-bottom: 1px solid #e1e5e9;
  padding: 10px;
  display: none;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  margin: 10px auto;
  width: 100%;
}

.results-info {
  color: #666;
  font-size: 14px;
}

.results-info span {
  color: #333;
  font-weight: 600;
}

.results-clear {
  color:white;
  padding: 5px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  border: none;
}

.sidebar {
  width: 120px;
  min-width: 120px;
  position: fixed;
  left: 0;
  top: 64px;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 800px) {
  .sidebar {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
  }
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color1);
}

.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__item {
  display: flex;
  align-items: center;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  gap: 8px;
  border-bottom: 1px dashed white;
}

.sidebar__item.active {
  background: white;
  color: #000;
  font-weight: 500;
}



.sidebar-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  z-index: 2000;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.sidebar-menu.active {
  right: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.sidebar-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.sidebar-close svg {
  width: 24px;
  height: 24px;
}

.sidebar-items {
  padding: 10px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 15px;
}

.sidebar-item.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.sidebar-category {
  padding: 0;
}

.category-content {
  flex: 1;
  position: relative;
  min-height: calc(100vh - 64px);
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

@media (min-width: 800px) {
  .category-content {
    max-width: 1800px;
    width: 100%;
  }
}


.current-articles {
  position: relative;
  z-index: 1;
}

.category-articles {
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}





.carousel-container {
  margin: 15px auto;
  padding: 0 16px;
  max-width: 960px;
}

.carousel-container.hidden {
  display: none;
}

.home-top-row {
  display: flex;
  gap: 20px;
  padding: 0 16px;
  margin: 15px 0;
  align-items: stretch;
}

.home-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-page .carousel-container {
  flex: none;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-page .carousel-wrapper {
  aspect-ratio: auto;
  height: 460px;
  display: flex;
  flex-direction: column;
}

.home-page .carousel-track {
  height: auto;
  flex: 1;
  min-height: 0;
}

.popular-nodes {
  flex: 0 0 360px;
  align-self: flex-start;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border-left: 2px dashed var(--color1);
}

.popular-nodes__heading {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
}

.popular-nodes__list {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

.popular-nodes__item {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  list-style: none;
}

.popular-nodes__item:last-child {
  border-bottom: none;
}

.popular-nodes__link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
}

.popular-nodes__rank {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.popular-nodes__title {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-primary);
  line-clamp: 2;
  overflow: hidden;
}

.all-topics {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px dashed rgba(255, 255, 255, 0.3);
}

.all-topics__heading {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}

.all-topics__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.all-topics__item {
  list-style: none;
}

.all-topics__link {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.all-topics__link:hover {
  background: var(--color1, #ba7ac7);
  color: #fff;
}

@media (max-width: 1023px) {
  .home-top-row {
    flex-direction: column;
  }
  .home-page .carousel-wrapper {
    height: 300px;
  }
  .popular-nodes {
    position: static;
    flex: none;
    width: 100%;
    max-height: none;
    overflow: visible;
  }
}

.carousel-wrapper {
  position: relative;
  overflow: visible;
  border-radius: 12px;
  aspect-ratio: 16 / 13;
  perspective: 1500px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0 0;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}

.carousel-slide {
  position: absolute;
  width: 280px;
  height: 85%;
  cursor: pointer;
  transition: all 0.5s ease;
  opacity: 0;
  transform: scale(0.7) translateX(0) translateZ(-200px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  left: 50%;
  margin-left: -140px;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1) translateX(0) translateZ(0);
  width: 320px;
  height: 90%;
  margin-left: -160px;
  z-index: 10;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.carousel-slide.next-slide {
  opacity: 0.8;
  transform: scale(0.85) translateX(220px) translateZ(-100px);
  z-index: 9;
}

.carousel-slide.next-2-slide {
  opacity: 0.5;
  transform: scale(0.75) translateX(380px) translateZ(-180px);
  z-index: 8;
}

.carousel-slide.prev-slide {
  opacity: 0.8;
  transform: scale(0.85) translateX(-220px) translateZ(-100px);
  z-index: 9;
}

.carousel-slide.prev-2-slide {
  opacity: 0.5;
  transform: scale(0.75) translateX(-380px) translateZ(-180px);
  z-index: 8;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Desktop carousel: landscape cards, both sides revealed evenly, smooth steady slide */
@media (min-width: 1024px) {
  .home-page .carousel-slide {
    width: 60%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 100%;
    margin-left: -30%;
  }

  .home-page .carousel-slide.active {
    transform: translateX(0);
  }

  .home-page .carousel-slide.prev-slide {
    transform: translateX(-103%);
  }

  .home-page .carousel-slide.next-slide {
    transform: translateX(103%);
  }

  .home-page .carousel-slide.prev-2-slide {
    transform: translateX(-206%);
  }

  .home-page .carousel-slide.next-2-slide {
    transform: translateX(206%);
  }
}

.today-recommend {
  max-width: 100%;
  margin: 20px 0 15px;
  padding: 0;
}

.today-recommend__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  padding: 10px 16px;
  border-radius: 8px;
  margin: 0 0 12px;
}

.horizontal-scroll-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-image-item {
  display: flex;
  width: 100%;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article-image-item__img {
  width: 360px;
  height: 258px;
  flex-shrink: 0;
  overflow: hidden;
}

.article-image-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-image-item__info {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.article-image-item__type {
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-image-item__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.article-image-item__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
  min-width: 0;
}

.article-image-item__meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.article-image-item__category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-primary);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.article-image-item__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.article-image-item__avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.article-image-item__author {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.article-image-item__sep {
  color: var(--text-primary);
  opacity: 0.5;
  flex-shrink: 0;
  line-height: 1;
}

.article-image-item__source {
  font-size: 12px;
  opacity: 0.8;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.article-image-item__read-time {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  opacity: 0.7;
  color: var(--text-primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.article-image-item__arrow {
  margin-left: 4px;
  font-size: 13px;
  line-height: 1;
  color: var(--text-primary);
  opacity: 0.9;
}

.article-image-item__date {
  font-size: 12px;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .article-image-item__title {
    font-size: 18px;
  }
}

.carousel-slide-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  border-radius: 0 0 12px 12px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-slide.active .carousel-slide-title {
  font-size: 16px;
  padding: 15px 12px;}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.carousel-arrow {
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: transparent;
}

.carousel-arrow svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: scale(1.1);
}







.category-page-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text, #2c332e);
  padding: 16px 10px 0;
  margin: 0 0 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  padding: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  margin-bottom: 40px;
  box-sizing: border-box;
}

@media (min-width: 800px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


.home-page .articles-container {
  padding: 0;
  max-width: 100%;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0;
}

.home-page .articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  padding: 10px;
  max-width: 100%;
}

.home-page .articles-grid > .ads,
.home-page .articles-grid .empty-state {
  grid-column: 1 / -1;
}

.home-page .articles-grid .category-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  width: 100%;
}

@media (min-width: 800px) {
  .home-page .articles-grid .category-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .home-page .articles-grid .category-section {
    grid-template-columns: repeat(3, 1fr);
  }
}

.detail-page .articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
}

.detail-page .articles-grid .category-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  width: 100%;
}

@media (min-width: 800px) {
  .detail-page .articles-grid .category-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .detail-page .articles-grid .category-section {
    grid-template-columns: repeat(3, 1fr);
  }
}

.detail-page .articles-grid .category-section .article-item {
  flex-direction: column;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  border-radius: 8px;
  overflow: hidden;
}

.detail-page .articles-grid .category-section .article-img {
  width: 100%;
  height: 200px;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.detail-page .articles-grid .category-section .article-img img:not(.hot-badge) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-page .articles-grid .category-section .article-info {
  padding: 10px;
  background: transparent;
  color: var(--text-primary);
}

.detail-page .articles-grid .category-section .article-title {
  color: var(--text-primary);
}

.detail-page .articles-grid .category-section.list-style {
  grid-template-columns: 1fr;
}

.detail-page .category-section.list-style .article-item {
  flex-direction: row;
  min-height: 110px;
  height: 110px;
  width: 100%;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  border-radius: 65px 0 65px 0;
  overflow: hidden;
}

.detail-page .category-section.list-style .article-img {
  width: 140px;
  height: 110px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.detail-page .category-section.list-style .article-img img:not(.hot-badge) {
  width: 140px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
}

.detail-page .category-section.list-style .article-info {
  padding: 12px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-color: transparent;
}

.detail-page .category-section.list-style .article-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-page .category-section.list-style .article-date {
  display: block;
  font-size: 12px;
  color: white;
  margin-top: auto;
}

.detail-page .category-section.list-style .article-info > *:not(.article-title):not(.article-date):not(.article-meta) {
  display: none;
}

.detail-page .category-section.list-style .article-meta {
  display: block;
  position: relative;
  top: 0;
  left: 0;
  transform: translate(0, 0);
  margin-top: 5px;

}


.home-page .articles-grid .results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  padding: 0;
  background: transparent;
  max-width: 100%;
  margin: 0;
  width: 100%;
}

@media (min-width: 800px) {
  .home-page .articles-grid .results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .home-page .articles-grid .results {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1600px) {
  .home-page .articles-grid .results {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-page .results .article-item {
  width: 100%;
  margin: 0;
}


.article-item {
  width: 100%;
  display: flex;
  margin: 0;
  align-items: stretch;
  cursor: pointer;
  height: auto;
  min-height: 80px;
  border: none;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-direction: column;
}


.article-item:hover,
.home-page .article-item:hover,
.category-grid .article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.home-page .article-item {
  flex-direction: column;
  border-radius:  8px;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 20px;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  border-radius: 8px;
  cursor: pointer;
  min-height: 120px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.category-card-count {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.category-card-arrow {
  display: none;
}

.category-grid .article-item {
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-page .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;
}

.article-img,
.article-image {
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.article-img {
  width: 140px;
  height: 110px;
  border-radius: 12px;
  margin: 0;
}

.home-page .article-img {
  width: 100%;
  height: 200px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
}

@media (min-width: 1200px) {
  .home-page .article-img {
    height: 340px;
  }
}

.home-page .article-img img:not(.hot-badge) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-grid .article-img {
  width: 100%;
  height: 200px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  position: relative;
  margin: 0;
}

@media (min-width: 1200px) {
  .category-grid .article-img {
    height: 340px;
  }
}

.category-grid .article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}

.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;
}


.hot-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 100;
  width: auto;
  height: 24px;
  max-height: 24px;
  max-width: 50px;
  object-fit: contain;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.article-info,
.article-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.article-info {
  padding: 10px 10px 0 10px;
}

.home-page .article-info {
  padding: 8px;
  justify-content: flex-start;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
}

.category-grid .article-info {
  flex-direction: column;
  justify-content: flex-start;
  padding: 8px;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
}

.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;
}

.category-grid .article-title {
  color: #333;
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.home-page .article-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-content .article-title {
  margin: 0 0 10px 0;
}

.article-tag {
  color: #999;
  font-size: 12px;
  margin-top: 0;
}

.article-type {
  color: var(--text-primary);
  opacity: 0.8;
}

.category-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #4A90E2;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  width: fit-content;
  margin-bottom: 4px;
}

.home-page .category-tag {
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 10;
  margin: 0;
  color: var(--text-primary);
  padding: 6px 20px 6px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.category-grid .category-tag {
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 10;
  color: white;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  border-radius: 0 0 4px 0;
}

.article-date {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.article-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 12px;
  min-width: 0;
}

.article-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 10px  0;
  min-width: 0;
}

.article-meta-sep {
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
  flex-shrink: 0;
}

.article-author {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.article-source {
  font-size: 12px;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.home-page .article-date {
  display: block;
  margin: 0;
}

.category-grid .article-date {
  display: block;
  margin: 0;
}

.article-meta .article-date,
.article-meta .article-source {
  display: inline;
  margin: 0;
  flex-shrink: 0;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  min-width: 0;
}

.article-by {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color1, #ba7ac7);
  white-space: nowrap;
  flex-shrink: 0;
}

.read-more__arrow {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.article-item:hover .read-more__arrow {
  transform: translateX(3px);
}



.article-detail {
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-header.detail-image-header {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-top: 15px;
  margin-bottom: 20px;
  max-height: 580px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}


#articleImageContainer {
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  box-shadow: none;
}

#articleMainImage {
  display: block;
  width: 100%;
  height: auto;
  max-height: 580px;
  border-radius: 10px;
  object-fit: contain;
  margin: 0;
}

.detail-page .detail-wrapper {
  padding:15px;
  border-radius: 0;
  margin-top: 0;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  box-shadow: none;
  max-width: 100%;
  color: black;
}

.detail-page .detail-wrapper a {
  color: black;
  text-decoration: underline;
}
.detail-page .detail-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.title-wrapper {
  border-radius: 5px;
}

.detail-title {
  font-size: 28px;
  padding: 0;
  margin-bottom: 12px;
  border-radius: 0;
  line-height: 1.4;
  font-weight: 600;
  background: transparent;
  background-image: none;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-page .detail-title {
  font-weight: 600;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 14px;
  color: black;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-date {
  width: auto;
  text-align: center;
  padding: 8px 12px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-category {
  width: auto;
  text-align: center;
  font-weight: 500;
  color: black;
  padding: 8px 12px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-content {
  border-radius: 5px;
  box-shadow: none;
  line-height: 1.8;
  color: #333333;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-page .detail-content {
  margin-bottom: 15px;
  color: black;
  line-height: 1.8;
  max-width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-page .detail-content * {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-page .detail-content h1,
.detail-page .detail-content h2,
.detail-page .detail-content h4,
.detail-page .detail-content h5,
.detail-page .detail-content h6 {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-page .detail-content div,
.detail-page .detail-content span,
.detail-page .detail-content li,
.detail-page .detail-content ul,
.detail-page .detail-content ol {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-content h3 {
  color: black;
  margin: 25px 0 15px 0;
  font-size: 20px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-content p {
  margin-bottom: 15px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.detail-content img {
  max-width: 100%;
  height: auto;
}

.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);
}

.detail-content th,
.detail-content td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  word-wrap: break-word;
  hyphens: auto;
  font-size: 14px;
}

.detail-content th {
  background-color: var(--color1);
  color: #333;
  font-weight: 600;
}

.detail-content td {
  line-height: 1.5;
  color: #333;
  background-color: white;
}

.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 {
  padding: 20px;
  position: relative;
}

.recommended::before {
  content: "Related Articles";
  display: block;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 25px;
  border-bottom: 3px solid rgba(0, 0, 0, .3);
}

.recommended-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  max-width: 100%;
  margin: 0;
}


.recommended-list::-webkit-scrollbar {
  display: none;
}

.recommended-list .article-item {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background-color: var(--texture-color);
  background-image: var(--texture-img);
  background-repeat: repeat;
  background-size: auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recommended-list .article-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.recommended-list .article-item .article-img {
  width: 120px;
  height: 80px;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: stretch;
}

.recommended-list .article-item .article-img img:not(.hot-badge) {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.recommended-list .article-item:hover .article-img img:not(.hot-badge) {
  transform: scale(1.06);
}

.recommended-list .article-item .article-info {
  padding: 10px 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
  flex: 1;
  border-radius: 0;
  min-width: 0;
}

.recommended-list .article-item .article-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  margin: 0;
}

.all-categories {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 2px dashed rgba(0, 0, 0, 0.15);
}

.all-categories .all-topics__link {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--text-primary, #333);
}

.all-categories .all-topics__link:hover {
  background: var(--color1, #ba7ac7);
  color: #fff;
}

.share-section {
  margin: 0 15px 18px;
  padding: 18px 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 of each 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;
}

/* Detail page desktop two-column layout: article left + related right */
@media (min-width: 1024px) {
  .detail-page .detail-page-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    align-items: start;
  }
  .detail-page .article-detail {
    grid-column: 1;
    grid-row: 1;
  }
  .detail-page .recommended {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 84px;
    align-self: start;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
  }
  .detail-page .share-section {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.detail-page > .articles-grid {
  max-width: 1800px;
  margin: 30px auto 0;
}

.about-header,
.privacy-header {
  text-align: center;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 5px;
}

.about-header h1,
.privacy-header h1 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
}

.about-header p,
.privacy-header p {
  font-size: 16px;
}

.about-content,
.privacy-content {
  border-radius: 5px;
  overflow: hidden;
}

.about-section,
.privacy-section {
  padding: 15px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
}

.about-section:last-child,
.privacy-section:last-child {
  border-bottom: none;
}

.about-section h2,
.privacy-section h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.about-section h3 {
  font-size: 20px;
  margin: 15px;
}

.privacy-section h3 {
  font-size: 20px;
  margin: 25px 0 15px 0;
}

.about-section p,
.privacy-section p {
  font-size: 16px;
  line-height: 1.8;
}

.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;
  margin-bottom: 10px;
  list-style: disc;
}

.privacy-section strong {
  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: transparent;
  border-radius: 5px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

.value-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.value-item p {
  font-size: 14px;
  line-height: 1.6;
}


.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-text {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.empty-subtext {
  font-size: 14px;
  color: #999;
}

.empty-subtext a {
  color: var(--color1);
  text-decoration: none;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* ===== Language switcher (dropdown drawer 20px right of the search box) ===== */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
  margin-left: 4px;
  z-index: 1001;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.lang-switcher__btn:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.55);
}

.lang-switcher__flag {
  font-size: 16px;
  line-height: 1;
}

.lang-switcher__label {
  line-height: 1;
}

.lang-switcher__caret {
  transition: transform 0.2s ease;
  opacity: 0.85;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-switcher__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.lang-switcher__panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #333;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.lang-switcher__option:hover {
  background: #f2f2f2;
}

.lang-switcher__option.active {
  background: rgba(138, 190, 152, 0.18);
  color: #2f6f43;
  font-weight: 600;
}

.lang-switcher__option-label {
  flex: 1;
}

.lang-switcher__check {
  color: #2f6f43;
}

@media (max-width: 799px) {
  .lang-switcher {
    margin-left: 4px;
  }
  .lang-switcher__label {
    display: none;
  }
  .lang-switcher__btn {
    padding: 0 12px;
  }

  /* Today's Recommendation mobile layout fix */
  .today-recommend {
    margin: 16px 0 12px;
  }

  .today-recommend__title {
    font-size: 18px;
    padding: 10px 14px;
    margin: 0 0 10px;
  }

  .horizontal-scroll-content {
    gap: 10px;
  }

  .article-image-item {
    flex-direction: column;
  }

  .article-image-item__img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .article-image-item__info {
    padding: 12px;
    gap: 6px;
  }

  .article-image-item__title {
    font-size: 16px;
  }

  .article-image-item__desc {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .article-image-item__meta-row {
    gap: 6px;
  }
}

/* ============================================================
   60-30-10 color theme
   60% background: #F7F9F4 off-white
   30% primary: #4A7C59 moss green (nav/header/footer/sidebar/Logo/title bar)
   auxiliary: #87A880 light moss green (card borders/tags)
   10% accent: #D48B47 warm terracotta (buttons/links/highlight tags)
   text: #2C332E body / #606963 secondary text
   ============================================================ */
:root {
  --color-bg: #f7f9f4;
  --color-primary: #4a7c59;
  --color-primary-dark: #3b6247;
  --color-primary-soft: #87a880;
  --color-accent: #d48b47;
  --color-accent-dark: #b8733a;
  --color-text: #2c332e;
  --color-text-secondary: #606963;
  --color-card: #ffffff;

  /* Backwards-compatible aliases for old variable names */
  --color1: var(--color-accent);
  --text-primary: var(--color-text);
  --texture-color: var(--color-primary);
}

/* ---------- 60% background: off-white ---------- */
html,
body,
.home-page,
.results-bar {
  background-color: var(--color-bg);
  background-image: none;
}
.results-bar {
  border-bottom-color: var(--color-primary-soft);
}

/* ---------- Cards: white background + light moss-green border ---------- */
.home-page .article-item,
.home-page .results .article-item,
.category-grid .article-item,
.category-card,
.article-image-item,
.detail-page .articles-grid .category-section .article-item,
.detail-page .category-section.list-style .article-item,
.recommended-list .article-item,
.popular-nodes,
.about-content,
.privacy-content {
  background-color: var(--color-card);
  background-image: none;
  border: 1px solid var(--color-primary-soft);
}
.home-page .article-info,
.category-grid .article-info {
  background-color: var(--color-card);
  background-image: none;
}
.article-img,
.article-image {
  background-color: var(--color-bg);
}

/* ---------- 30% primary: moss green (nav/header/footer/sidebar/title bar/Logo) ---------- */
.header,
.footer,
.sidebar,
.sidebar-menu,
.about-header,
.privacy-header {
  background-image: none;
}
.header {
  box-shadow: 0 2px 8px rgba(44, 51, 46, 0.15);
}
.today-recommend__title {
  background-color: var(--color-primary);
  background-image: none;
  color: #ffffff;
}
.article-image-item__avatar {
  background-color: var(--color-primary);
}

/* Text on green blocks is uniformly white */
.logo,
.header-nav-item,
.search-toggle,
.back-btn,
.detail-page .back-btn svg,
.footer-title,
.footer-desc,
.footer-list a,
.footer-bottom,
.about-header h1,
.about-header p,
.privacy-header h1,
.privacy-header p {
  color: #ffffff;
}
.footer-list a:hover {
  color: var(--color-accent);
}
.footer-arrow {
  color: var(--color-accent);
}
.sidebar__item.active {
  color: var(--color-primary);
}

/* ---------- 10% accent: warm terracotta (buttons/links/highlight) ---------- */
.search-button,
.search-clear,
.results-clear {
  background-color: var(--color-accent);
  background-image: none;
}
.search-button:hover,
.search-clear:hover,
.results-clear:hover {
  background-color: var(--color-accent-dark);
}
a {
  color: var(--color-accent);
}
a:hover {
  color: var(--color-accent-dark);
}
.breadcrumb a:hover {
  color: var(--color-accent);
}
.detail-page .detail-wrapper a {
  color: var(--color-accent);
}
.read-more {
  color: var(--color-accent);
}
.carousel-dot {
  background: rgba(74, 124, 89, 0.3);
}
.carousel-dot.active {
  background: var(--color-accent);
}
.carousel-dot:hover {
  background: rgba(74, 124, 89, 0.5);
}

/* ---------- Tags: light moss-green auxiliary color ---------- */
.category-tag,
.home-page .category-tag,
.category-grid .category-tag {
  background-color: var(--color-primary-soft);
  background-image: none;
  color: var(--color-text);
}

/* ---------- Text colors ---------- */
.breadcrumb,
.breadcrumb a,
.breadcrumb .breadcrumb-sep,
.article-tag,
.empty-state,
.empty-subtext,
.results-info,
.category-card-count,
.article-by {
  color: var(--color-text-secondary);
}
.breadcrumb .breadcrumb-current,
.results-info span,
.empty-text,
.category-card-title,
.article-title,
.category-grid .article-title,
.detail-page .detail-wrapper,
.detail-page .detail-content,
.detail-title,
.detail-meta,
.detail-category,
.recommended-list .article-item .article-title,
.detail-page .category-section.list-style .article-date {
  color: var(--color-text);
}
.article-meta-sep {
  color: rgba(74, 124, 89, 0.45);
}
.detail-content th {
  background-color: var(--color-primary);
  color: #ffffff;
}
.detail-content td {
  color: var(--color-text);
}

/* ---------- Dividers/fine-tuning on white cards ---------- */
.popular-nodes {
  border-left: 2px dashed var(--color-primary-soft);
}
.popular-nodes__heading {
  border-bottom-color: rgba(74, 124, 89, 0.25);
}
.popular-nodes__item {
  border-bottom-color: rgba(74, 124, 89, 0.15);
}
.popular-nodes__rank {
  background: rgba(74, 124, 89, 0.12);
}
.all-topics {
  border-top-color: rgba(74, 124, 89, 0.2);
}
.all-topics__link {
  background: rgba(135, 168, 128, 0.16);
  border-color: var(--color-primary-soft);
}
.all-topics__link:hover,
.all-categories .all-topics__link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}
.about-section,
.privacy-section {
  border-bottom-color: rgba(135, 168, 128, 0.5);
}
.value-item {
  border-color: rgba(135, 168, 128, 0.5);
}

/* ---------- Language switcher selected state ---------- */
.lang-switcher__option.active {
  background: rgba(74, 124, 89, 0.12);
  color: var(--color-primary);
}
.lang-switcher__check {
  color: var(--color-primary);
}
