/* PHPCMS-native integration overrides. Keep this file additive so the accepted
   natshell_v2 visual theme and its existing cms.css remain untouched. */

.nsv2-news-category-tabs {
  min-height: 3rem;
  margin-bottom: 1.5rem;
}

.nsv2-news-category-tabs a {
  white-space: nowrap;
}

.nsv2-news-detail-main .nsv2-richtext > img,
.nsv2-news-detail-main .nsv2-richtext > p > img,
.nsv2-news-detail-main .nsv2-richtext figure img {
  display: block;
  width: auto !important;
  max-width: min(100%, 56rem) !important;
  max-height: 36rem;
  margin: 1.25rem auto;
  object-fit: contain;
}

.nsv2-footer-grid > *,
.nsv2-footer-grid nav,
.nsv2-footer-grid a,
.nsv2-footer-grid p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nsv2-footer-qr,
.nsv2-about-qr {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}

.nsv2-footer-qr img,
.nsv2-about-qr img {
  display: block;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: .75rem;
  background: #fff;
  object-fit: contain;
}

.nsv2-footer-qr figcaption {
  color: #94a3b8;
  font-size: .75rem;
}

.nsv2-about-qr figcaption {
  color: #475569;
  font-size: .85rem;
}

.nsv2-support-native-layout {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.nsv2-support-left-menu a {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid #bae6fd;
  border-radius: .7rem;
  background: #fff;
  padding: .75rem .95rem;
  color: #0f172a;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.nsv2-support-left-menu a + a {
  margin-top: .55rem;
}

.nsv2-support-left-menu a:hover,
.nsv2-support-left-menu a:focus-visible,
.nsv2-support-left-menu a[aria-current="page"] {
  border-color: #075d94;
  background: #075d94;
  color: #fff;
  outline: none;
}

.nsv2-support-left-menu a small {
  flex: 0 0 auto;
  opacity: .75;
}

.nsv2-support-native-card[hidden],
.nsv2-support-native-empty[hidden] {
  display: none;
}

.nsv2-support-native-detail {
  min-width: 0;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.nsv2-support-native-detail .nsv2-richtext {
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .nsv2-support-native-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .nsv2-support-left-menu nav {
    display: flex;
    overflow-x: auto;
    gap: .55rem;
    padding-bottom: .35rem;
  }

  .nsv2-support-left-menu a,
  .nsv2-support-left-menu a + a {
    flex: 0 0 auto;
    margin-top: 0;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .nsv2-footer-qr img,
  .nsv2-about-qr img {
    width: 7.5rem;
    height: 7.5rem;
  }

  .nsv2-news-category-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .35rem;
  }
}
