/* ==========================================================================
   NEWS - 1. DESIGN TOKENS (derived from the homepage palette)
   ========================================================================== */

.news-page {
  --news-primary: var(--color-primary, #004c8c);
  --news-accent: var(--color-secondary, #4978bb);
  --news-ink: #0d3560;
  --news-body: #33455c;
  --news-muted: #56687e;
  --news-surface: #ffffff;
  --news-surface-alt: #f2fafe;
  --news-chip: #d8eef4;
  --news-border: #d5e6f4;
  --news-border-strong: #b9d3e9;

  --news-radius-sm: 10px;
  --news-radius: 16px;
  --news-radius-lg: 22px;
  --news-radius-pill: 50px;

  --news-shadow-sm: 0 4px 12px rgba(9, 45, 84, 0.07);
  --news-shadow: 0 10px 24px rgba(9, 45, 84, 0.1);
  --news-shadow-lg: 0 18px 38px rgba(9, 45, 84, 0.16);

  --news-gap: clamp(1rem, 2.5vw, 1.5rem);
  --news-section-gap: clamp(2rem, 5vw, 3.25rem);
  --news-reading-width: 72ch;
  --news-speed: 0.25s;
}

/* ==========================================================================
   NEWS - 2. LAYOUT
   ========================================================================== */

.news-page {
  padding: clamp(0.5rem, 2vw, 1.25rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  color: var(--news-body);
}

.news-filters-section,
.news-featured-section,
.news-latest-section {
  margin-bottom: var(--news-section-gap);
}

.news-latest-section:last-child {
  margin-bottom: 0;
}

.news-section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--news-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
   NEWS - 3. LISTING HERO
   ========================================================================== */

.news-listing-intro {
  max-width: 760px;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.news-page h1 {
  color: var(--news-primary);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}

.news-listing-summary {
  max-width: 62ch;
  margin-top: 0.25rem;
  color: var(--news-body);
  font-size: clamp(1rem, 1.6vw, 1.075rem);
  line-height: 1.7;
}

/* ==========================================================================
   NEWS - 4. FILTERS
   ========================================================================== */

.news-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: clamp(0.875rem, 2vw, 1.125rem);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius);
  background: var(--news-surface);
  box-shadow: var(--news-shadow-sm);
}

.news-filters select,
.news-admin-form input,
.news-admin-form textarea,
.news-admin-form select {
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #afc6df;
  border-radius: 10px;
  background: #ffffff;
  font-family: inherit;
}

.news-filters select {
  max-width: 260px;
  border-color: var(--news-border-strong);
  border-radius: var(--news-radius-sm);
  color: var(--news-ink);
}

.news-filters .btn {
  min-height: 44px;
  padding: 10px 28px;
}

/* ==========================================================================
   NEWS - 5. FEATURED ARTICLE
   ========================================================================== */

.news-featured {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--news-surface);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  overflow: hidden;
  box-shadow: var(--news-shadow);
  transition:
    transform var(--news-speed) ease,
    box-shadow var(--news-speed) ease,
    border-color var(--news-speed) ease;
}

.news-featured:hover,
.news-featured:focus-within {
  transform: translateY(-3px);
  border-color: var(--news-border-strong);
  box-shadow: var(--news-shadow-lg);
}

.news-featured-media {
  display: block;
  overflow: hidden;
  background: var(--news-surface-alt);
}

.news-featured-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.news-featured:hover .news-featured-media img {
  transform: scale(1.04);
}

.news-featured h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  line-height: 1.2;
  text-align: left;
  text-transform: none;
  padding-bottom: 0;
  margin: 0 0 0.625rem;
  overflow-wrap: anywhere;
}

.news-featured h2 a {
  color: var(--news-ink);
}

.news-featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.125rem, 3vw, 1.75rem);
}

.news-featured-body > p {
  margin-bottom: 0.875rem;
  max-width: 62ch;
  line-height: 1.7;
}

.news-featured-body > p:last-child {
  margin-bottom: 0;
}

.news-badge {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--news-radius-pill);
  background: var(--news-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================================================================
   NEWS - 6. ARTICLE GRID
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--news-gap);
  align-items: stretch;
}

/* ==========================================================================
   NEWS - 7. ARTICLE CARDS
   ========================================================================== */

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--news-surface);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius);
  overflow: hidden;
  box-shadow: var(--news-shadow-sm);
  transition:
    transform var(--news-speed) ease,
    box-shadow var(--news-speed) ease,
    border-color var(--news-speed) ease;
}

.news-card:hover,
.news-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--news-border-strong);
  box-shadow: var(--news-shadow);
}

.news-card-media {
  display: block;
  overflow: hidden;
  background: var(--news-surface-alt);
}

.news-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

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

.news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.5rem;
  padding: clamp(1rem, 2.2vw, 1.25rem);
}

.news-card-meta,
.news-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
  margin: 0;
  color: var(--news-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.news-meta-tag {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  border-radius: var(--news-radius-pill);
  background: var(--news-chip);
  color: var(--news-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-card-meta > *:not(:first-child):not(.news-meta-tag)::before {
  content: "\2022";
  margin-right: 0.5rem;
  color: var(--news-border-strong);
}

.news-article-meta > *:not(:first-child):not(.news-meta-tag)::before {
  content: "\2022";
  margin-right: 0.5rem;
  color: var(--news-border-strong);
}

.news-card h3 {
  font-size: clamp(1.125rem, 1.8vw, 1.3rem);
  line-height: 1.3;
  margin: 0.125rem 0 0;
  overflow-wrap: anywhere;
}

.news-card-excerpt {
  margin: 0;
  color: var(--news-body);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card a,
.news-featured a,
.news-related a {
  color: var(--news-ink);
  text-decoration: none;
}

.news-card h3 a:hover,
.news-featured h2 a:hover,
.news-related h3 a:hover {
  color: var(--news-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--news-accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-read-more::after {
  content: "\2192";
  transition: transform var(--news-speed) ease;
}

.news-read-more:hover {
  color: var(--news-primary);
}

.news-read-more:hover::after {
  transform: translateX(3px);
}

.news-card-body .news-read-more {
  margin-top: 0.5rem;
}

/* ==========================================================================
   NEWS - 8. EMPTY STATE
   ========================================================================== */

.news-empty-state {
  grid-column: 1 / -1;
  max-width: 560px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px dashed var(--news-border-strong);
  border-radius: var(--news-radius);
  background: var(--news-surface);
  color: var(--news-body);
  text-align: center;
  box-shadow: var(--news-shadow-sm);
}

.news-empty-state strong {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--news-primary);
  font-size: 1.125rem;
}

.news-empty-state p {
  margin: 0;
  line-height: 1.65;
}

.news-empty-state a {
  color: var(--news-primary);
  font-weight: 700;
  text-underline-offset: 3px;
}

.news-back-link {
  margin-bottom: 1rem;
}

.news-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--news-ink);
  font-weight: 700;
  text-decoration: none;
}

.news-back-link a::before {
  content: "\2190";
  transition: transform var(--news-speed) ease;
}

.news-back-link a:hover {
  color: var(--news-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-back-link a:hover::before {
  transform: translateX(-3px);
}

/* ==========================================================================
   NEWS - 9. ARTICLE DETAIL
   ========================================================================== */

.news-article {
  background: var(--news-surface);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  box-shadow: var(--news-shadow);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.news-article-header {
  max-width: var(--news-reading-width);
  margin-bottom: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--news-border);
}

.news-article h1 {
  color: var(--news-primary);
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  margin: 0.5rem 0 0.75rem;
}

.news-article-header .news-article-meta {
  margin-bottom: 0;
}

.news-article-image {
  max-width: var(--news-reading-width);
  margin: clamp(1rem, 3vw, 1.75rem) 0;
}

.news-article-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--news-radius);
}

/* ==========================================================================
   NEWS - 10. RICH ARTICLE CONTENT
   ========================================================================== */

.news-article-body {
  max-width: var(--news-reading-width);
  color: var(--news-body);
  font-size: clamp(1rem, 1.6vw, 1.075rem);
  overflow-wrap: break-word;
  word-break: break-word;
}

.news-article-body > *:first-child {
  margin-top: 0;
}

.news-article-body > *:last-child {
  margin-bottom: 0;
}

.news-article-body p,
.news-article-body ul,
.news-article-body ol,
.news-article-body blockquote,
.news-article-body table,
.news-article-body pre {
  margin-bottom: 1.125rem;
}

.news-article-body p,
.news-article-body li {
  line-height: 1.75;
}

.news-article-body h2,
.news-article-body h3,
.news-article-body h4,
.news-article-body h5,
.news-article-body h6 {
  color: var(--news-primary);
  text-align: left;
  text-transform: none;
  padding-bottom: 0;
  margin: 2rem 0 0.625rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.news-article-body h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}

.news-article-body h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
}

.news-article-body h4,
.news-article-body h5,
.news-article-body h6 {
  font-size: 1.1rem;
}

.news-article-body ul,
.news-article-body ol {
  padding-left: 1.35rem;
}

.news-article-body li + li {
  margin-top: 0.35rem;
}

.news-article-body a {
  color: var(--news-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article-body a:hover {
  color: var(--news-accent);
}

.news-article-body strong {
  color: var(--news-ink);
}

.news-article-body blockquote {
  border-left: 4px solid var(--news-accent);
  padding: 0.875rem 1.125rem;
  background: var(--news-surface-alt);
  border-radius: 0 var(--news-radius-sm) var(--news-radius-sm) 0;
  color: var(--news-ink);
  font-style: italic;
}

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

.news-article-body img,
.news-article-body iframe,
.news-article-body video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.25rem 0;
  border-radius: var(--news-radius-sm);
}

.news-article-body iframe,
.news-article-body video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.news-article-body figure {
  margin: clamp(1.25rem, 3vw, 2rem) 0;
  max-width: 100%;
}

.news-article-body figure > img,
.news-article-body figure > iframe,
.news-article-body figure > video {
  margin: 0;
}

.news-article-body figcaption {
  margin-top: 0.5rem;
  color: var(--news-muted);
  font-size: 0.875rem;
  font-style: italic;
  line-height: 1.55;
  text-align: center;
}

/* TinyMCE emits figure.image for captioned images. */
.news-article-body figure.image {
  display: table;
}

.news-article-body figure.image figcaption {
  display: table-caption;
  caption-side: bottom;
}

.news-article-body figure.align-left,
.news-article-body img.align-left {
  float: left;
  margin: 0.35rem 1.5rem 1rem 0;
  max-width: min(50%, 22rem);
}

.news-article-body figure.align-right,
.news-article-body img.align-right {
  float: right;
  margin: 0.35rem 0 1rem 1.5rem;
  max-width: min(50%, 22rem);
}

.news-article-body figure.align-center,
.news-article-body img.align-center {
  margin-left: auto;
  margin-right: auto;
}

.news-article-body::after {
  content: '';
  display: block;
  clear: both;
}

@media (max-width: 600px) {
  .news-article-body figure.align-left,
  .news-article-body figure.align-right,
  .news-article-body img.align-left,
  .news-article-body img.align-right {
    float: none;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

.news-article-body hr {
  height: 1px;
  border: 0;
  margin: 2rem 0;
  background: var(--news-border);
}

.news-article-body table {
  width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.news-article-body th,
.news-article-body td {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--news-border);
  text-align: left;
}

.news-article-body pre,
.news-article-body code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* ==========================================================================
   NEWS - 11. RELATED ARTICLES
   ========================================================================== */

.news-related {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  padding: clamp(1.125rem, 3vw, 1.75rem);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  background: var(--news-surface);
  box-shadow: var(--news-shadow-sm);
}

.news-related h2 {
  color: var(--news-primary);
  text-align: left;
  text-transform: none;
  margin-bottom: 1rem;
  padding-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.news-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: var(--news-gap);
}

.news-related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-sm);
  background: var(--news-surface-alt);
  padding: 1rem;
  transition:
    border-color var(--news-speed) ease,
    box-shadow var(--news-speed) ease,
    transform var(--news-speed) ease;
}

.news-related-card:hover,
.news-related-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--news-border-strong);
  box-shadow: var(--news-shadow-sm);
}

.news-related-card h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   NEWS - 12. RESPONSIVE (mobile first)
   ========================================================================== */

@media (min-width: 768px) {
  .news-featured {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
  }

  .news-featured-media {
    align-self: center;
  }

  .news-featured-body {
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   NEWS - 13. ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

.sr-only-news {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.news-page a:focus-visible,
.news-empty-state a:focus-visible,
.news-article-body a:focus-visible {
  outline: 3px solid var(--news-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .news-featured,
  .news-featured-media img,
  .news-card,
  .news-card-media img,
  .news-related-card,
  .news-read-more::after,
  .news-back-link a::before {
    transition: none;
  }

  .news-featured:hover,
  .news-featured:focus-within,
  .news-card:hover,
  .news-card:focus-within,
  .news-related-card:hover,
  .news-related-card:focus-within {
    transform: none;
  }

  .news-featured:hover .news-featured-media img,
  .news-card:hover .news-card-media img,
  .news-read-more:hover::after,
  .news-back-link a:hover::before {
    transform: none;
  }
}

.news-admin-page {
  padding: 30px 0 64px;
}

.news-admin-page h1 {
  color: var(--color-primary);
  margin-bottom: 0;
}

.news-admin-shell-header {
  margin-bottom: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  padding: 16px;
}

.news-admin-topbar {
  padding: 0;
  margin-bottom: 14px;
}

.news-admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.news-admin-brand img {
  height: 40px;
  width: auto;
}

.news-admin-brand span {
  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 700;
}

.news-admin-heading-group {
  display: grid;
  gap: 4px;
}

.news-admin-subtitle {
  color: #325578;
  font-size: 0.95rem;
  margin: 0;
}

.news-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.news-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-btn-neutral {
  background: transparent;
  border: 2px solid #a9c3df;
  color: #1d4b82;
}

.news-btn-neutral:hover {
  background: #edf4fc;
  border-color: #8fb0d3;
}

.news-admin-logout-form {
  margin: 0;
}

.news-btn-logout {
  background: transparent;
  color: #6c2430;
  border: 2px solid #e2bcc3;
  padding: 10px 22px;
}

.news-btn-logout:hover {
  background: #fdecef;
  border-color: #d79ba6;
}

.news-admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  border-top: 1px solid #dce9f6;
  padding-top: 12px;
}

.news-admin-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 24px;
  border-radius: 50px;
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.news-admin-nav-link:hover {
  text-decoration: none;
  background: rgba(0, 76, 140, 0.1);
}

.news-admin-nav-link.is-active {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #ffffff;
}

.news-admin-nav-logout-form {
  margin: 0;
}

.news-admin-nav-logout {
  cursor: pointer;
}

.news-admin-section-title {
  margin-bottom: 14px;
  color: #2f5f92;
}

.news-admin-page-actions {
  margin-bottom: 14px;
}

.news-btn-compact {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.82rem;
}

.news-admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.news-admin-summary-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d4e2f1;
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.news-admin-summary-card:hover {
  text-decoration: none;
  background: #f8fbff;
}

.news-admin-summary-label {
  color: #2f5276;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-admin-summary-count {
  color: #1d4b82;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1;
  font-weight: 800;
}

.news-admin-panel {
  border: 1px solid #d8e5f3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  padding: 14px;
  margin-bottom: 16px;
}

.news-admin-panel h2 {
  margin: 0;
  color: #1f446e;
  font-size: 1.2rem;
}

.news-admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.news-admin-panel-link {
  font-weight: 700;
  color: #2b5f97;
  text-decoration: none;
}

.news-admin-panel-link:hover {
  text-decoration: underline;
}

.news-admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.news-admin-filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 50px;
  border-color: var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.news-admin-filter-link:hover {
  text-decoration: none;
  background: rgba(0, 76, 140, 0.1);
}

.news-admin-filter-link.is-active {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #ffffff;
}

.news-admin-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.news-admin-status.is-published {
  background: #e1f4e7;
  color: #1d6b3f;
}

.news-admin-status.is-draft {
  background: #fff2d8;
  color: #7b5208;
}

.news-admin-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: #e6f2ff;
  color: #1f4f86;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
}

.news-admin-empty-state {
  border: 1px dashed #bfd4ea;
  border-radius: 12px;
  background: #f8fbff;
  padding: 14px;
}

.news-admin-empty-state p {
  margin: 0 0 10px;
}

.news-admin-empty-state p:last-child {
  margin-bottom: 0;
}

.news-admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.news-admin-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #d7e5f4;
  background: #f8fbff;
  color: #1e446e;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
}

.news-admin-quick-action:hover {
  text-decoration: none;
  background: #ecf5ff;
}

.news-admin-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.news-admin-form label {
  font-weight: 700;
  color: #173a5d;
  margin-top: 8px;
}

.news-admin-hint {
  margin: 4px 0 8px;
  color: #56687e;
  font-size: 0.875rem;
  line-height: 1.5;
}

.news-admin-recovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.news-admin-recovery span {
  flex: 1 1 260px;
}

.news-admin-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  gap: 12px;
  cursor: pointer;
}

.news-admin-form .news-admin-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  max-width: none;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  accent-color: #2f63a3;
  cursor: pointer;
  margin-left: auto;
}

.news-admin-form textarea {
  min-height: 110px;
}

#body_html {
  min-height: 320px;
}

.news-admin-notice {
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 14px;
  font-weight: 600;
}

.news-admin-notice.success {
  background: #dff6e8;
  color: #1d6b3f;
}

.news-admin-notice.error {
  background: #fde8e8;
  color: #8a1f1f;
}

.news-admin-notice.warning {
  background: #fff4dd;
  color: #704f09;
}

.news-table-wrap {
  width: 100%;
  overflow-x: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  margin-top: 14px;
}

.news-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  border-collapse: collapse;
  background: #fff;
}

.news-table th:first-child,
.news-table td:first-child {
  width: 45%;
  overflow-wrap: anywhere;
}

.news-admin-panel .news-table-wrap {
  margin-top: 0;
}

.news-table th,
.news-table td {
  border: 1px solid #dbe5f0;
  padding: 10px;
  text-align: left;
}

.news-table th {
  background: #f1f7ff;
  color: #1c3d61;
}

.news-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.news-table tbody tr:hover {
  background: #f2f8ff;
}

.news-table a {
  text-decoration: none;
}

.news-admin-form input:focus,
.news-admin-form textarea:focus,
.news-admin-form select:focus,
.news-filters select:focus,
.news-filters button:focus-visible,
.news-read-more:focus-visible,
.news-btn-neutral:focus-visible,
.news-btn-logout:focus-visible,
.news-admin-nav-link:focus-visible,
.news-admin-filter-link:focus-visible,
.news-card a:focus-visible,
.news-featured a:focus-visible,
.news-back-link a:focus-visible,
.news-related a:focus-visible {
  outline: 3px solid #4978bb;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .news-admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 640px) {
  .news-filters select,
  .news-filters .btn {
    max-width: 100%;
    width: 100%;
  }

  .news-admin-form,
  .news-table-wrap {
    border-radius: 14px;
  }

  .news-admin-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .news-admin-actions .btn,
  .news-admin-logout-form {
    width: 100%;
  }

  .news-admin-actions .btn,
  .news-admin-logout-form button {
    width: 100%;
    justify-content: center;
  }

  .news-admin-nav {
    gap: 6px;
    padding-top: 10px;
  }

  .news-admin-nav-link,
  .news-admin-nav-logout-form,
  .news-admin-nav-logout {
    width: 100%;
  }

  .news-admin-nav-link,
  .news-admin-nav-logout {
    justify-content: center;
  }

  .news-admin-summary {
    grid-template-columns: 1fr;
  }

  .news-admin-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-admin-quick-actions {
    grid-template-columns: 1fr;
  }

  .news-table th,
  .news-table td {
    padding: 8px;
    font-size: 0.9rem;
  }

  .news-table thead {
    display: none;
  }

  .news-table,
  .news-table tbody,
  .news-table tr,
  .news-table td {
    display: block;
    width: 100%;
  }

  .news-table tr {
    border-bottom: 1px solid #dbe5f0;
    padding: 10px;
  }

  .news-table td {
    border: 0;
    padding: 6px 2px;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .news-table td::before {
    content: attr(data-label) ": ";
    color: #1c3d61;
    font-weight: 700;
  }

  .news-table td:not([data-label])::before {
    content: none;
  }

  .news-table td:first-child {
    width: 100%;
    font-weight: 700;
  }
}
