/**
 * News single & archive — follows the new service page design (service-new.css)
 */

.news-main {
  --news-dark: #1b2e1c;
  --news-text: #42493d;
  --news-yellow: #f4b92c;
  --news-surface: #f8f9fa;
  --news-border: #e5e7eb;
  --news-muted: #6b7568;
  /* Fixed white header (fault bar + desktop header) */
  padding-top: 204px;
}

/**
 * Hero
 */

.news-hero {
  padding: 56px 0 72px;
  background: var(--news-surface);
}

.news-hero__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: center;
}

.news-hero__inner--no-image {
  /* Same centred 864px column as the article below */
  grid-template-columns: minmax(0, 864px);
  justify-content: center;
}

.news-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 16px;
  color: var(--news-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.news-breadcrumbs a {
  color: var(--green1);
}

.news-breadcrumbs a:hover {
  text-decoration: underline;
}

.news-hero__title {
  color: var(--news-dark);
  margin-bottom: 0;
  overflow-wrap: break-word;
}

.news-hero__description {
  max-width: 672px;
  color: var(--news-text);
}

.news-hero__image-wrap {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: var(--news-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.news-hero__image-wrap picture,
.news-hero__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/**
 * Article content (classic editor HTML)
 */

.news-article {
  padding: 64px 0 24px;
}

.news-article__content {
  max-width: 864px;
  margin: 0 auto;
  color: var(--news-text);
  font-size: 16px;
  line-height: 26px;
  font-weight: 500;
  overflow-wrap: break-word;
}

.news-article__content > :first-child {
  margin-top: 0;
}

.news-article__content p {
  margin: 0 0 16px;
}

.news-article__content h1,
.news-article__content h2 {
  margin: 48px 0 16px;
  color: var(--news-dark);
  font-family: "RoobertPRO", sans-serif;
  font-size: 30px;
  line-height: 38px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.news-article__content h3 {
  margin: 36px 0 12px;
  color: var(--green1);
  font-family: "RoobertPRO", sans-serif;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

.news-article__content h4,
.news-article__content h5,
.news-article__content h6 {
  margin: 28px 0 8px;
  color: var(--news-dark);
  font-family: "RoobertPRO", sans-serif;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

.news-article__content strong,
.news-article__content b {
  font-weight: 700;
  color: var(--news-dark);
}

/* Editors often wrap whole headings in <strong> */
.news-article__content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
  color: inherit;
  font-weight: inherit;
}

.news-article__content a {
  color: var(--green1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-article__content a:hover {
  color: var(--green-hover);
}

.news-article__content ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.news-article__content ul > li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 28px;
}

.news-article__content ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--green1);
}

.news-article__content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.news-article__content ol > li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.news-article__content ol > li::marker {
  color: var(--green1);
  font-weight: 700;
}

.news-article__content li > ul,
.news-article__content li > ol {
  margin: 12px 0 0;
}

.news-article__content hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--news-border);
}

.news-article__content hr + h1,
.news-article__content hr + h2,
.news-article__content hr + h3 {
  margin-top: 0;
}

.news-article__content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--green1);
  border-radius: 0 12px 12px 0;
  background: var(--news-surface);
  color: var(--news-dark);
  font-style: italic;
}

.news-article__content blockquote > :last-child {
  margin-bottom: 0;
}

.news-article__content table {
  width: 100%;
  margin: 8px 0 32px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 22px;
}

.news-article__content th,
.news-article__content td {
  padding: 12px 16px;
  border: 1px solid var(--news-border);
  text-align: left;
  vertical-align: top;
}

.news-article__content th {
  background: var(--news-surface);
  color: var(--news-dark);
  font-weight: 600;
}

.news-article__content :where(img:not(.wp-smiley, .emoji)) {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 32px 0;
  border-radius: 12px;
}

.news-article__content img.wp-smiley,
.news-article__content img.emoji {
  display: inline;
  width: 1em;
  height: 1em;
  margin: 0 0.1em 0 0;
  vertical-align: -0.1em;
}

/* :where() keeps these low-specificity so components (e.g. [citata]) can override them */
.news-article__content :where(figure) {
  margin: 32px 0;
}

.news-article__content :where(figure img:not(.wp-smiley, .emoji)) {
  margin: 0;
}

.news-article__content figcaption,
.news-article__content .wp-caption-text {
  margin-top: 12px;
  color: var(--news-muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

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

/**
 * Archive
 */

.news-hero--archive {
  background: var(--white1);
}

.news-hero--archive .news-hero__title {
  margin-bottom: 16px;
}

.news-list {
  padding: 64px 0 96px;
  background: var(--news-surface);
}

.news-list__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.news-card {
  min-width: 0;
}

.news-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--news-border);
}

.news-card__image picture,
.news-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card__link:hover .news-card__image img {
  transform: scale(1.04);
}

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 24px 24px;
}

.news-card__title {
  margin-bottom: 8px;
  color: var(--news-dark);
  transition: color 0.2s ease;
}

.news-card__link:hover .news-card__title {
  color: var(--green1);
}

.news-card__excerpt {
  margin-bottom: 20px;
  color: var(--news-text);
}

.news-list .pagination {
  margin-top: 48px;
}

.news-list__empty {
  color: var(--news-text);
}

/**
 * Responsive
 */

@media screen and (max-width: 1150px) {
  /* Mobile header: fault bar + burger bar */
  .news-main {
    padding-top: 140px;
  }
}

@media screen and (max-width: 1100px) {
  .news-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .news-hero__image-wrap {
    aspect-ratio: 16 / 9;
  }

  .news-list__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media screen and (max-width: 740px) {
  .news-hero {
    padding: 32px 0 48px;
  }

  .news-article {
    padding-top: 40px;
  }

  .news-article__content h1,
  .news-article__content h2 {
    margin-top: 36px;
    font-size: 24px;
    line-height: 32px;
  }

  .news-article__content h3 {
    margin-top: 28px;
    font-size: 20px;
    line-height: 28px;
  }

  .news-article__content h4,
  .news-article__content h5,
  .news-article__content h6 {
    font-size: 18px;
    line-height: 26px;
  }

  .news-article__content hr {
    margin: 36px 0;
  }

  .news-article__content table {
    display: block;
    overflow-x: auto;
  }

  .news-list {
    padding: 40px 0 72px;
  }

  .news-list__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 500px) {
  /* Fault bar wraps to two lines */
  .news-main {
    padding-top: 162px;
  }
}
