[data-news-navigation]:empty,
[data-news-adjacent]:empty {
  display: none;
}

.news-article-switcher {
  align-items: center;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--vs-border);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(39, 52, 127, .09);
  display: flex;
  gap: 14px;
  margin: -18px 0 42px;
  padding: 10px 12px;
  position: sticky;
  top: 12px;
  z-index: 9;
}

.news-article-switcher__label {
  align-items: center;
  background: linear-gradient(145deg, var(--vs-navy), var(--vs-indigo));
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  letter-spacing: .08em;
  min-height: 42px;
  padding: 0 15px;
  text-transform: uppercase;
}

.news-article-switcher__track {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.news-article-switcher__all,
.news-article-switcher__link {
  border: 1px solid transparent;
  border-radius: 11px;
  color: #515a78;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  max-width: 285px;
  overflow: hidden;
  padding: 10px 13px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-article-switcher__all {
  border-color: #dfe3f3;
  color: var(--vs-indigo);
}

.news-article-switcher__link:hover,
.news-article-switcher__link.is-active {
  background: #eef0ff;
  color: var(--vs-indigo);
}

.news-article-switcher__link.is-active {
  box-shadow: inset 0 0 0 1px #d9ddf8;
}

.news-navigation-fallback {
  color: var(--vs-indigo);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  margin: -16px 0 38px;
  text-decoration: none;
}

.news-adjacent {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 58px auto 0;
  max-width: 780px;
}

.news-adjacent__item {
  background: #fff;
  border: 1px solid var(--vs-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 112px;
  padding: 20px;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.news-adjacent__item:hover {
  border-color: #cdd3ef;
  box-shadow: 0 14px 30px rgba(39, 52, 127, .09);
  transform: translateY(-2px);
}

.news-adjacent__item span {
  color: var(--vs-orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.news-adjacent__item strong {
  color: var(--vs-navy);
  font-size: 16px;
  line-height: 1.4;
}

.news-adjacent__item.is-older {
  text-align: right;
}

.news-adjacent__item:only-child.is-older {
  grid-column: 2;
}

.news-adjacent__item:only-child.is-newer {
  grid-column: 1;
}

.news-adjacent + .news-article-footer {
  margin-top: 24px;
}

@media (max-width: 560px) {
  .news-article-switcher {
    align-items: stretch;
    border-radius: 15px;
    display: block;
    margin: -8px -2px 30px;
    padding: 8px;
    top: 8px;
  }

  .news-article-switcher__label {
    display: none;
  }

  .news-article-switcher__track {
    gap: 6px;
  }

  .news-article-switcher__all,
  .news-article-switcher__link {
    min-height: 44px;
    padding: 12px;
  }

  .news-adjacent {
    grid-template-columns: 1fr;
    margin-top: 42px;
  }

  .news-adjacent__item,
  .news-adjacent__item:only-child.is-older,
  .news-adjacent__item:only-child.is-newer {
    grid-column: 1;
    min-height: 96px;
  }

  .news-adjacent__item.is-older {
    text-align: left;
  }
}

/* Two-column article layout and related posts sidebar */
.news-article-page.has-news-sidebar {
  max-width: 1240px;
}

.news-article-layout {
  align-items: start;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.news-article-main {
  min-width: 0;
}

.news-sidebar {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 94px;
}

.news-sidebar__section {
  background: #fff;
  border: 1px solid var(--vs-border);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(39, 52, 127, .07);
  overflow: hidden;
  padding: 22px;
}

.news-sidebar__heading {
  border-bottom: 1px solid #edf0f6;
  margin-bottom: 8px;
  padding-bottom: 15px;
}

.news-sidebar__heading span {
  color: var(--vs-orange);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.news-sidebar__heading h2 {
  color: var(--vs-navy);
  font-size: 22px;
  letter-spacing: -.035em;
  line-height: 1.2;
  margin: 0;
}

.news-sidebar__list {
  display: grid;
}

.news-sidebar-card {
  align-items: center;
  border-bottom: 1px solid #edf0f6;
  display: grid;
  gap: 12px;
  grid-template-columns: 82px minmax(0, 1fr);
  padding: 14px 0;
  text-decoration: none;
}

.news-sidebar-card:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.news-sidebar-card__image {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #e6e9ff, #f7f8ff);
  border-radius: 12px;
  color: var(--vs-indigo);
  display: flex;
  font-size: 24px;
  font-weight: 900;
  justify-content: center;
  overflow: hidden;
}

.news-sidebar-card__image img {
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
  width: 100%;
}

.news-sidebar-card:hover .news-sidebar-card__image img {
  transform: scale(1.05);
}

.news-sidebar-card__content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.news-sidebar-card__meta {
  color: #858ca1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.news-sidebar-card__content strong {
  color: #2c345d;
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-sidebar-card:hover .news-sidebar-card__content strong,
.news-sidebar-card.is-current .news-sidebar-card__content strong {
  color: var(--vs-indigo);
}

.news-sidebar-card.is-current {
  background: #f7f8ff;
  border-radius: 12px;
  margin: 2px -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.news-sidebar__loading,
.news-sidebar__empty {
  color: var(--vs-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0 4px;
}

.news-sidebar__all {
  align-items: center;
  background: linear-gradient(135deg, var(--vs-navy), var(--vs-indigo));
  border-radius: 16px;
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: space-between;
  min-height: 52px;
  padding: 14px 18px;
  text-decoration: none;
}

.news-sidebar__all span {
  font-size: 20px;
}

/* Shared VietSure footer */
.vs-common-footer {
  background: #1d285c;
  color: #fff;
  padding: 48px 28px 24px;
}

.vs-common-footer__inner {
  margin: auto;
  max-width: 1120px;
}

.vs-common-footer__headline {
  border-bottom: 2px solid rgba(255, 255, 255, .42);
  margin: 0 auto 32px;
  max-width: 880px;
  padding-bottom: 24px;
  text-align: center;
}

.vs-common-footer__headline h2 {
  color: #fff;
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1.5;
  margin: 0;
  text-transform: uppercase;
}

.vs-common-footer__headline span {
  color: var(--vs-orange);
}

.vs-common-footer__brand {
  display: inline-flex;
  margin-bottom: 28px;
}

.vs-common-footer__brand img {
  display: block;
  height: auto;
  object-fit: contain;
  width: 174px;
}

.vs-common-footer__grid {
  display: grid;
  gap: 42px;
  grid-template-columns: 1.5fr .8fr 1.1fr .8fr;
}

.vs-common-footer h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .06em;
  margin: 0 0 20px;
  text-transform: uppercase;
}

.vs-common-footer a {
  text-decoration: none;
}

.vs-common-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-common-footer__contact-row {
  align-items: center;
  color: rgba(255, 255, 255, .82);
  display: flex;
  font-size: 14px;
  gap: 10px;
  line-height: 1.65;
}

.vs-common-footer__contact-row > span {
  align-items: center;
  background: rgba(42, 171, 238, .17);
  border-radius: 50%;
  color: #45b9f2;
  display: inline-flex;
  flex: 0 0 26px;
  height: 26px;
  justify-content: center;
}

.vs-common-footer__contact-row.is-address {
  align-items: flex-start;
}

.vs-common-footer__contact-row.is-address > span {
  margin-top: 2px;
}

.vs-common-footer__contact-row strong {
  color: rgba(255, 255, 255, .94);
}

.vs-common-footer__contact-row.is-address strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
}

.vs-common-footer__contact-row p {
  margin: 4px 0 0;
}

.vs-common-footer__links {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.vs-common-footer__links a,
.vs-common-footer__grid > section:last-child p {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.55;
}

.vs-common-footer__links a:hover {
  color: #48bdf3;
}

.vs-common-footer__social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.vs-common-footer__social a {
  align-items: center;
  background: rgba(255, 255, 255, .11);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.vs-common-footer__badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.vs-common-footer__badges img {
  display: block;
  height: 34px;
  max-width: 120px;
  object-fit: contain;
  width: auto;
}

.vs-common-footer__ecosystem {
  background: #fff;
  border-radius: 10px;
  display: inline-flex;
  padding: 7px 9px;
}

.vs-common-footer__ecosystem img {
  display: block;
  height: auto;
  object-fit: contain;
  width: 100px;
}

.vs-common-footer__copyright {
  color: rgba(255, 255, 255, .5);
  font-size: 13px;
  margin: 44px 0 0;
}

@media (max-width: 1040px) {
  .news-article-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 28px;
  }

  .vs-common-footer__grid {
    grid-template-columns: 1.35fr 1fr 1fr;
  }

  .vs-common-footer__grid > section:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .news-article-layout {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .news-sidebar__all {
    grid-column: 1 / -1;
  }

  .vs-common-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vs-common-footer__grid > section:last-child {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .news-sidebar {
    grid-template-columns: 1fr;
  }

  .news-sidebar__section {
    border-radius: 18px;
    padding: 18px;
  }

  .news-sidebar__all {
    grid-column: auto;
    min-height: 48px;
  }

  .vs-common-footer {
    padding: 40px 20px 22px;
  }

  .vs-common-footer__headline {
    margin-bottom: 28px;
    padding-bottom: 20px;
    text-align: left;
  }

  .vs-common-footer__brand {
    margin-bottom: 30px;
  }

  .vs-common-footer__grid {
    gap: 34px;
    grid-template-columns: 1fr;
  }

  .vs-common-footer__copyright {
    line-height: 1.6;
    margin-top: 36px;
  }
}
