/* =============================================================================
   News Portal Pro v1.3 — Professional News Site Stylesheet
   Class names match the actual templates (header.php, home.php, single-post.php,
   category-archive.php, author.php, categories-list.php, 404.php, search-results.php,
   partials/post-card.php, partials/latest-posts-widget.php).
   Aesthetic: serious newspaper / digital news portal (NYT, El País, Reuters).
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700;800;900&display=swap');

/* ── 1. Tokens ─────────────────────────────────────────────────────────────── */

:root {
  /* Admin-overridable brand tokens */
  --np-primary:   #C0392B;
  --np-secondary: #1a1a1a;
  --np-accent:    #E67E22;
  --np-text:      #1a1a1a;
  --np-bg:        #F4F4F4;
  --np-header-bg: #FFFFFF;
  --np-footer-bg: #0F0F10;
  --np-card-bg:   #FFFFFF;
  --np-border:    #E4E4E4;
  --np-link:      #C0392B;

  /* Derived */
  --np-text-muted:  #5b5b5b;
  --np-text-subtle: #8a8a8a;
  --np-divider:     #ECECEC;
  --np-hover-bg:    #FAFAFA;
  --np-radius:      2px;
  --np-radius-md:   4px;
  --np-radius-lg:   6px;
  --np-shadow-sm:   0 1px 2px rgba(0,0,0,.06);
  --np-shadow:      0 4px 14px rgba(0,0,0,.08);
  --np-shadow-md:   0 10px 30px rgba(0,0,0,.14);
  --np-transition:  .18s ease;

  --np-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --np-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --np-max-w:  1300px;
  --np-gutter: 28px;
}

/* ── 2. Reset / Base ──────────────────────────────────────────────────────── */

.np-wrap *,
.np-wrap *::before,
.np-wrap *::after {
  box-sizing: border-box;
}

.np-wrap {
  font-family: var(--np-font-sans);
  color: var(--np-text);
  background: var(--np-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

.np-wrap a { color: var(--np-link); text-decoration: none; transition: color var(--np-transition); }
.np-wrap a:hover { color: var(--np-primary); }

.np-wrap img { max-width: 100%; height: auto; display: block; }

.np-wrap ul,
.np-wrap ol { margin: 0; padding: 0; list-style: none; }

.np-wrap p { margin: 0 0 1rem; }

.np-container {
  max-width: var(--np-max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--np-gutter);
  padding-right: var(--np-gutter);
}

/* ── 3. Section header (used across home, related, search, categories) ───── */

.np-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--np-secondary);
}

.np-section-title {
  font-family: var(--np-font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--np-text);
  margin: 0;
  position: relative;
  padding: 0 0 10px;
  margin-bottom: -12px;
  border-bottom: 4px solid var(--np-primary);
  white-space: nowrap;
}

.np-section-line { flex: 1; }

.np-section-more {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--np-text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--np-transition);
}

.np-section-more:hover { color: var(--np-primary); }

/* ── 4. Category labels ───────────────────────────────────────────────────── */

.np-cat-label {
  display: inline-block;
  background: var(--np-primary);
  color: #fff !important;
  font-family: var(--np-font-sans);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 0;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--np-transition);
}

.np-cat-label:hover { background: var(--np-secondary); color: #fff !important; }

.np-cat-label--sm { font-size: .62rem; padding: 3px 7px; letter-spacing: .1em; }
.np-cat-label--lg { font-size: .8rem; padding: 6px 12px; }

/* Overlay variant — sits on top of card image (post-card.php) */
.np-cat-label--overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ── 5. Post meta (NP_Templates::post_meta output) ────────────────────────── */

.np-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: .78rem;
  color: var(--np-text-muted);
  margin-top: 8px;
  font-family: var(--np-font-sans);
}

.np-post-meta a { color: inherit; }
.np-post-meta a:hover { color: var(--np-primary); }

.np-meta-date,
.np-meta-author,
.np-meta-read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.np-meta-date svg,
.np-meta-author svg,
.np-meta-read svg {
  width: 13px;
  height: 13px;
  opacity: .55;
  flex-shrink: 0;
}

/* ── 5b. Topbar (date + weather) ──────────────────────────────────────────── */

.np-topbar {
  background: #f7f7f7;
  border-bottom: 1px solid var(--np-divider);
  font-family: var(--np-font-sans);
  font-size: .78rem;
  color: var(--np-text-muted);
  overflow: hidden;
  max-width: 100%;
}

.np-topbar .np-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.np-topbar__date,
.np-topbar__weather {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.np-topbar__date {
  text-transform: capitalize;
  font-weight: 500;
}

.np-topbar__date svg {
  width: 13px;
  height: 13px;
  opacity: .7;
  flex-shrink: 0;
}

.np-topbar__weather {
  font-weight: 600;
  color: var(--np-text);
}

.np-topbar__weather-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--np-primary);
}

.np-topbar__weather-icon svg {
  width: 18px;
  height: 18px;
}

.np-topbar__weather-temp {
  font-weight: 700;
}

.np-topbar__weather-loc {
  color: var(--np-text-muted);
  font-weight: 500;
}

@media (max-width: 480px) {
  .np-topbar { font-size: .72rem; }
  .np-topbar .np-container { gap: 8px; min-height: 30px; }
  .np-topbar__weather-loc { display: none; }
}

/* ── 6. Breaking news ticker ──────────────────────────────────────────────── */

.np-ticker {
  background: var(--np-secondary);
  color: #fff;
  height: 36px;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  max-width: 100%;
}

.np-ticker .np-container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.np-ticker__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.np-ticker__label {
  background: var(--np-primary);
  color: #fff;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.np-ticker__label::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 10px;
  background: var(--np-primary);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.np-ticker__track {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 24px;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}

.np-ticker__items {
  display: flex;
  gap: 50px;
  white-space: nowrap;
  animation: np-ticker-scroll 40s linear infinite;
}

.np-ticker__items:hover { animation-play-state: paused; }

.np-ticker__item {
  font-size: .82rem;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.np-ticker__item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--np-primary);
  flex-shrink: 0;
}

.np-ticker__item:hover { color: #fff; text-decoration: underline; }

@keyframes np-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── 7. Header ────────────────────────────────────────────────────────────── */

.np-header {
  position: relative;
  z-index: 200;
  background: var(--np-header-bg);
}

.np-header-main {
  background: var(--np-header-bg);
  border-bottom: 1px solid var(--np-divider);
  padding: 22px 0 20px;
}

.np-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

/* Logo */
.np-logo a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.np-logo__img,
.np-logo img {
  max-width: 100px;
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.np-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.np-logo__name {
  font-family: var(--np-font-serif);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--np-text);
  line-height: 1;
}

.np-logo__slogan {
  font-size: .68rem;
  color: var(--np-text-muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 500;
}

/* Header search */
.np-header-search {
  justify-self: center;
  width: 100%;
  max-width: 380px;
  display: flex;
  background: var(--np-bg);
  border: 1px solid var(--np-border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color var(--np-transition), box-shadow var(--np-transition);
}

.np-header-search:focus-within {
  border-color: var(--np-primary);
  box-shadow: 0 0 0 3px rgba(192,57,43,.12);
  background: #fff;
}

.np-header-search input[type="search"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 18px;
  font-size: .88rem;
  color: var(--np-text);
  font-family: var(--np-font-sans);
  outline: none;
}

.np-header-search input::placeholder { color: var(--np-text-subtle); }

.np-header-search button {
  background: transparent;
  border: none;
  color: var(--np-text-muted);
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--np-transition);
}

.np-header-search button:hover { color: var(--np-primary); }

/* Header social */
.np-header-social {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── 8. Social links ──────────────────────────────────────────────────────── */

.np-social-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.np-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--np-border);
  color: var(--np-text-muted);
  text-decoration: none;
  transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}

.np-social-link svg { width: 15px; height: 15px; }

.np-social-link:hover {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

.np-social-links--lg .np-social-link { width: 38px; height: 38px; }
.np-social-links--lg .np-social-link svg { width: 16px; height: 16px; }

.np-social-links--md .np-social-link {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
}
.np-social-links--md .np-social-link:hover {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

/* ── 9. Navigation ────────────────────────────────────────────────────────── */

.np-nav {
  background: var(--np-secondary);
  position: sticky;
  top: 0;
  z-index: 190;
  border-top: 3px solid var(--np-primary);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 8px rgba(0,0,0,.08);
}

.np-nav .np-container {
  display: flex;
  align-items: stretch;
  position: relative;
  min-height: 46px;
}

.np-menu {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow: visible;
  margin: 0;
  padding: 0;
  list-style: none;
}

.np-menu__item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.np-menu__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 18px;
  height: 100%;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color var(--np-transition), border-color var(--np-transition), background var(--np-transition);
}

.np-menu__link:hover,
.np-menu__item.is-active > .np-menu__link,
.np-menu__item:hover > .np-menu__link {
  color: #fff;
  border-bottom-color: var(--np-primary);
  background: rgba(255,255,255,.04);
}

.np-menu__arrow {
  margin-left: 4px;
  opacity: .7;
  transition: transform var(--np-transition);
}

.np-menu__item.has-dropdown:hover .np-menu__arrow { transform: rotate(180deg); }

/* Dropdown */
.np-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--np-border);
  border-top: 3px solid var(--np-primary);
  border-radius: 0 0 var(--np-radius-md) var(--np-radius-md);
  box-shadow: var(--np-shadow);
  z-index: 300;
  padding: 6px 0;
  margin: 0;
  list-style: none;
}

.np-menu__item:hover > .np-dropdown { display: block; }

.np-dropdown__link {
  display: block;
  padding: 10px 18px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--np-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}

.np-dropdown__link:hover,
.np-dropdown__link.is-active {
  background: var(--np-bg);
  color: var(--np-primary);
  border-left-color: var(--np-primary);
}

/* Mobile hamburger */
.np-mobile-toggle {
  display: none;
  margin-left: auto;
  align-self: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px var(--np-gutter);
  color: #fff;
  flex-direction: column;
  gap: 4px;
}

.np-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--np-transition), opacity var(--np-transition);
}

.np-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.np-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.np-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── 10. Hero ─────────────────────────────────────────────────────────────── */

.np-hero {
  padding: 32px 0 8px;
  background: var(--np-bg);
}

.np-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hero main card */
.np-hero__card {
  position: relative;
  display: block;
  background: var(--np-secondary);
  border-radius: var(--np-radius-lg);
  overflow: hidden;
  min-height: 480px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--np-shadow);
  transition: box-shadow var(--np-transition);
}

.np-hero__card:hover { box-shadow: var(--np-shadow-md); }

.np-hero__img-wrap {
  position: absolute;
  inset: 0;
}

.np-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.np-hero__card:hover .np-hero__img { transform: scale(1.04); }

.np-hero__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.55) 45%,
    rgba(0,0,0,.05) 100%
  );
  pointer-events: none;
}

.np-hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 36px;
  z-index: 2;
}

.np-hero__content .np-cat-label { margin-bottom: 14px; background: var(--np-primary); }

.np-hero__title {
  font-family: var(--np-font-serif);
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.np-hero__excerpt {
  color: rgba(255,255,255,.88);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 620px;
}

.np-hero__content .np-post-meta {
  color: rgba(255,255,255,.78);
  margin-top: 0;
}

.np-hero__content .np-post-meta a { color: rgba(255,255,255,.85); }
.np-hero__content .np-post-meta a:hover { color: #fff; }
.np-hero__content .np-post-meta svg { opacity: .7; }

/* Hero side cards — horizontal row below the main card */
.np-hero__side {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.np-hero__side-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-md);
  overflow: hidden;
  transition: box-shadow var(--np-transition), transform var(--np-transition);
}

.np-hero__side-card:last-child { border-bottom: none; }
.np-hero__side-card:hover { box-shadow: var(--np-shadow); transform: translateY(-2px); }

.np-hero__side-img {
  width: 100%;
  height: 160px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--np-divider);
}

.np-hero__side-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.np-hero__side-card > div:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.np-hero__side-title {
  font-family: var(--np-font-serif);
  font-size: 1rem;
  font-weight: 800;
  color: var(--np-text);
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--np-transition);
}

.np-hero__side-card:hover .np-hero__side-title { color: var(--np-primary); }

.np-hero__side-date {
  font-size: .72rem;
  color: var(--np-text-subtle);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

/* ── 11. Home layout ──────────────────────────────────────────────────────── */

.np-home { padding-bottom: 56px; }

.np-home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}

.np-home-main { min-width: 0; }
.np-home-sidebar { min-width: 0; position: sticky; top: 70px; }

.np-latest { padding: 36px 0 0; }

.np-cat-section { padding: 36px 0 0; }

/* ── 12. Posts grid (np-posts-grid--N) ───────────────────────────────────── */

.np-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
  margin-bottom: 8px;
}

.np-posts-grid--1 { grid-template-columns: 1fr; }
.np-posts-grid--2 { grid-template-columns: repeat(2, 1fr); }
.np-posts-grid--3 { grid-template-columns: repeat(3, 1fr); }
.np-posts-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* In the home main column (with sidebar), force horizontal stack between latest items */
.np-home-main .np-latest .np-post-card--horizontal + .np-post-card--horizontal {
  margin-top: 22px;
}

.np-home-main .np-post-card--horizontal,
.np-home-main .np-post-card--horizontal + .np-post-card--horizontal {
  margin-bottom: 22px;
}

/* ── 13. Post card (post-card.php) ────────────────────────────────────────── */

.np-post-card {
  background: var(--np-card-bg);
  border-radius: var(--np-radius-md);
  overflow: hidden;
  border: 1px solid var(--np-border);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--np-transition), transform var(--np-transition), border-color var(--np-transition);
  position: relative;
}

.np-post-card:hover {
  box-shadow: var(--np-shadow);
  transform: translateY(-2px);
  border-color: #d4d4d4;
}

.np-post-card__img-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.np-post-card__img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--np-divider);
  position: relative;
}

.np-post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s ease;
}

.np-post-card:hover .np-post-card__img { transform: scale(1.06); }

.np-post-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.np-post-card__title {
  font-family: var(--np-font-serif);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--np-text);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -.005em;
}

.np-post-card__title a {
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--np-transition);
}

.np-post-card__title a:hover { color: var(--np-primary); }

.np-post-card__excerpt {
  font-size: .88rem;
  color: var(--np-text-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-post-card__body .np-post-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--np-divider);
  font-size: .74rem;
}

/* Horizontal variant — used on home latest list and search results */
.np-post-card--horizontal {
  flex-direction: row;
  align-items: stretch;
}

.np-post-card--horizontal .np-post-card__img-link {
  flex-shrink: 0;
  width: 280px;
}

.np-post-card--horizontal .np-post-card__img-wrap {
  aspect-ratio: auto;
  height: 100%;
  min-height: 180px;
}

.np-post-card--horizontal .np-post-card__body {
  padding: 18px 22px;
  flex: 1;
}

.np-post-card--horizontal .np-post-card__title {
  font-size: 1.25rem;
}

.np-post-card--horizontal .np-post-card__title a {
  -webkit-line-clamp: 2;
}

/* ── 14. Sidebar widgets ──────────────────────────────────────────────────── */

.np-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.np-widget {
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-md);
  overflow: hidden;
}

.np-widget__title {
  font-family: var(--np-font-sans);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #fff;
  background: var(--np-secondary);
  padding: 12px 16px;
  margin: 0;
  position: relative;
  border-bottom: 3px solid var(--np-primary);
}

/* Popular posts widget */
.np-popular-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--np-divider);
  align-items: start;
  transition: background var(--np-transition);
}

.np-popular-item:last-child { border-bottom: none; }
.np-popular-item:hover { background: var(--np-hover-bg); }

.np-popular-num {
  font-family: var(--np-font-serif);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--np-text-subtle);
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.np-popular-item:nth-child(1) .np-popular-num,
.np-popular-item:nth-child(2) .np-popular-num,
.np-popular-item:nth-child(3) .np-popular-num {
  color: var(--np-primary);
}

.np-popular-item > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.np-popular-item .np-cat-label { align-self: flex-start; }

.np-popular-title {
  font-family: var(--np-font-serif);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--np-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--np-transition);
}

.np-popular-item:hover .np-popular-title { color: var(--np-primary); }

.np-popular-date {
  font-size: .7rem;
  color: var(--np-text-subtle);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Categories widget (ul) */
.np-widget-cats {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.np-widget-cats li { margin: 0; }

.np-widget-cats li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--np-divider);
  text-decoration: none;
  color: var(--np-text);
  font-size: .88rem;
  font-weight: 500;
  transition: background var(--np-transition), color var(--np-transition), padding-left var(--np-transition);
}

.np-widget-cats li:last-child a { border-bottom: none; }

.np-widget-cats li a:hover,
.np-widget-cats li a.is-active {
  background: var(--np-hover-bg);
  color: var(--np-primary);
  padding-left: 22px;
}

.np-widget-cat-count {
  font-size: .72rem;
  color: var(--np-text-muted);
  background: var(--np-bg);
  border: 1px solid var(--np-divider);
  border-radius: 999px;
  padding: 1px 9px;
  min-width: 30px;
  text-align: center;
  font-weight: 600;
}

.np-widget-cats li a:hover .np-widget-cat-count {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

/* ── 15. Breadcrumbs ──────────────────────────────────────────────────────── */

.np-breadcrumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  color: var(--np-text-muted);
  padding: 16px 0 12px;
  max-width: 100%;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 500;
}

.np-breadcrumbs a {
  color: var(--np-text-muted);
  text-decoration: none;
}
.np-breadcrumbs a:hover { color: var(--np-primary); text-decoration: underline; }

.np-breadcrumbs > span:last-child { color: var(--np-text); font-weight: 600; }

.np-bc-sep {
  color: var(--np-text-subtle);
  font-size: .8rem;
  font-weight: 400;
}

/* ── 16. Single post ──────────────────────────────────────────────────────── */

.np-single { padding: 8px 0 56px; background: var(--np-bg); }

.np-single__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.np-single__main { min-width: 0; }

.np-single__sidebar {
  position: sticky;
  top: 70px;
}

.np-article {
  background: var(--np-card-bg);
  border-radius: var(--np-radius-md);
  overflow: hidden;
  border: 1px solid var(--np-border);
  padding: 40px 44px;
}

.np-article > .np-cat-label--lg,
.np-article > .np-cat-label {
  margin-bottom: 16px;
}

.np-article__title {
  font-family: var(--np-font-serif);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--np-text);
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 16px;
}

.np-article__deck {
  font-family: var(--np-font-serif);
  font-size: 1.2rem;
  color: var(--np-text-muted);
  line-height: 1.5;
  margin: 0 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--np-divider);
  font-weight: 400;
  font-style: italic;
}

.np-article > .np-post-meta {
  font-size: .82rem;
  margin: 0 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--np-divider);
}

/* Hero image — full-bleed within padded card */
.np-article__hero-img {
  margin: 0 -44px 30px;
}

.np-article__hero-img img,
.np-article__img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  display: block;
}

.np-article__hero-img figcaption {
  font-size: .8rem;
  color: var(--np-text-muted);
  padding: 10px 44px 0;
  font-style: italic;
}

/* Article content typography */
.np-article__content {
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--np-text);
  font-family: var(--np-font-sans);
}

.np-article__content > p:first-of-type::first-letter {
  font-family: var(--np-font-serif);
  font-size: 4.2rem;
  font-weight: 900;
  float: left;
  line-height: .95;
  margin: 6px 12px 0 0;
  color: var(--np-primary);
}

.np-article__content h2 {
  font-family: var(--np-font-serif);
  font-size: 1.55rem;
  font-weight: 800;
  margin: 2.4rem 0 .9rem;
  color: var(--np-text);
  line-height: 1.25;
  border-left: 4px solid var(--np-primary);
  padding-left: 14px;
}

.np-article__content h3 {
  font-family: var(--np-font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 1.8rem 0 .7rem;
  color: var(--np-text);
}

.np-article__content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.4rem 0 .5rem;
}

.np-article__content p { margin: 0 0 1.3rem; }

.np-article__content a {
  color: var(--np-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.np-article__content a:hover { color: var(--np-primary); text-decoration-thickness: 2px; }

.np-article__content blockquote {
  border-left: 4px solid var(--np-primary);
  margin: 2rem 0;
  padding: 18px 24px;
  background: var(--np-bg);
  font-family: var(--np-font-serif);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--np-text);
  line-height: 1.5;
}

.np-article__content blockquote p:last-child { margin-bottom: 0; }

.np-article__content ul,
.np-article__content ol {
  margin: 0 0 1.3rem 1.6rem;
  padding: 0;
}

.np-article__content ul { list-style: disc; }
.np-article__content ol { list-style: decimal; }
.np-article__content li { margin-bottom: .5rem; }

.np-article__content pre,
.np-article__content code {
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  background: #f6f8fa;
  font-size: .92em;
  border-radius: var(--np-radius-md);
}

.np-article__content code { padding: 2px 6px; }

.np-article__content pre {
  padding: 18px;
  overflow-x: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--np-border);
  line-height: 1.55;
}

.np-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: .92rem;
}

.np-article__content th,
.np-article__content td {
  padding: 11px 14px;
  text-align: left;
  border: 1px solid var(--np-border);
}

.np-article__content th { background: var(--np-bg); font-weight: 700; }
.np-article__content tr:nth-child(even) td { background: #fafafa; }

/* Images inside article — always contained */
.np-article__content img,
.np-article__content figure,
.np-article__content .wp-block-image,
.np-article__content .wp-block-gallery,
.np-article__content .wp-block-gallery img,
.np-article__content .wp-block-image img {
  max-width: 100% !important;
  height: auto;
}

.np-article__content figure { margin: 1.6rem 0; }

.np-article__content figcaption {
  font-size: .82rem;
  color: var(--np-text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* Tags */
.np-article__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--np-divider);
}

.np-article__tags-label {
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--np-text-muted);
  margin-right: 4px;
}

.np-tag {
  display: inline-block;
  padding: 5px 13px;
  background: var(--np-bg);
  border: 1px solid var(--np-border);
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--np-text-muted);
  text-decoration: none;
  transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}

.np-tag:hover {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

/* Author card inside article */
.np-article__author-card { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--np-divider); }

.np-author-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 20px;
  align-items: start;
  background: var(--np-bg);
  border-left: 4px solid var(--np-primary);
  padding: 22px;
  border-radius: 0 var(--np-radius-md) var(--np-radius-md) 0;
}

.np-author-card__avatar img,
.np-author-card__avatar .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--np-divider);
}

.np-author-card__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.np-author-card__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--np-text-muted);
  font-weight: 700;
}

.np-author-card__name {
  font-family: var(--np-font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--np-text);
  text-decoration: none;
  margin: 0;
  display: inline-block;
  align-self: flex-start;
  transition: color var(--np-transition);
}

.np-author-card__name:hover { color: var(--np-primary); }

.np-author-card__bio {
  font-size: .88rem;
  color: var(--np-text-muted);
  line-height: 1.55;
  margin: 4px 0 8px;
}

.np-author-card__social { display: flex; gap: 10px; }

.np-author-card__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--np-border);
  color: var(--np-text-muted);
  transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}

.np-author-card__social-link svg { width: 14px; height: 14px; }

.np-author-card__social-link:hover {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

/* ── 17. Author profile (full author page) ────────────────────────────────── */

.np-author-profile { padding: 30px 0; background: var(--np-bg); }

.np-author-profile__card {
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-top: 4px solid var(--np-primary);
  border-radius: var(--np-radius-md);
  padding: 32px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  align-items: start;
}

.np-author-profile__avatar img,
.np-author-profile__avatar .avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--np-divider);
}

.np-author-profile__info { min-width: 0; }

.np-author-profile__role {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--np-primary);
  font-weight: 800;
  margin-bottom: 6px;
  display: block;
}

.np-author-profile__name {
  font-family: var(--np-font-serif);
  font-size: 2rem;
  font-weight: 900;
  color: var(--np-text);
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.np-author-profile__bio {
  font-size: .98rem;
  color: var(--np-text-muted);
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 720px;
}

.np-author-profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: .82rem;
  color: var(--np-text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--np-divider);
}

.np-author-profile__meta a { color: var(--np-primary); font-weight: 600; }

.np-author-profile__social { display: flex; flex-wrap: wrap; gap: 8px; }

.np-author-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--np-bg);
  border: 1px solid var(--np-border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--np-text);
  text-decoration: none;
  transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}

.np-author-social-btn svg { width: 14px; height: 14px; }

.np-author-social-btn:hover {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
}

.np-author-archive { padding: 36px 0; background: var(--np-bg); }

/* ── 18. Related posts ────────────────────────────────────────────────────── */

.np-related { margin-top: 40px; }
.np-related .np-section-title { color: var(--np-text); }

/* ── 19. Archive ──────────────────────────────────────────────────────────── */

.np-archive { padding: 8px 0 56px; }

.np-archive-header {
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-left: 5px solid var(--np-primary);
  border-radius: var(--np-radius-md);
  padding: 26px 30px;
  margin-bottom: 30px;
}

.np-archive-header__title {
  font-family: var(--np-font-serif);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--np-text);
  margin: 0 0 8px;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.np-archive-header__desc {
  font-size: .98rem;
  color: var(--np-text-muted);
  line-height: 1.55;
  margin: 0 0 8px;
  max-width: 720px;
}

.np-archive-header__count {
  display: inline-block;
  font-size: .76rem;
  color: var(--np-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.np-archive__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.np-archive__main { min-width: 0; }

.np-archive__featured { margin-bottom: 26px; }

.np-archive__featured-link {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--np-transition);
}

.np-archive__featured-link:hover { box-shadow: var(--np-shadow); }

.np-archive__featured-img {
  overflow: hidden;
  background: var(--np-divider);
  aspect-ratio: 16 / 11;
}

.np-archive__featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}

.np-archive__featured-link:hover .np-archive__featured-img img { transform: scale(1.04); }

.np-archive__featured-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.np-archive__featured-title {
  font-family: var(--np-font-serif);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--np-text);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--np-transition);
}

.np-archive__featured-link:hover .np-archive__featured-title { color: var(--np-primary); }

.np-archive__featured-body p {
  font-size: .94rem;
  color: var(--np-text-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 20. Categories list page ─────────────────────────────────────────────── */

.np-categories-list { padding: 36px 0 56px; }

.np-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.np-cat-card {
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-md);
  overflow: hidden;
  transition: box-shadow var(--np-transition), transform var(--np-transition);
}

.np-cat-card:hover {
  box-shadow: var(--np-shadow);
  transform: translateY(-3px);
}

.np-cat-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.np-cat-card__img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--np-secondary);
}

.np-cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease, opacity var(--np-transition);
  opacity: .9;
}

.np-cat-card:hover .np-cat-card__img img {
  transform: scale(1.05);
  opacity: 1;
}

.np-cat-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--np-secondary) 0%, #2a2a2a 100%);
}

.np-cat-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.15) 65%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  z-index: 1;
  pointer-events: none;
}

.np-cat-card__name {
  font-family: var(--np-font-serif);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.15;
  letter-spacing: -.005em;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.np-cat-card__count {
  font-size: .74rem;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.np-cat-card__subs {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--np-divider);
  background: var(--np-card-bg);
}

.np-cat-card__subs li { margin: 0; }

.np-cat-card__subs a {
  display: inline-block;
  font-size: .74rem;
  color: var(--np-text-muted);
  background: var(--np-bg);
  padding: 3px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--np-transition), color var(--np-transition);
}

.np-cat-card__subs a:hover {
  background: var(--np-primary);
  color: #fff;
}

/* ── 21. 404 page ─────────────────────────────────────────────────────────── */

.np-404 { padding: 70px 0; background: var(--np-bg); }
.np-404__inner { max-width: 720px; margin: 0 auto; text-align: center; }

.np-404__code {
  font-family: var(--np-font-serif);
  font-size: 8rem;
  font-weight: 900;
  color: var(--np-primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -.04em;
}

.np-404__title {
  font-family: var(--np-font-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--np-text);
  margin: 0 0 12px;
}

.np-404__desc {
  font-size: 1rem;
  color: var(--np-text-muted);
  margin: 0 auto 26px;
  max-width: 480px;
}

.np-404__search {
  max-width: 440px;
  margin: 0 auto 28px;
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: 999px;
  overflow: hidden;
}

.np-404__search input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  font-size: .95rem;
  outline: none;
  font-family: var(--np-font-sans);
  background: transparent;
}

.np-404__search button {
  padding: 12px 24px;
  background: var(--np-primary);
  color: #fff;
  border: none;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--np-font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background var(--np-transition);
}

.np-404__search button:hover { background: #a93226; }

.np-404__suggestions {
  margin-top: 50px;
  text-align: left;
}

.np-404__suggestions h2 {
  font-family: var(--np-font-sans);
  font-size: .9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--np-text);
  border-bottom: 2px solid var(--np-secondary);
  padding-bottom: 10px;
  margin: 0 0 22px;
}

/* ── 22. Search results ───────────────────────────────────────────────────── */

.np-search-results { padding: 8px 0 56px; }

.np-search-header { margin-bottom: 22px; }

.np-search-header__title {
  font-family: var(--np-font-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--np-text);
  margin: 0 0 6px;
  line-height: 1.2;
}

.np-search-header__title span { color: var(--np-primary); }

.np-search-header__count {
  font-size: .82rem;
  color: var(--np-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

.np-search-bar {
  display: flex;
  margin-bottom: 28px;
  max-width: 580px;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: 999px;
  overflow: hidden;
}

.np-search-bar input {
  flex: 1;
  padding: 11px 20px;
  border: none;
  font-size: .92rem;
  outline: none;
  font-family: var(--np-font-sans);
  background: transparent;
}

.np-search-bar button {
  padding: 11px 24px;
  background: var(--np-primary);
  color: #fff;
  border: none;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--np-font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background var(--np-transition);
}

.np-search-bar button:hover { background: #a93226; }

.np-search-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── 23. No results ───────────────────────────────────────────────────────── */

.np-no-results {
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-md);
  padding: 60px 32px;
  text-align: center;
}

.np-no-results svg {
  margin: 0 auto 14px;
  color: var(--np-text-subtle);
  opacity: .55;
}

.np-no-results h2 {
  font-family: var(--np-font-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--np-text);
  margin: 0 0 8px;
}

.np-no-results p {
  color: var(--np-text-muted);
  margin: 0 0 18px;
}

/* ── 24. Pagination (paginate_links 'list' output) ───────────────────────── */

.np-pagination {
  padding: 32px 0 8px;
  display: flex;
  justify-content: center;
}

.np-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.np-pagination .page-numbers li { margin: 0; }

.np-pagination a.page-numbers,
.np-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--np-radius-md);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  color: var(--np-text);
  transition: background var(--np-transition), color var(--np-transition), border-color var(--np-transition);
}

.np-pagination a.page-numbers:hover {
  background: var(--np-bg);
  border-color: var(--np-primary);
  color: var(--np-primary);
}

.np-pagination span.current,
.np-pagination .page-numbers.current {
  background: var(--np-primary);
  border-color: var(--np-primary);
  color: #fff;
  cursor: default;
}

.np-pagination .page-numbers.dots {
  background: transparent;
  border: none;
  color: var(--np-text-muted);
}

/* ── 25. Ads ──────────────────────────────────────────────────────────────── */

.np-ad {
  text-align: center;
  margin: 24px 0;
  font-family: var(--np-font-sans);
}

.np-ad__label {
  display: block;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--np-text-subtle);
  margin-bottom: 6px;
  font-weight: 600;
}

.np-ad__code,
.np-ad img,
.np-ad iframe {
  max-width: 100%;
  display: inline-block;
}

.np-ad__images {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.np-ad__images img {
  max-width: 100%;
  height: auto;
  display: block;
}

.np-ad--header_banner,
.np-ad--nav_banner,
.np-ad--footer_banner {
  background: var(--np-bg);
  padding: 14px 0;
  margin: 0;
  border-top: 1px solid var(--np-divider);
  border-bottom: 1px solid var(--np-divider);
}

.np-ad--sidebar_top,
.np-ad--sidebar_mid {
  margin: 0;
  padding: 14px;
  background: var(--np-card-bg);
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-md);
}

.np-ad--in_article {
  margin: 30px 0;
  padding: 14px 0;
  border-top: 1px dashed var(--np-border);
  border-bottom: 1px dashed var(--np-border);
}

.np-ad--hide-mobile { display: block; }
.np-ad--hide-desktop { display: none; }

/* Popup */
.np-ad--popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.78);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.np-ad--popup.is-open { display: flex; }

.np-ad--popup .np-ad__code,
.np-ad--popup img {
  background: #fff;
  border-radius: var(--np-radius-lg);
  padding: 20px;
  max-width: 700px;
  max-height: 90vh;
  position: relative;
  box-shadow: var(--np-shadow-md);
  overflow: auto;
}

.np-ad__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--np-secondary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: background var(--np-transition), transform var(--np-transition);
}

.np-ad__close:hover { background: var(--np-primary); transform: scale(1.05); }

/* ── 26. Footer ───────────────────────────────────────────────────────────── */

.np-footer {
  background: var(--np-footer-bg);
  color: rgba(255,255,255,.7);
  font-family: var(--np-font-sans);
  font-size: .9rem;
  margin-top: 40px;
}

.np-footer__main {
  padding: 56px 0 36px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.np-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 44px;
}

.np-footer__col-title {
  font-family: var(--np-font-sans);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #fff;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--np-primary);
  display: inline-block;
}

.np-footer__col--brand .np-footer__logo {
  max-height: 50px;
  margin-bottom: 16px;
  opacity: .95;
}

.np-footer__site-name {
  font-family: var(--np-font-serif);
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 14px;
  letter-spacing: -.01em;
}

.np-footer__about {
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin: 0 0 18px;
  font-size: .88rem;
  max-width: 380px;
}

.np-footer__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.np-footer__links li { margin: 0; }

.np-footer__links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  padding: 4px 0;
  display: inline-block;
  transition: color var(--np-transition), padding-left var(--np-transition);
  position: relative;
}

.np-footer__links a:hover {
  color: #fff;
  padding-left: 10px;
}

.np-footer__links a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--np-primary);
  transform: translateY(-50%);
  transition: width var(--np-transition);
}

.np-footer__links a:hover::before { width: 6px; }

/* Newsletter inside footer */
.np-footer__newsletter { margin-top: 18px; }

.np-footer__newsletter > p {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin: 0 0 10px;
}

.np-newsletter-form {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
  max-width: 320px;
}

.np-newsletter-form input[type="email"] {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: .85rem;
  outline: none;
  font-family: var(--np-font-sans);
}

.np-newsletter-form input::placeholder { color: rgba(255,255,255,.4); }

.np-newsletter-form button {
  padding: 10px 18px;
  background: var(--np-primary);
  border: none;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--np-font-sans);
  transition: background var(--np-transition);
}

.np-newsletter-form button:hover { background: #a93226; }

/* Footer bottom */
.np-footer__bottom {
  padding: 18px 0;
}

.np-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.np-footer__copyright {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  margin: 0;
}

.np-footer__legal-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.np-footer__legal-links li { margin: 0; }

.np-footer__legal-links a {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color var(--np-transition);
}

.np-footer__legal-links a:hover { color: #fff; }

/* ── 27. Latest posts widget shortcode ────────────────────────────────────── */

.np-latest-widget { padding: 16px 0; }

/* ── 28. Buttons ──────────────────────────────────────────────────────────── */

.np-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--np-radius-md);
  font-size: .84rem;
  font-weight: 700;
  font-family: var(--np-font-sans);
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background var(--np-transition), color var(--np-transition), box-shadow var(--np-transition), transform var(--np-transition);
}

.np-btn--primary {
  background: var(--np-primary);
  color: #fff;
}

.np-btn--primary:hover {
  background: #a93226;
  color: #fff;
  box-shadow: 0 6px 16px rgba(192,57,43,.32);
  transform: translateY(-1px);
}

.np-btn--outline {
  background: transparent;
  color: var(--np-text);
  border: 1px solid var(--np-border);
}

.np-btn--outline:hover {
  background: var(--np-text);
  color: #fff;
  border-color: var(--np-text);
}

/* ── 29. Reading progress bar (hooked from JS) ────────────────────────────── */

.np-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--np-primary);
  z-index: 9998;
  width: 0%;
  transition: width .1s linear;
}

/* ── 30. Responsive — 1100px ─────────────────────────────────────────────── */

@media (max-width: 1100px) {
  :root { --np-gutter: 22px; }

  .np-posts-grid--4 { grid-template-columns: repeat(3, 1fr); }
  .np-posts-grid--3 { grid-template-columns: repeat(3, 1fr); }

  .np-hero__title { font-size: 2rem; }
  .np-article__title { font-size: 2.1rem; }
}

/* ── 31. Responsive — 980px ──────────────────────────────────────────────── */

@media (max-width: 980px) {
  .np-archive__layout,
  .np-single__layout {
    grid-template-columns: 1fr;
  }

  .np-single__sidebar {
    position: static;
    order: 2;
  }

  .np-hero__side {
    grid-template-columns: 1fr;
  }

  .np-archive__featured-link {
    grid-template-columns: 1fr;
  }

  .np-archive__featured-img { aspect-ratio: 16 / 9; }

  .np-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .np-posts-grid--3,
  .np-posts-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .np-author-profile__card {
    grid-template-columns: 100px 1fr;
    gap: 22px;
    padding: 24px;
  }

  .np-author-profile__avatar img,
  .np-author-profile__avatar .avatar {
    width: 100px;
    height: 100px;
  }

  .np-author-profile__name { font-size: 1.65rem; }
}

/* ── 32. Responsive — 768px ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Header */
  .np-header-inner {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .np-header-search {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .np-header-social { display: none; }

  .np-logo__name { font-size: 1.5rem; }
  .np-logo { text-align: center; }
  .np-logo a { justify-content: center; }

  /* Nav */
  .np-nav { position: static; }

  .np-mobile-toggle { display: flex; }

  .np-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--np-secondary);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    box-shadow: var(--np-shadow);
  }

  .np-menu.is-open { display: flex; }

  .np-menu__item {
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  .np-menu__link {
    padding: 14px var(--np-gutter);
    height: auto;
    border-bottom: none;
    margin-bottom: 0;
    justify-content: space-between;
    width: 100%;
  }

  .np-menu__link:hover,
  .np-menu__item.is-active > .np-menu__link {
    border-bottom: none;
    background: rgba(255,255,255,.05);
  }

  .np-dropdown {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,.06);
    border-radius: 0;
    background: rgba(0,0,0,.35);
    padding: 0;
  }

  .np-dropdown__link {
    color: rgba(255,255,255,.78);
    padding: 11px var(--np-gutter) 11px calc(var(--np-gutter) + 18px);
    border-left: none;
  }

  .np-dropdown__link:hover {
    background: rgba(255,255,255,.05);
    border-left: none;
    color: #fff;
  }

  /* Hero */
  .np-hero__card { min-height: 360px; }
  .np-hero__content { padding: 22px; }
  .np-hero__title { font-size: 1.5rem; }
  .np-hero__excerpt { font-size: .92rem; -webkit-line-clamp: 3; }

  .np-hero__side { grid-template-columns: 1fr; }
  .np-hero__side-card { flex-direction: row; }
  .np-hero__side-img { width: 100px; height: 80px; }

  /* Grids */
  .np-posts-grid,
  .np-posts-grid--2,
  .np-posts-grid--3,
  .np-posts-grid--4 {
    grid-template-columns: 1fr;
  }

  /* Horizontal cards stack */
  .np-post-card--horizontal {
    flex-direction: column;
  }

  .np-post-card--horizontal .np-post-card__img-link {
    width: 100%;
  }

  .np-post-card--horizontal .np-post-card__img-wrap {
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
  }

  .np-post-card--horizontal .np-post-card__title { font-size: 1.05rem; }

  /* Article */
  .np-article {
    padding: 24px 22px;
  }

  .np-article__title { font-size: 1.65rem; }
  .np-article__deck { font-size: 1.05rem; }
  .np-article__content { font-size: 1rem; }
  .np-article__content > p:first-of-type::first-letter { font-size: 3.4rem; }

  .np-article__hero-img { margin: 0 -22px 22px; }
  .np-article__hero-img figcaption { padding: 8px 22px 0; }

  /* Author profile */
  .np-author-profile__card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 26px 20px;
  }

  .np-author-profile__avatar {
    margin: 0 auto;
  }

  .np-author-profile__avatar img,
  .np-author-profile__avatar .avatar {
    margin: 0 auto;
  }

  .np-author-profile__meta { justify-content: center; }
  .np-author-profile__social { justify-content: center; }

  .np-author-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 22px;
    border-left: none;
    border-top: 4px solid var(--np-primary);
    border-radius: var(--np-radius-md);
  }

  .np-author-card__avatar { display: flex; justify-content: center; }
  .np-author-card__social { justify-content: center; }

  /* Archive */
  .np-archive-header { padding: 22px; }
  .np-archive-header__title { font-size: 1.6rem; }

  .np-archive__featured-body { padding: 22px; }
  .np-archive__featured-title { font-size: 1.3rem; }

  /* Footer */
  .np-footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .np-footer__about { max-width: 100%; }
  .np-newsletter-form { max-width: 100%; }

  .np-footer__bottom-inner { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Categories list */
  .np-cats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .np-cat-card__name { font-size: 1.15rem; }

  /* 404 */
  .np-404__code { font-size: 5.5rem; }

  /* Hide ticker label arrow on small screens to avoid clipping issues */
  .np-ticker__label { padding: 0 12px; font-size: .65rem; }
}

/* ── 33. Responsive — 480px ──────────────────────────────────────────────── */

@media (max-width: 480px) {
  :root { --np-gutter: 16px; }

  .np-logo__name { font-size: 1.3rem; }
  .np-logo__slogan { font-size: .62rem; }

  .np-section-title { font-size: .92rem; }

  .np-hero { padding-top: 22px; }
  .np-hero__card { min-height: 300px; }
  .np-hero__content { padding: 18px; }
  .np-hero__title { font-size: 1.25rem; }
  .np-hero__excerpt { display: none; }

  .np-article { padding: 18px 16px; }
  .np-article__title { font-size: 1.4rem; }
  .np-article__deck { font-size: .95rem; }
  .np-article__hero-img { margin: 0 -16px 18px; }
  .np-article__hero-img figcaption { padding: 8px 16px 0; }
  .np-article__content > p:first-of-type::first-letter {
    font-size: 2.8rem;
    margin: 4px 8px 0 0;
  }

  .np-cats-grid { grid-template-columns: 1fr; }

  .np-pagination a.page-numbers,
  .np-pagination span.page-numbers {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: .8rem;
  }

  .np-404__code { font-size: 4.2rem; }
  .np-404__title { font-size: 1.4rem; }
  .np-404__search { flex-direction: column; border-radius: var(--np-radius-md); }
  .np-404__search button { width: 100%; }

  .np-archive-header__title { font-size: 1.4rem; }

  .np-author-card { padding: 18px; }
  .np-author-card__name { font-size: 1.1rem; }

  .np-search-bar { flex-direction: column; border-radius: var(--np-radius-md); }
  .np-search-bar button { width: 100%; }

  .np-ticker { height: 32px; }
  .np-ticker__items { gap: 30px; animation-duration: 28s; }
  .np-ticker__item { font-size: .76rem; }
}

/* ── 34. Print ────────────────────────────────────────────────────────────── */

@media print {
  .np-header,
  .np-nav,
  .np-ticker,
  .np-sidebar,
  .np-home-sidebar,
  .np-single__sidebar,
  .np-footer,
  .np-related,
  .np-ad,
  .np-pagination,
  .np-mobile-toggle,
  .np-reading-bar { display: none !important; }

  .np-single__layout,
  .np-archive__layout,
  .np-home-layout { grid-template-columns: 1fr; }

  .np-article {
    border: none;
    padding: 0;
  }

  .np-article__content a::after {
    content: ' (' attr(href) ')';
    font-size: .75em;
    color: #555;
  }
}

/* ── 35. Image cover fix — ensures contained images always fill their wrappers ─
   Root cause: .np-wrap img { height: auto } has specificity (0,1,1) which beats
   .np-post-card__img { height: 100% } at (0,1,0). Using !important here is the
   correct fix to guarantee cover behaviour without touching the base reset rule. */

.np-post-card__img-wrap img,
.np-hero__img-wrap img,
.np-hero__side-img img,
.np-cat-card__img img,
.np-archive__featured-img img,
.np-latest-widget__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

/* ── 35b. Global overflow safety net ──────────────────────────────────────── */

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.np-wrap {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── 36. Hide duplicate page titles, dates & breadcrumbs ──────────────────── */
/*
   When the plugin's shortcodes render their own content, themes / Elementor
   often still output a page title, post-info bar and breadcrumb above it.
   We hide those duplicates so only the plugin's UI is visible.
*/

body.home .entry-title,
body.home .entry-date,
body.home .posted-on,
body.home .entry-meta,
body.home .entry-header,
body.home .page-header,
body.home .np-article__title,
body.home .np-article__deck,
body.home .np-article > .np-post-meta,
body.np-shortcode-active .entry-title,
body.np-shortcode-active .page-title,
body.np-shortcode-active .post-title,
body.np-shortcode-active header.entry-header,
body.np-shortcode-active .entry-meta,
body.np-shortcode-active .post-meta,
body.np-shortcode-active .elementor-widget-theme-post-title,
body.np-shortcode-active .elementor-widget-post-title,
body.np-shortcode-active .elementor-widget-post-info,
body.np-shortcode-active .elementor-widget-breadcrumbs,
body.np-shortcode-active .elementor-widget-theme-archive-title,
body.np-shortcode-active .elementor-widget-archive-title,
body.np-shortcode-active .elementor-widget-archive-posts,
body.np-shortcode-active .elementor-page-title,
body.np-shortcode-active .breadcrumbs,
body.np-shortcode-active .breadcrumb,
body.np-shortcode-active .yoast-breadcrumbs,
body.np-shortcode-active #breadcrumbs,
body.np-shortcode-active .rank-math-breadcrumb {
  display: none !important;
}

/* Same hide rules for archive/search/author/404 contexts (no shortcode marker
   on those — Elementor renders them via Theme Builder). */
body.np-context-archive .elementor-widget-theme-archive-title,
body.np-context-archive .elementor-widget-archive-title,
body.np-context-archive .elementor-widget-breadcrumbs,
body.np-context-archive .elementor-widget-post-info,
body.np-context-archive .breadcrumbs,
body.np-context-archive .breadcrumb,
body.np-context-archive .yoast-breadcrumbs,
body.np-context-archive .page-title,
body.np-context-search .elementor-widget-breadcrumbs,
body.np-context-search .page-title,
body.np-context-search .breadcrumbs,
body.np-context-author .elementor-widget-breadcrumbs,
body.np-context-author .page-title,
body.np-context-author .breadcrumbs,
body.np-context-404   .elementor-widget-breadcrumbs,
body.np-context-404   .page-title,
body.np-context-404   .breadcrumbs {
  display: none !important;
}

/* Modern fallback using :has() — fires whenever any of our containers exist
   anywhere in the page, even without the body class. Safely no-op in browsers
   without :has() support. */
body:has(.np-home) .elementor-widget-breadcrumbs,
body:has(.np-home) .elementor-widget-post-info,
body:has(.np-home) .elementor-widget-theme-post-title,
body:has(.np-home) .elementor-page-title,
body:has(.np-home) > .breadcrumbs,
body:has(.np-archive) .elementor-widget-breadcrumbs,
body:has(.np-archive) .elementor-widget-theme-archive-title,
body:has(.np-archive) .elementor-page-title,
body:has(.np-single) .elementor-widget-theme-post-title,
body:has(.np-single) .elementor-widget-post-info,
body:has(.np-author-profile) .elementor-widget-theme-archive-title,
body:has(.np-author-profile) .elementor-widget-breadcrumbs,
body:has(.np-404) .elementor-widget-theme-archive-title,
body:has(.np-404) .elementor-widget-breadcrumbs,
body:has(.np-search) .elementor-widget-theme-archive-title,
body:has(.np-search) .elementor-widget-breadcrumbs {
  display: none !important;
}

/* ── 37. Reinforce object-fit: cover on all card / hero images ────────────── */

.np-wrap .np-hero__img,
.np-wrap .np-hero__side-img,
.np-wrap .np-post-card__img,
.np-wrap .np-post-card__thumb,
.np-wrap .np-post-card--horizontal img,
.np-wrap .np-latest__thumb,
.np-wrap .np-related__img,
.np-wrap .np-author__avatar,
.np-wrap .np-archive__img,
.np-wrap .np-search-result__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
