:root {
  --news-bg-primary: linear-gradient(135deg, rgba(17, 44, 86, 0.88), rgba(14, 34, 67, 0.92));
  --news-bg-surface: rgba(17, 40, 74, 0.85);
  --news-bg-card: rgba(19, 47, 88, 0.9);
  --news-border: rgba(255, 255, 255, 0.08);
  --news-border-strong: rgba(255, 255, 255, 0.14);
  --news-text-main: #f4f7ff;
  --news-text-muted: #aeb7d4;
  --news-accent: #61a8ff;
  --news-accent-strong: #7ddbff;
  --news-shadow: 0 22px 45px rgba(6, 13, 26, 0.4);
  --news-radius-lg: 26px;
  --news-radius-md: 18px;
  --news-radius-sm: 12px;
}

.news-container {
  padding: 56px 24px 72px;
}

.news-layout {
  display: flex;
  gap: 46px;
  align-items: flex-start;
}

/* Prevent sidebar overlapping main column on medium widths */
.news-archive .news-layout .single-news {
  flex: 1 1 calc(100% - 366px); /* 320px sidebar + 46px gap */
  min-width: 0; /* allow inner grid to shrink */
}

.single-news {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--news-bg-surface);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  box-shadow: var(--news-shadow);
  padding: 48px clamp(32px, 6vw, 54px);
  backdrop-filter: blur(18px);
  color: var(--news-text-main);
}

.single-news .news-header {
  margin-bottom: 36px;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 14px;
  color: var(--news-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-meta__reading::before {
  content: '\f469';
  font: normal 14px/1 'Dashicons';
  margin-right: 6px;
  color: var(--news-accent);
}

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

.news-title {
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.15;
  margin: 14px 0 18px;
  color: #ffffff;
  font-weight: 700;
}

.news-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.news-tags a {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--news-accent-strong);
  background: rgba(97, 168, 255, 0.16);
  padding: 6px 14px;
  border-radius: 999px;
}

.news-hero {
  margin: 0 -12px 32px;
}

.news-hero img {
  width: calc(100% + 24px);
  height: auto;
  border-radius: var(--news-radius-md);
  box-shadow: 0 18px 48px rgba(6, 12, 32, 0.55);
}

.news-toc {
  margin-bottom: 40px;
  padding: 28px 32px;
  border-radius: var(--news-radius-md);
  border: 1px solid var(--news-border-strong);
  background: rgba(12, 30, 61, 0.88);
  box-shadow: 0 16px 35px rgba(5, 12, 26, 0.35);
}

.news-toc h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--news-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-toc__item a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--news-text-main);
  transition: color 0.2s ease, transform 0.2s ease;
}

.news-toc__item a::before {
  content: '\f345';
  font: normal 14px/1 'Dashicons';
  color: rgba(97, 168, 255, 0.55);
  transition: color 0.2s ease;
}

.news-toc__item a:hover {
  color: var(--news-accent-strong);
  transform: translateX(6px);
}

.news-toc__item a:hover::before {
  color: var(--news-accent-strong);
}

.news-toc__item--level-3 {
  padding-left: 20px;
  font-size: 15px;
}

.news-content {
  font-size: 18px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.news-content > * {
  max-width: 100%;
}

.news-content p,
.news-content li {
  color: rgba(244, 247, 255, 0.88);
  margin-bottom: 18px;
}

.news-content a {
  color: var(--news-accent-strong);
  text-decoration: underline;
}

.news-content strong,
.news-content b {
  color: #ffffff;
}

.news-content h2 {
  color: #ffffff;
  margin: 42px 0 14px;
  position: relative;
}

.news-content h3 {
  color: #ffffff;
  margin: 10px 0 10px;
  position: relative;
}

.news-content h2::after,
.news-content h3::after {
  content: '';
  display: block;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, #61a8ff, rgba(97, 168, 255, 0));
  margin-top: 8px;
}

.news-content ul,
.news-content ol {
  margin: 0 0 24px 24px;
  padding: 0;
}

.news-content ul li::marker,
.news-content ol li::marker {
  color: var(--news-accent-strong);
}

.news-content blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  border-radius: var(--news-radius-sm);
  border: 1px solid var(--news-border-strong);
  background: rgba(11, 28, 60, 0.75);
  color: rgba(244, 247, 255, 0.92);
  font-style: italic;
  box-shadow: inset 0 0 0 1px rgba(97, 168, 255, 0.16);
}

.news-content blockquote p:last-child {
  margin-bottom: 0;
}

.news-content pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.news-content .wp-block-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.news-content .wp-block-table table {
  width: 100%;
}

.news-content iframe,
.news-content video,
.news-content embed {
  max-width: 100%;
}

.news-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  overflow: hidden;
  border-radius: var(--news-radius-sm);
}

.news-content table th,
.news-content table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  text-align: left;
}

.news-content table th {
  background: rgba(22, 49, 90, 0.92);
  color: #ffffff;
  font-weight: 600;
}

.news-content table tr:nth-child(even) td {
  background: rgba(13, 32, 63, 0.8);
}

.news-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--news-radius-sm);
  margin: 26px 0;
  box-shadow: 0 18px 44px rgba(4, 12, 24, 0.55);
}

.news-navigation {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--news-border);
}

.news-navigation__item {
  flex: 1 1 0;
}

.news-navigation__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--news-text-muted);
  margin-bottom: 8px;
}

.news-navigation__item a {
  font-weight: 600;
  color: var(--news-accent-strong);
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-navigation__item a:hover {
  color: #ffffff;
}

.news-sidebar {
  flex: 0 0 320px;
  position: sticky;
  top: 32px;
  align-self: flex-start;
}

.news-sidebar__inner {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-sidebar__title {
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--news-accent-strong);
}

.news-sidebar__widget {
  background: var(--news-bg-card);
  border-radius: var(--news-radius-md);
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 30px rgba(5, 12, 26, 0.38);
  margin-bottom: 2rem;
}

.news-sidebar__widget .news-sidebar__title {
  margin: 0 0 12px;
}

.news-sidebar__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-sidebar__cats a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--news-text-main);
  background: rgba(12, 30, 61, 0.65);
  border: 1px solid var(--news-border);
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.news-sidebar__cats a::before {
  content: '\f318'; /* dashicons-category icon */
  font: normal 16px/1 'Dashicons';
  color: var(--news-accent);
}

.news-sidebar__cats a:hover {
  border-color: var(--news-accent);
  color: var(--news-accent-strong);
  transform: translateX(4px);
}

.news-sidebar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-sidebar__tags a {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--news-accent-strong);
  background: rgba(97, 168, 255, 0.16);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(97, 168, 255, 0.2);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-sidebar__tags a:hover {
  background: var(--news-accent);
  color: #0d1f3d;
  border-color: transparent;
}

.news-sidebar__item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  background: var(--news-bg-card);
  border-radius: var(--news-radius-md);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 30px rgba(5, 12, 26, 0.38);
}

.news-sidebar__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--news-radius-sm);
  overflow: hidden;
  background: rgba(13, 32, 63, 0.7);
  font-weight: 700;
  color: var(--news-accent-strong);
  font-size: 22px;
  text-align: center;
}

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

.news-sidebar__banner {
  display: block;
  margin: -2px 0 14px 0;
  border-radius: var(--news-radius-sm);
  overflow: hidden;
}

.news-sidebar__banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--news-radius-sm);
  box-shadow: 0 8px 22px rgba(6, 12, 32, 0.35);
}

.news-sidebar__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.news-sidebar__date {
  font-size: 12px;
  color: var(--news-text-muted);
  letter-spacing: 0.05em;
}

.news-sidebar__link {
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.news-sidebar__link:hover {
  color: var(--news-accent-strong);
}

.news-sidebar__empty {
  font-size: 14px;
  color: var(--news-text-muted);
}

.news-archive {
    background: var(--news-bg-primary);
}

.news-archive__container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.news-archive__hero {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.news-archive__body {
  display: flex;
  width: 100%;
  max-width: calc(1240px + 320px + 32px); /* main width + sidebar + gap */
  margin: 0 auto;
  gap: 32px;
  align-items: flex-start;
}

.news-archive__main {
  flex: 1 1 auto;
  min-width: 0;
}

.news-archive__body.has-sidebar .news-archive__grid {
  max-width: 960px;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 1200px) {
  .news-archive__body.has-sidebar .news-archive__grid {
    max-width: 640px;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 900px) {
  .news-archive__body {
    flex-direction: column;
    gap: 24px;
    max-width: 1240px;
  }

  .news-archive__body.has-sidebar .news-archive__grid {
    max-width: 100%;
    grid-template-columns: minmax(260px, 1fr);
    margin: 0 auto;
  }
}

.news-archive__hero {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.news-archive__body {
  display: flex;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  gap: 32px;
  align-items: flex-start;
}

.news-archive__main {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.news-archive__main .news-archive__grid {
  margin: 0;
}

.news-archive__breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--news-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.news-archive__breadcrumb a {
    color: var(--news-accent-strong);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-archive__breadcrumb a:hover {
    color: #ffffff;
}

.news-archive__header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-archive__title {
    margin: 0;
    font-size: clamp(36px, 6vw, 48px);
    line-height: 1.1;
    color: #ffffff;
    font-weight: 700;
}

.news-archive__subtitle {
    margin: 0;
    max-width: 720px;
    color: rgba(244, 247, 255, 0.72);
    font-size: 16px;
}

.news-archive__grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

@media (min-width: 1400px) {
    .news-archive__grid {
        grid-template-columns: repeat(4, minmax(260px, 1fr));
    }
}

/* Mobile fixes: force single column on small screens to avoid over-dense layout */
@media (max-width: 900px) {
  .news-archive__grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--news-bg-surface);
    border: 1px solid var(--news-border);
    border-radius: var(--news-radius-md);
    box-shadow: var(--news-shadow);
    overflow: hidden;
    min-height: 100%;
}

.news-card__thumb {
    position: relative;
    display: block;
    overflow: hidden;
}

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

.news-card__thumb:hover img {
    transform: scale(1.05);
}

.news-card__thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background: rgba(13, 32, 63, 0.85);
    color: var(--news-accent-strong);
    font-size: 32px;
    font-weight: 700;
}

.news-card__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 26px 28px;
}

.news-reactions {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	color: var(--news-text-muted);
	font-size: 14px;
	letter-spacing: 0.04em;
}

.news-reactions__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid transparent;
	color: inherit;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 10px;
	transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.news-reactions__btn:hover {
	color: var(--news-accent-strong);
	background: rgba(97,168,255,.08);
	border-color: var(--news-border);
}

.news-reactions__btn:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(97,168,255,.35);
}

.news-reactions__btn[aria-pressed="true"] {
	color: var(--news-accent-strong);
	background: rgba(97,168,255,.12);
	border-color: var(--news-border-strong);
}

.news-reactions__btn--like::before,
.news-reactions__btn--dislike::before,
.news-reactions__views::before {
	font: normal 18px/1 'Dashicons';
	display: inline-block;
	margin-right: 6px;
}

.news-reactions__views::before {
	content: '\f177'; /* dashicons-visibility */
	color: var(--news-accent);
}

.news-reactions__btn--like::before {
	content: '\f529'; /* dashicons-thumbs-up */
}

.news-reactions__btn--dislike::before {
	content: '\f542'; /* dashicons-thumbs-down */
}

.news-reactions__count {
	min-width: 1ch;
}

.news-reactions--compact{
	font-size: 12px;
	gap: 10px;
	margin-top: 8px;
}

.news-card__meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--news-text-muted);
}

.news-card__meta-item::before {
    margin-right: 6px;
    font: normal 14px/1 'Dashicons';
    color: var(--news-accent);
}

.news-card__meta-item--date::before {
    content: '\f508';
}

.news-card__meta-item--category::before {
    content: '\f318';
}

.news-card__meta-item--time::before {
    content: '\f469';
}

.news-card__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}

.news-card__title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card__title a:hover {
    color: var(--news-accent-strong);
}

.news-card__excerpt {
    margin: 0;
    color: rgba(244, 247, 255, 0.82);
    font-size: 16px;
    line-height: 1.6;
}

.news-card__stats {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--news-text-muted);
}

.news-card__stat {
    position: relative;
    padding-left: 22px;
    min-height: 18px;
}

.news-card__stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font: normal 16px/1 'Dashicons';
    color: var(--news-accent);
}

.news-card__stat--views::before {
    content: '\f115';
}

.news-card__stat--likes::before {
    content: '\f487';
}

.news-card__stat--comments::before {
    content: '\f101';
}

.news-card__read-more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--news-accent);
    color: var(--news-accent-strong);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.news-card__read-more:hover {
    background: var(--news-accent);
    color: #0d1f3d;
    box-shadow: 0 12px 24px rgba(97, 168, 255, 0.28);
}

.news-archive__pagination {
    display: flex;
    justify-content: center;
    margin: 24px auto 0;
}

.news-archive__seo {
    width: 100%;
    max-width: 1240px; /* match news grid width */
    margin: 24px auto 0; /* spacing from pagination and center align */
}

.news-archive__breadcrumb,
.news-archive__header,
.news-archive__pagination,
.news-archive__empty {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.news-archive__pagination .navigation.pagination {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.news-archive__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(12, 30, 61, 0.65);
    color: rgba(244, 247, 255, 0.86);
    text-decoration: none;
    font-weight: 600;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.news-archive__pagination .page-numbers:hover {
    border-color: var(--news-accent);
    color: #ffffff;
}

.news-archive__pagination .page-numbers.current {
    background: var(--news-accent);
    color: #0d1f3d;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(97, 168, 255, 0.25);
}

.news-archive__empty {
    padding: 48px;
    border-radius: var(--news-radius-md);
    border: 1px dashed var(--news-border-strong);
    color: rgba(244, 247, 255, 0.82);
    text-align: center;
}

@media (max-width: 1024px) {
  .news-layout {
    flex-direction: column;
  }

  .news-archive__body {
    flex-direction: column;
    gap: 24px;
  }

  .news-sidebar {
    width: 100%;
    position: static;
  }

  .news-sidebar__inner {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .news-sidebar__item {
    flex: 1 1 calc(50% - 16px);
  }
}

@media (max-width: 700px) {
  .news-container {
    padding: 42px 18px 60px;
  }

    .news-archive__grid {
        gap: 20px;
    }

  .single-news {
    padding: 32px 24px;
  }

  .news-sidebar__inner {
    flex-direction: column;
  }

  .news-sidebar__item {
    grid-template-columns: 120px 1fr;
  }

  .news-title {
    font-size: 28px;
  }

  .news-toc {
    padding: 20px;
  }
}
