/* OneStack News — page-specific CSS; single source of truth. */
body.oneweb-template-news,
body.category {
  background: #fff;
  color: #000730;
}

.osn20,
.osn20 * {
  box-sizing: border-box;
}

.osn20 {
  --n20-gold: #f7c331;
  --n20-text: #000730;
  --n20-border: #e8edf4;
  font-family:var(--onestack-font-body);
  color: var(--n20-text);
  background: #fff;
  padding-bottom: 80px;
}

.osn20 a {
  color: inherit;
  text-decoration: none;
}

.osn20 img {
  max-width: 100%;
  display: block;
}

.osn20 svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.osn20-container {
  width: min(1280px, calc(100vw - 56px));
  margin: 0 auto;
}

.osn20-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  align-items: center;
  background: linear-gradient(110deg, #000730 0%, #0d194b 64%, #0a1833 100%);
  color: #fff;
}
/* Decorative right-hand detail only: the original image has an old title baked into it.
   Cropping its LEFT half prevents duplicate title/breadcrumb behind the real HTML. */
.osn20-hero::before {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: min(62%, 860px);
  background: url('../img/v20/news-hero-bg.webp') right center / auto 220% no-repeat;
  opacity: .42;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 24%);
  mask-image: linear-gradient(to right, transparent 0%, #000 24%);
  pointer-events: none;
}
.osn20-hero .osn20-container {
  position: relative;
  z-index: 1;
}

.osn20-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.1;
  font-weight: 800;
}

.osn20-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: rgba(255,255,255,.88);
  font-size: 15px;
  font-weight: 700;
}

.osn20-breadcrumb strong {
  color: var(--n20-gold);
}

.osn20-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 46px;
  margin-bottom: 34px;
}

.osn20-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.osn20-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid var(--n20-border);
  border-radius: 999px;
  background: #fff;
  color: #000730;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15,23,42,.03);
}

.osn20-tabs a.is-active,
.osn20-tabs a:hover {
  border-color: transparent;
  background: linear-gradient(180deg, #ffd95f, #f3ba2b);
}

.osn20-search {
  position: relative;
  width: min(300px, 100%);
}

.osn20-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 48px 0 18px;
  border: 1px solid var(--n20-border);
  border-radius: 9px;
  background: #fff;
  color: #000730;
  outline: none;
  font-size: 15px;
}

.osn20-search button {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 0;
  padding: 0;
  transform: translateY(-50%);
  background: transparent;
  color: #000730;
  cursor: pointer;
}

.osn20-search button svg {
  width: 19px;
  height: 19px;
}

.osn20-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 24px;
  align-items: start;
}

.osn20-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.osn20-card {
  overflow: hidden;
  min-height: 286px;
  border: 1px solid var(--n20-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15,23,42,.04);
}

.osn20-card__thumb {
  display: block;
  height: 172px;
  overflow: hidden;
  background: #000730;
}

.osn20-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.osn20-card:hover .osn20-card__thumb img {
  transform: scale(1.04);
}

.osn20-card__body {
  padding: 12px 14px 18px;
}

.osn20-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.osn20-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--n20-gold);
  color: #000730;
  font-family: var(--onestack-font-body, sans-serif);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.osn20-card__meta time {
  color: #6b7280;
  font-size: 13px;
}

.osn20-card h2 {
  margin: 0;
  color: #000730;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 900;
}

.osn20-card h2 a:hover {
  color: #c48700;
}

.osn20-card p {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.osn20-sidebar {
  display: grid;
  gap: 24px;
}

.osn20-widget,
.osn20-newsletter {
  border: 1px solid var(--n20-border);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15,23,42,.04);
}

.osn20-widget h3,
.osn20-newsletter h3 {
  margin: 0 0 18px;
  color: #000730;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 900;
}

.osn20-categories > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 41px;
  border-bottom: 1px solid var(--n20-border);
  color: #000730;
  font-size: 15px;
  font-weight: 700;
}

.osn20-categories > a:last-child {
  border-bottom: 0;
}

.osn20-categories > a.is-active span,
.osn20-categories > a:hover span {
  color: #d79a00;
}

.osn20-categories > a strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 25px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #6b7280;
  font-size: 13px;
  font-weight: 900;
}

.osn20-categories > a.is-active strong,
.osn20-categories > a:hover strong {
  background: var(--n20-gold);
  color: #000730;
}

/* Popular articles: dedicated grid, never inheriting category-row flex or count pills. */
.osn20-popular {
  padding-bottom: 14px;
}

.osn20-popular__item {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--n20-border);
  color: var(--n20-text);
}

.osn20-popular__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.osn20-popular__rank {
  position: absolute;
  left: -9px;
  top: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--n20-gold);
  color: var(--n20-text);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(0,7,48,.10);
}

.osn20-popular__item img {
  width: 76px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f5f8;
}

.osn20-popular__copy {
  display: block;
  min-width: 0;
}

.osn20-popular__copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--n20-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.42;
}

.osn20-popular__item:hover .osn20-popular__copy strong {
  color: #b87d00;
}

.osn20-popular__copy time {
  display: block;
  margin-top: 7px;
  color: #718096;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
}

.osn20-newsletter {
  background: #000730;
  color: #fff;
}

.osn20-newsletter h3 {
  color: var(--n20-gold);
}

.osn20-newsletter p {
  margin: 0 0 18px;
  color: rgba(255,255,255,.82);
  font-size: 15px;
  line-height: 1.65;
}

.osn20-newsletter input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
}

.osn20-newsletter button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffd85d, #f4ba2a);
  color: #000730;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.osn20-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.osn20-pagination .page-numbers,
.osn20-pagination a,
.osn20-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--n20-border);
  border-radius: 5px;
  background: #fff;
  color: #000730;
  font-size: 14px;
  font-weight: 800;
}

.osn20-pagination .current,
.osn20-pagination a:hover {
  border-color: var(--n20-gold);
  background: var(--n20-gold);
}

.osn20-backtop {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--n20-gold);
  color: #000730;
  box-shadow: 0 12px 25px rgba(0,0,0,.18);
}

.osn20-backtop svg {
  width: 19px;
  height: 19px;
}

@media (max-width: 1199px) {
  .osn20-layout {
    grid-template-columns: 1fr;
  }

  .osn20-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .osn20-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .osn20-search {
    width: 100%;
  }

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

  .osn20-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .osn20-container {
    width: min(100vw - 28px, 100%);
  }

  .osn20-hero {
    min-height: 160px;
  }

  .osn20 {
    padding-bottom: 58px;
  }

  .osn20-toolbar {
    padding-top: 30px;
    margin-bottom: 26px;
  }

  .osn20-grid{
    grid-template-columns: 1fr;
  }

  .osn20-card__thumb {
    height: 190px;
  }
}
