/*
Theme Name: News Pulse
Theme URI: https://ivstudio.de/
Description: Modern newsroom theme with custom news workflow, feeds, and embeddable widgets.
Version: 0.1.1
Author: Ilya Vishnevskiy
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: news-pulse
*/

:root {
  /* Neutral, professional palette */
  --bg: #f1f3f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  --text: #0f172a;
  --muted: #475569;

  --accent: #1e40af;
  --accent-2: #707789;

  --border: #cbd5e1;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.18);
  --focus: 3px solid rgba(30, 64, 175, 0.28);

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans",
    sans-serif;
  --font-news: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

  /* Button design (Customizer can override via inline CSS vars) */
  --np-btn-bg: var(--accent);
  --np-btn-text: #ffffff;
  --np-btn-radius: 999px;

  /* Standard button look (e.g. filters, pagination, sidebar links) */
  --np-btn-normal-bg-top: #ffffff;
  --np-btn-normal-bg-bottom: #f8fafc;
  --np-btn-normal-text: var(--text);

  /* Accent RGB helper for transparent hovers */
  --accent-rgb: 30 64 175;
}

html {
  /* Some mobile browsers apply horizontal scroll on the root element,
     even if body is clipped. */
  overflow-x: hidden;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: calc(14px * (var(--np-font-scale, 100%) / 100%));
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Safety net: prevent accidental horizontal scroll caused by max-content
     elements in nested grids (e.g. marquees/tracks). */
  overflow-x: hidden;
}

/* Better default focus (keyboard) */
:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* Headings / titles can be styled independently from body text */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--np-heading, var(--text));
}

a:hover,
a:focus {
  color: #15348a;
}

.site-header,.shell {
  max-width: 1480px;
  margin: 0 auto;
}

.shell {
  padding: 18px 14px 60px;
}

header.site-header {
  position: relative;
  z-index: 20;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.site-header-hero {
  position: relative;
  background: #000;
  background-size: cover;
  background-position: center;
  overflow: hidden;

  /* Customizer-controlled hero height */
  min-height: var(--np-header-hero-h, 400px);
}

@media (max-width: 640px) {
  .site-header-hero {
    min-height: var(--np-header-hero-h-mobile, 260px);
  }
}

.site-header-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0%), rgb(0 0 0 / 50%));
  pointer-events: none;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 14px 8px;
}

.ticker {
  position: relative;
  z-index: 1;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 6px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #fff;
}

.header-top {
align-items: flex-start;
        gap: 12px;
        display: flex;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
}

.brand-name {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-tagline {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}

.brand img {
  max-height: 56px;
  width: auto;
}

.header-actions {
  margin-left: auto;
  display: grid;
  gap: 8px;
  align-items: start;
}

/* Header customer menu (optional) */
.customer-nav a {
  background: rgba(255, 255, 255, 0.14);
}

.primary-nav ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-nav a {
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.primary-nav a:hover,
.primary-nav a:focus {
  background: rgba(255, 255, 255, 0.18);
}

/* Highlight active/current menu item */
.primary-nav li.current-menu-item > a,
.primary-nav li.current_page_item > a,
.primary-nav li.current-menu-ancestor > a,
.primary-nav li.current_page_ancestor > a {
  background: rgba(255, 179, 71, 0.25);
  border-color: rgba(255, 179, 71, 0.75);
  color: #fff;
}

.primary-nav li.current-menu-item > a:hover,
.primary-nav li.current_page_item > a:hover,
.primary-nav li.current-menu-ancestor > a:hover,
.primary-nav li.current_page_ancestor > a:hover {
  background: rgba(255, 179, 71, 0.32);
}

.header-search {
  margin: 0;
  display: flex;
  gap: 8px;
  min-width: 240px;
  max-width: 380px;
}

.header-search input[type="search"] {
  flex: 1;
  padding: 6px 8px;
  border-radius: 4px;
  border: 2px solid #fff;
  background: #fff;
  color: #000;
}

.header-search input[type="search"]::placeholder {
  color: rgba(0, 0, 0, 0.55);
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-menu-icon {
  width: 14px;
  height: 2px;
  background: #fff;
  position: relative;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 2px;
  background: #fff;
}

.mobile-menu-icon::before {
  top: -4px;
}

.mobile-menu-icon::after {
  top: 4px;
}

.mobile-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: 1fr;
}

.mobile-menu-panel[hidden] {
  display: none !important;
}

/* Mobile menu overlay + drawer (business look + better UX) */
.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0.58);
  backdrop-filter: blur(2px);
}

.mobile-menu-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(380px, 90vw);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-left: 1px solid rgba(15, 23, 42, 0.12);

  display: grid;
  grid-template-rows: auto 1fr;

  transform: translateX(102%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-menu-panel.is-open .mobile-menu-drawer {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-drawer {
    transition: none !important;
  }
}

.mobile-menu-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--np-btn-normal-bg-top, #ffffff), var(--np-btn-normal-bg-bottom, #f8fafc));
}

.mobile-menu-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.22);
}

.mobile-menu-body {
  height: 100%;
  overflow-y: auto;
  padding: 12px 14px 18px;
  display: grid;
  gap: 16px;
}

.mobile-menu-search {
  position: relative;
  display: grid;
  gap: 8px;
}

.mobile-menu-search input[type="search"] {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.mobile-menu-search input[type="search"]:focus {
  outline: 3px solid rgba(30, 64, 175, 0.25);
  border-color: rgba(30, 64, 175, 0.55);
}

.mobile-menu-section {
  display: grid;
  gap: 8px;
}

.mobile-menu-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.mobile-menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--np-btn-normal-bg-top, #ffffff), var(--np-btn-normal-bg-bottom, #f8fafc));
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: var(--np-btn-normal-text, var(--text));
  font-weight: 700;
  font-size: 14px;
}

.mobile-menu-list a:hover,
.mobile-menu-list a:focus {
  background: rgba(var(--accent-rgb, 30 64 175), 0.12);
  border-color: rgba(var(--accent-rgb, 30 64 175), 0.35);
}

.mobile-menu-list a:focus-visible,
.mobile-menu-close:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 3px solid rgba(30, 64, 175, 0.28);
  outline-offset: 2px;
}

.mobile-menu-list li.current-menu-item > a,
.mobile-menu-list li.current_page_item > a,
.mobile-menu-list li.current-menu-ancestor > a,
.mobile-menu-list li.current_page_ancestor > a {
  background: rgba(30, 64, 175, 0.10);
  border-color: rgba(30, 64, 175, 0.40);
}

/* Make category counts less dominant */
.mobile-menu-list .count {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

/* When menu open, avoid background interactions */
body.mobile-menu-open {
  touch-action: none;
}

body.mobile-menu-open {
  overflow: hidden;
}

.ticker {
  position: relative;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 6px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #fff;
}

.ticker-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  font-weight: 700;
}

.ticker-track {
  overflow: hidden;
  white-space: nowrap;
}

/* Header ticker marquee */
.ticker-marquee {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-marquee 55s linear infinite;
}

.ticker-track:hover .ticker-marquee {
  animation-play-state: paused;
}

@keyframes ticker-marquee {
  from {
    transform: translateX(0);
  }
  to {
    /* Because we render items twice, shifting by -50% loops seamlessly */
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-marquee {
    animation: none !important;
  }
}

.ticker-track a {
  color: #fff;
}

.ticker-track span {
  display: inline-block;
  margin-right: 28px;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 18px;
  margin-top: 0;
  align-items: start;
}

/* BuddyPress layout modifiers (controlled via Customizer setting news_pulse_bp_layout) */
.layout.layout--one {
  grid-template-columns: 1fr;
}

.layout.layout--two-right {
  grid-template-columns: 1fr 280px;
}

.layout.layout--two-left {
  grid-template-columns: 280px 1fr;
}

.layout.layout--three,
.layout.layout--default {
  grid-template-columns: 250px 1fr 250px;
}

/* Important: allow grid children to shrink, otherwise max-content elements
   (e.g. horizontal marquee tracks) can force horizontal page overflow. */
.layout > * {
  min-width: 0;
}

.sidebar-left {
  display: grid;
  gap: 14px;
}

.main-stack {
  display: grid;
  align-content: start;
  gap: 14px;

  /* allow contained panels/tracks to shrink inside CSS grid */
  min-width: 0;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.hero img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 320px;
}

.hero h1 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.hero .meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}


.news-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.news-card:hover {
  border-color: #8b92a1;
}


.news-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.14);
}

.news-thumb-placeholder {
  width: 100%;
  height: 120px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.14);
}


.news-meta-top {
  font-size: 12px;
  color: var(--muted);
}

.news-title {
  margin: 2px 0 6px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.news-title a {
  color: var(--np-heading, #0b1220);
}

.news-title a:hover,
.news-title a:focus {
  color: var(--accent);
}

.news-excerpt {
  font-size: 14px;
  color: #111827;
}

.news-excerpt p {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border-radius: var(--np-btn-radius, 999px);
  background: var(--np-btn-bg, var(--accent));
  color: var(--np-btn-text, #fff);
  font-weight: 700;
  font-size: 12px;
}

/* Make "badge" usable for buttons/links */
a.badge,
button.badge {
  text-decoration: none;
}
button.badge {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border: none;
}
.badge:hover,
.badge:focus {
  filter: brightness(1.03);
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.side-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 88px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

/* Avoid conflicting shadow overrides */

.panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Sidebar lists: make items "clickable" and consistent */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 10px;
    min-height: 30px;
  border-radius: var(--np-btn-radius, 999px);
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, var(--np-btn-normal-bg-top, #ffffff), var(--np-btn-normal-bg-bottom, #f8fafc));
  color: var(--np-btn-normal-text, var(--text));
  font-weight: 700;
}

.category-list a:hover,
.category-list a:focus {
  background: rgba(var(--accent-rgb, 30 64 175), 0.12);
  border-color: rgba(var(--accent-rgb, 30 64 175), 0.35);
  color: var(--np-btn-normal-text, var(--text));
}

/* Active category in WP category list */
.category-list li.current-cat > a {
  background: rgba(30, 64, 175, 0.10);
  border-color: rgba(30, 64, 175, 0.40);
}

.category-list .count {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.panel li + li {
  /* margin-top: 8px; */
}

.notice {
  border-left: 3px solid var(--accent);
  padding: 10px;
  margin: 10px 0;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.03);
}

.notice-error {
  border-left-color: #ff6b6b;
}

.notice-success {
  border-left-color: #5fdd9d;
}

/* Generic form helpers (used in customer login/register/dashboard) */
.np-section {
  margin-top: 16px;
}

.np-form {
  display: grid;
  gap: 12px;
}

.np-field {
  display: grid;
  gap: 6px;
}

.np-input,
.np-select,
.np-textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.np-input:focus,
.np-select:focus,
.np-textarea:focus {
  outline: var(--focus);
  outline-offset: 2px;
}

.np-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.np-row--between {
  justify-content: space-between;
}

.np-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* Small utilities (keep inline styles minimal in templates) */
.np-mt-8 {
  margin-top: 8px;
}

.np-mt-12 {
  margin-top: 12px;
}

.np-mt-14 {
  margin-top: 14px;
}

.np-mt-16 {
  margin-top: 16px;
}

.np-inline {
  display: inline;
}

.np-inline-block {
  display: inline-block;
}

.np-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.np-modal__header h3 {
  margin: 0;
}



@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr 280px;
    grid-template-areas:
      "main sidebar"
      "main sidebar";
  }
  .sidebar-left {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "sidebar";
  }
  .main-stack {
    grid-area: main;
  }
  .side-panel {
    grid-area: sidebar;
    position: relative;
    top: 0;
  }
  .sidebar-left {
    display: none;
  }
  header.site-header {
    position: static;
  }
  .header-actions .primary-nav,
  .header-actions .header-search {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .hero h1 {
    font-size: 24px;
  }
  .news-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 16px 12px 40px;
  }
  .site-header-inner {
    padding: 12px 12px 10px;
  }
  .header-top {
    gap: 12px;
  }
  .brand {
    justify-content: space-between;
    width: 100%;
  }
  .brand-name {
    font-size: 26px;
  }
  .brand img {
    max-height: 44px;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .header-actions {
    margin-left: 0;
    grid-template-columns: 1fr;
  }
  .header-actions .primary-nav,
  .header-actions .header-search {
    display: none;
  }
  .ticker-inner {
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 12px;
  }
  .ticker-label {
    font-size: 11px;
  }
  .hero {
    padding: 12px;
  }
  .hero img {
    max-height: 220px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .hero .meta {
    flex-wrap: wrap;
    row-gap: 6px;
    font-size: 12px;
  }
  .news-card {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .news-card img {
    height: 160px;
  }
  .news-title {
    font-size: 15px;
  }
  .news-excerpt {
    font-size: 13px;
  }
  .side-panel {
    gap: 10px;
  }
  .panel {
    padding: 12px;
  }
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-nav ul {
    gap: 8px;
  }
  .content-body {
    font-size: 16px;
  }
  .np-tab {
    width: 100%;
    justify-content: center;
  }
  .np-modal__dialog {
    width: min(960px, 94vw);
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }
  .brand-name {
    font-size: 22px;
  }
  .brand-tagline {
    font-size: 11px;
  }
  .header-search input[type="search"] {
    font-size: 14px;
  }
  .primary-nav a {
    font-size: 12px;
  }
  .news-thumb img,
  .news-thumb-placeholder {
    height: 140px;
  }
  .suggest-item {
    grid-template-columns: 40px 1fr;
    gap: 8px;
  }
  .suggest-thumb {
    width: 40px;
    height: 40px;
  }
}

.left-nav-title {
  font-weight: 700;
  margin-bottom: 8px;
}

/* Keep list typography without overriding the layout styles above */
.category-list li {
  font-size: 14px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #eceff3;
  color: #2c3140;
  font-size: 12px;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f2f3f6;
}

.site-footer-inner {
  padding-top: 18px;
  padding-bottom: 22px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.footer-small {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.footer-nav ul + ul {
  margin-top: 8px;
}

/* News typography */
.content-body,
.news-excerpt {
  font-family: var(--font-news);
}

.content-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.content-body p {
  margin: 0 0 14px;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  font-family: var(--font);
  margin-top: 22px;
}

.content-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-title {
  font-weight: 700;
  color: var(--np-heading, var(--text));
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--np-heading, var(--text));
}

.topline {
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: #fff;
  font-weight: 700;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

/* Pagination (archives/categories/index) */
.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: var(--np-btn-radius, 999px);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--np-btn-normal-bg-top, #ffffff), var(--np-btn-normal-bg-bottom, #f8fafc));
  color: var(--np-btn-normal-text, var(--text));
  font-weight: 800;
  font-size: 13px;
}

.page-numbers:hover,
.page-numbers:focus {
  border-color: rgba(var(--accent-rgb, 30 64 175), 0.45);
  background: rgba(var(--accent-rgb, 30 64 175), 0.12);
}

.page-numbers.current {
  background: var(--np-btn-bg, var(--accent));
  color: var(--np-btn-text, #fff);
  border-color: var(--np-btn-bg, var(--accent));
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.search-form label {
  display: block;
}

.search-form .search-field {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.search-form .search-field:focus,
.header-search input[type="search"]:focus {
  outline: var(--focus);
  outline-offset: 2px;
}

/* Live search suggestions */
.search-form,
.header-search {
  position: relative;
}

.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.suggest-list {
  display: grid;
}

.suggest-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.suggest-item:hover,
.suggest-item:focus {
  background: var(--surface-2);
}

.suggest-thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.suggest-thumb.placeholder {
  display: block;
  background: var(--surface-2);
}

.suggest-title {
  display: block;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
}

.suggest-date {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.search-form .search-submit {
  margin-top: 10px;
  cursor: pointer;
  border: none;
}

.archive-header {

  padding-left: 14px;

}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

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

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--accent);
}

.breadcrumbs-current {
  color: var(--text);
  font-weight: 700;
}

.content-body {
  margin-top: 16px;
}

.related-grid {
  margin-top: 24px;
}

.feed-link {
  margin-top: 8px;
}



/* /news/ category filter track */
.news-filter {
  margin: 12px 0 16px;overflow: hidden;
}

.news-filter__track {
  /* Use block container for better cross-browser marquee behavior.
     Some mobile browsers (notably iOS Safari) can glitch transforms inside
     overflow containers when the container itself is a flexbox. */
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);

  /* Critical: prevent grid/flex overflow issues inside the main layout */
  min-width: 0;
  max-width: 100%;

  -webkit-overflow-scrolling: touch;
}

.news-filter__marquee {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex: 0 0 auto;
  width: max-content;

  /* Avoid pushing the layout wider than the viewport on some mobile browsers.
     The track handles overflow/scroll; marquee itself should not expand the page. */
  max-width: 100%;
}

/* Group is the unit we duplicate. The trailing padding replaces the missing
   "end gap" in flex layouts, making translateX(-50%) loop reliably. */
.news-filter__group {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding-right: 10px; /* trailing spacing for seamless loop */
}

/* Enable marquee animation only when JS marks it as overflowing */
.news-filter__track.is-marquee .news-filter__marquee {
  will-change: transform;
  animation: news-filter-marquee 26s linear infinite;
}

.news-filter__track.is-marquee {
  overflow: hidden;
}

/* When not animated, show a slim scrollbar (better mobile UX) */
.news-filter__track::-webkit-scrollbar {
  height: 10px;
}

.news-filter__track::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.news-filter__track.is-marquee:hover .news-filter__marquee,
.news-filter__track.is-marquee:focus-within .news-filter__marquee {
  animation-play-state: paused;
}

@keyframes news-filter-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-filter__track.is-marquee .news-filter__marquee {
    animation: none !important;
  }
}

.news-filter__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 36px;
  border-radius: var(--np-btn-radius, 999px);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--np-btn-normal-bg-top, #ffffff), var(--np-btn-normal-bg-bottom, #f8fafc));
  color: var(--np-btn-normal-text, var(--text));
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  scroll-snap-align: start;
}

.news-filter__btn:hover,
.news-filter__btn:focus {
  background: rgba(var(--accent-rgb, 30 64 175), 0.12);
  border-color: rgba(var(--accent-rgb, 30 64 175), 0.45);
  color: var(--np-btn-normal-text, var(--text));
}

.news-filter__btn.is-active {
  background: var(--np-btn-bg, var(--accent));
  border-color: var(--np-btn-bg, var(--accent));
  color: var(--np-btn-text, #fff);
}

/* Customer dashboard tabs / stats / modal */
.np-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.np-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--np-btn-normal-bg-top, #ffffff), var(--np-btn-normal-bg-bottom, #f8fafc));
  color: var(--np-btn-normal-text, var(--text));
  font-weight: 700;
  font-size: 13px;
}

.np-grid-2 {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
}

.np-avatar {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.np-tab.is-active,
.np-tab:hover,
.np-tab:focus {
  background: rgba(var(--accent-rgb, 30 64 175), 0.12);
  color: var(--np-btn-normal-text, var(--text));
  border-color: rgba(var(--accent-rgb, 30 64 175), 0.45);
}

.np-tab.is-active {
  background: var(--np-btn-bg, var(--accent));
  color: var(--np-btn-text, #fff);
  border-color: var(--np-btn-bg, var(--accent));
}

.np-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.np-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.np-stat__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.np-stat__value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
}

.np-status {
  display: inline-flex;
  align-items: center;
  padding: 0px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eef1f5;
  color: var(--np-heading, var(--text));
}

.np-status--publish {
  background: #2e7d32;
  color: #fff;
}

.np-status--pending {
  background: #b7791f;
  color: #fff;
}

.np-status--draft {
  background: #64748b;
  color: #fff;
}

.np-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
}

.np-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0.6);
}

.np-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.np-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.np-modal__body {
  padding: 16px 18px 22px;
}

.np-modal__close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}

body.np-modal-open {
  overflow: hidden;
}

/* Ensure hidden modal stays hidden even if CSS overrides default */
.np-modal[hidden] {
  display: none !important;
}

.np-modal.is-open {
  display: grid;
}
