/* ==========================================================================
   NsN Child — light global shell
   ========================================================================== */

:root {
  --nsn-bg: #f4f7fb;
  --nsn-surface: #ffffff;
  --nsn-surface-2: #eef2f7;
  --nsn-text: #0f172a;
  --nsn-muted: #64748b;
  --nsn-accent: #0284c7;
  --nsn-accent-2: #0ea5e9;
  --nsn-accent-soft: rgba(14, 165, 233, 0.12);
  --nsn-border: rgba(15, 23, 42, 0.1);
  --nsn-radius: 14px;
  --nsn-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --nsn-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
}

body.nsn-tech {
  font-family: var(--nsn-font);
}

/* Soften header on home */
body.nsn-home.nsn-custom-front .site-header,
body.nsn-home.nsn-custom-front #masthead {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: saturate(1.1) blur(8px);
}

body.nsn-home.nsn-custom-front .site-footer {
  background: #fff !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
}

/* Logo sizing */
.custom-logo-link img,
.site-logo img,
.custom-logo {
  max-height: 48px;
  width: auto;
  border-radius: 10px;
}

/* Primary menu polish */
.nsn-tech .main-navigation a,
.nsn-tech #site-navigation a,
.nsn-tech .menu-item a {
  transition: color 0.15s ease, background 0.15s ease;
}

.nsn-tech .main-navigation .current-menu-item > a,
.nsn-tech .main-navigation a:hover {
  color: var(--nsn-accent) !important;
}

.nsn-tech a {
  text-underline-offset: 2px;
}

.site-footer a[href*="blazethemes.com"] {
  display: none !important;
}

/* Soft page canvas for all inner pages */
body.nsn-tech.nsn-light:not(.nsn-custom-front) {
  background: #f4f7fb !important;
}

body.nsn-tech .primary-content {
  min-width: 0;
}

/* ==========================================================================
   NsN — Archive / Category / Search / Blog list polish
   ========================================================================== */

body.archive,
body.blog:not(.nsn-custom-front),
body.search,
body.category,
body.tag,
body.author {
  background: #f4f7fb !important;
}

/* Layout container */
body.archive #primary.site-main,
body.blog:not(.nsn-custom-front) #primary.site-main,
body.search #primary.site-main,
body.category #primary.site-main {
  padding-bottom: 48px;
}

body.archive .newsmatic-container,
body.category .newsmatic-container,
body.search .newsmatic-container,
body.blog:not(.nsn-custom-front) .newsmatic-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Page header (category title) ---- */
body.archive .page-header,
body.category .page-header,
body.search .page-header,
body.blog:not(.nsn-custom-front) .page-header {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 22px 24px 20px;
  margin: 8px 0 22px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

body.archive .page-header::before,
body.category .page-header::before,
body.search .page-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  border-radius: 16px 0 0 16px;
}

body.archive .page-title,
body.category .page-title,
body.search .page-title,
body.blog:not(.nsn-custom-front) .page-title,
body.archive h1.page-title.newsmatic-block-title {
  margin: 0 !important;
  padding: 0 0 0 10px !important;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
  border: 0 !important;
  background: none !important;
}

body.archive .page-header .archive-description,
body.category .taxonomy-description,
body.archive .page-header p {
  margin: 8px 0 0 10px !important;
  color: #64748b !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  max-width: 62ch;
}

/* ---- Post list → modern cards ---- */
body.archive .news-list-wrap,
body.category .news-list-wrap,
body.search .news-list-wrap,
body.blog:not(.nsn-custom-front) .news-list-wrap,
body.archive .post-inner-wrapper,
body.category .post-inner-wrapper {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 18px !important;
}

/* Grid mode (default from nm_archive_layout=grid) */
body.nsn-archive-grid .news-list-wrap,
body.nsn-archive-grid .post-inner-wrapper.news-list-wrap {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

body.archive .news-list-wrap article.post,
body.category .news-list-wrap article.post,
body.search .news-list-wrap article.post,
body.blog:not(.nsn-custom-front) .news-list-wrap article.post {
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06) !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
  height: 100%;
}

body.archive .news-list-wrap article.post:hover,
body.category .news-list-wrap article.post:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.11) !important;
}

/* List mode: horizontal cards */
body.nsn-archive-list .news-list-wrap,
body.nsn-archive-list .post-inner-wrapper.news-list-wrap {
  grid-template-columns: 1fr !important;
}

body.nsn-archive-list .news-list-wrap article.post {
  flex-direction: row !important;
  align-items: stretch !important;
}

body.nsn-archive-list .news-list-wrap article.post .post-thumb-wrap {
  width: 280px !important;
  min-width: 240px !important;
  max-width: 34% !important;
  margin: 0 !important;
  flex: 0 0 280px;
}

/* Thumbnail */
body.archive .post-thumb-wrap,
body.category .post-thumb-wrap,
body.search .post-thumb-wrap {
  position: relative !important;
  margin: 0 !important;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

body.nsn-archive-list .post-thumb-wrap {
  aspect-ratio: auto;
  min-height: 100%;
}

body.archive .post-thumb-wrap a,
body.category .post-thumb-wrap a {
  display: block;
  height: 100%;
}

body.archive .post-thumb-wrap img,
body.category .post-thumb-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease !important;
}

body.archive article.post:hover .post-thumb-wrap img {
  transform: scale(1.04);
}

/* Category pills on image */
body.archive .post-thumb-wrap .post-categories,
body.category .post-thumb-wrap .post-categories {
  position: absolute !important;
  left: 10px !important;
  top: 10px !important;
  z-index: 2;
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.archive .post-categories .cat-item,
body.category .post-categories .cat-item {
  margin: 0 !important;
  background: #0ea5e9 !important;
  border-radius: 999px !important;
  overflow: hidden;
}

body.archive .post-categories .cat-item a,
body.category .post-categories .cat-item a {
  display: inline-block !important;
  padding: 4px 10px !important;
  color: #fff !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  text-decoration: none !important;
  background: transparent !important;
}

/* Content block */
body.archive .post-element,
body.category .post-element,
body.search .post-element {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 14px 16px 16px !important;
  flex: 1 1 auto;
  min-width: 0;
}

body.archive .post-title,
body.category .post-title,
body.search .post-title {
  margin: 0 !important;
  font-size: 1.05rem !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

body.archive .post-title a,
body.category .post-title a {
  color: #0f172a !important;
  text-decoration: none !important;
}

body.archive .post-title a:hover,
body.category .post-title a:hover {
  color: #0284c7 !important;
}

/* Meta row */
body.archive .post-meta,
body.category .post-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px 12px !important;
  margin: 0 !important;
  font-size: 0.78rem !important;
  color: #64748b !important;
}

body.archive .post-meta a,
body.category .post-meta a {
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

body.archive .post-meta .author_name {
  color: #0f172a !important;
}

body.archive .post-meta .updated {
  display: none !important; /* hide duplicate updated time */
}

body.archive .post-meta .read-time {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
}

/* Excerpt */
body.archive .post-excerpt,
body.category .post-excerpt {
  margin: 0 !important;
  color: #475569 !important;
  font-size: 0.9rem !important;
  line-height: 1.55 !important;
  flex: 1 1 auto;
}

body.archive .post-excerpt p,
body.category .post-excerpt p {
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more button */
body.archive .post-link-button,
body.category .post-link-button,
body.search .post-link-button,
body.blog:not(.nsn-custom-front) .post-link-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  align-self: flex-start !important;
  margin-top: 6px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

body.archive .post-link-button:hover,
body.category .post-link-button:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #fff !important;
}

body.archive .post-link-button i {
  font-size: 0.75rem;
}

/* Sidebar polish */
body.archive .secondary-sidebar,
body.category #secondary,
body.archive .primary-sidebar,
body.category .right-sidebar .secondary-sidebar {
  /* theme varies */
}

body.archive .widget,
body.category .widget {
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}

body.archive .widget-title,
body.category .widget-title {
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #0f172a !important;
  border-left: 3px solid #0284c7 !important;
  padding-left: 10px !important;
  margin: 0 0 12px !important;
}

/* Pagination */
body.archive .navigation.pagination,
body.category .navigation.pagination,
body.archive nav.navigation,
body.category .nav-links {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 28px 0 8px !important;
  flex-wrap: wrap;
}

body.archive .page-numbers,
body.category .page-numbers,
body.archive .nav-links a,
body.archive .nav-links span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body.archive .page-numbers.current,
body.category .page-numbers.current,
body.archive .nav-links span.current {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #fff !important;
}

/* ---- Single post polish ---- */
body.single-post .site-main,
body.page .site-main {
  background: transparent;
}

body.single-post .primary-content,
body.single-post article.post {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  padding: 22px 24px 28px;
  margin-bottom: 20px;
}

body.single-post .entry-title,
body.single-post h1.post-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

body.single-post .entry-content,
body.single-post .post-content {
  font-size: 1.05rem !important;
  line-height: 1.75 !important;
  color: #1e293b !important;
}

body.single-post .entry-content img,
body.single-post .post-content img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
}

body.single-post .entry-content h2,
body.single-post .entry-content h3 {
  color: #0f172a !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  margin-top: 1.6em !important;
}

body.single-post .entry-content a {
  color: #0284c7;
}

/* Breadcrumb spacing with archive */
.nsn-breadcrumb {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  body.nsn-archive-grid .news-list-wrap,
  body.nsn-archive-grid .post-inner-wrapper.news-list-wrap {
    grid-template-columns: 1fr !important;
  }

  body.nsn-archive-list .news-list-wrap article.post {
    flex-direction: column !important;
  }

  body.nsn-archive-list .news-list-wrap article.post .post-thumb-wrap {
    width: 100% !important;
    max-width: 100% !important;
    flex: none;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  body.single-post .primary-content,
  body.single-post article.post {
    padding: 16px 14px 20px;
    border-radius: 12px;
  }
}

