/*
 * CCNC Modern News — presentation-only layer
 * Palette: charcoal/black, white, warm gold.
 * Selectors are intentionally broad-but-conservative and do not hide content,
 * alter ad elements, or change dimensions of ad containers.
 */

body.ccnc-modern-news-active {
  --ccnc-ink: #111111;
  --ccnc-ink-soft: #1b1b1b;
  --ccnc-paper: #ffffff;
  --ccnc-paper-soft: #f6f6f4;
  --ccnc-gold: #d6ad45;
  --ccnc-gold-deep: #b88b22;
  --ccnc-text: #222222;
  --ccnc-muted: #6a6a6a;
  --ccnc-border: #e7e3d8;
  color: var(--ccnc-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.ccnc-modern-news-active a {
  text-underline-offset: 0.18em;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

body.ccnc-modern-news-active.ccnc-gold-links a:hover,
body.ccnc-modern-news-active.ccnc-gold-links a:focus-visible {
  color: var(--ccnc-gold-deep);
}

body.ccnc-modern-news-active :focus-visible {
  outline: 2px solid var(--ccnc-gold-deep);
  outline-offset: 3px;
}

/* Header and navigation: only color, border, and shadow; no positioning changes. */
body.ccnc-modern-news-active.ccnc-dark-header header,
body.ccnc-modern-news-active.ccnc-dark-header .site-header,
body.ccnc-modern-news-active.ccnc-dark-header .wp-block-template-part.site-header {
  border-bottom: 2px solid var(--ccnc-gold);
}

body.ccnc-modern-news-active.ccnc-dark-header .site-header,
body.ccnc-modern-news-active.ccnc-dark-header header.site-header {
  background-color: var(--ccnc-ink);
  color: #ffffff;
}

body.ccnc-modern-news-active.ccnc-dark-header .site-header a,
body.ccnc-modern-news-active.ccnc-dark-header header.site-header a {
  color: inherit;
}

body.ccnc-modern-news-active .main-navigation,
body.ccnc-modern-news-active .primary-navigation,
body.ccnc-modern-news-active nav.wp-block-navigation {
  border-bottom-color: var(--ccnc-border);
}

body.ccnc-modern-news-active .main-navigation a,
body.ccnc-modern-news-active .primary-navigation a,
body.ccnc-modern-news-active nav.wp-block-navigation a {
  font-weight: 600;
}

body.ccnc-modern-news-active .site-title,
body.ccnc-modern-news-active .wp-block-site-title {
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* Common post cards across classic and block themes. */
body.ccnc-modern-news-active.ccnc-card-accents article,
body.ccnc-modern-news-active.ccnc-card-accents .post,
body.ccnc-modern-news-active.ccnc-card-accents .post-card,
body.ccnc-modern-news-active.ccnc-card-accents .wp-block-post,
body.ccnc-modern-news-active.ccnc-card-accents .wp-block-latest-posts__list li {
  border-color: var(--ccnc-border);
}

body.ccnc-modern-news-active.ccnc-card-accents .post,
body.ccnc-modern-news-active.ccnc-card-accents .post-card,
body.ccnc-modern-news-active.ccnc-card-accents .wp-block-post {
  border-radius: 8px;
}

body.ccnc-modern-news-active.ccnc-card-accents .post:hover,
body.ccnc-modern-news-active.ccnc-card-accents .post-card:hover,
body.ccnc-modern-news-active.ccnc-card-accents .wp-block-post:hover {
  border-bottom-color: var(--ccnc-gold);
}

body.ccnc-modern-news-active h1,
body.ccnc-modern-news-active h2,
body.ccnc-modern-news-active h3,
body.ccnc-modern-news-active h4 {
  line-height: 1.2;
  text-wrap: pretty;
}

body.ccnc-modern-news-active .entry-title,
body.ccnc-modern-news-active .wp-block-post-title {
  letter-spacing: -0.018em;
}

body.ccnc-modern-news-active .entry-content,
body.ccnc-modern-news-active .wp-block-post-content {
  line-height: 1.75;
}

body.ccnc-modern-news-active .entry-content img,
body.ccnc-modern-news-active .wp-block-post-content img,
body.ccnc-modern-news-active .wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

body.ccnc-modern-news-active .entry-content table,
body.ccnc-modern-news-active .wp-block-post-content table {
  max-width: 100%;
  border-collapse: collapse;
}

body.ccnc-modern-news-active .entry-content th,
body.ccnc-modern-news-active .entry-content td,
body.ccnc-modern-news-active .wp-block-post-content th,
body.ccnc-modern-news-active .wp-block-post-content td {
  border: 1px solid var(--ccnc-border);
  padding: .65em .75em;
}

body.ccnc-modern-news-active button,
body.ccnc-modern-news-active input[type="button"],
body.ccnc-modern-news-active input[type="submit"],
body.ccnc-modern-news-active .wp-block-button__link {
  border-radius: 4px;
  font-weight: 700;
}

body.ccnc-modern-news-active .wp-block-button__link {
  border: 1px solid var(--ccnc-gold);
}

body.ccnc-modern-news-active .widget,
body.ccnc-modern-news-active .wp-block-widget,
body.ccnc-modern-news-active .wp-block-group {
  overflow-wrap: anywhere;
}

/* Keep media and embeds responsive without forcing a new layout. */
body.ccnc-modern-news-active iframe,
body.ccnc-modern-news-active video,
body.ccnc-modern-news-active embed,
body.ccnc-modern-news-active object {
  max-width: 100%;
}

@media (max-width: 782px) {
  body.ccnc-modern-news-active .entry-content,
  body.ccnc-modern-news-active .wp-block-post-content {
    font-size: 1rem;
    line-height: 1.72;
  }

  body.ccnc-modern-news-active .entry-content table,
  body.ccnc-modern-news-active .wp-block-post-content table {
    display: block;
    overflow-x: auto;
  }

  body.ccnc-modern-news-active .wp-block-image img {
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ccnc-modern-news-active *,
  body.ccnc-modern-news-active *::before,
  body.ccnc-modern-news-active *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
