/**
 * Newsroom module — overrides on top of modules/shared/frontend/assets/css/article.css
 */

/* ==========================================================================
   Design tokens & heading typography
   ========================================================================== */

body.news-module-frontend,
.news-page {
  --fontstack-heading: "Sora", sans-serif;
}

body.news-module-frontend .news-page h1.page-title,
body.news-module-frontend .news-page .blogs-listing-title.page-title,
.news-page.blogs-detail-page h1.page-title,
.news-page.news-page--listing h1.blogs-listing-title.page-title,
.news-page.news-page--category h1.blogs-listing-title.page-title {
  font-family: "Sora", sans-serif;
}

/* ==========================================================================
   Site header — section title beside logo (header v2)
   ========================================================================== */

@media (min-width: 1025px) {
  body.news-module-frontend.news-module-frontend--section-title .bristol-header-v2__tagline--news-section {
    display: block !important;
    margin: 0;
    font-family: var(--fontstack-heading);
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
    color: var(--secondary-color, #161b20);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.news-module-frontend.news-module-frontend--section-title .bristol-header-v2__brand {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 1024px) {
  /* Match blogs: section name only in the mobile category bar, not duplicated in site header. */
  body.news-module-frontend.news-module-frontend--section-title .bristol-header-v2__tagline--news-section {
    display: none !important;
  }
}

/* ==========================================================================
   Page head band (hidden on public FE; styles retained for parity)
   ========================================================================== */

.news-page-head-band.blogs-approval-page-head {
  display: none !important;
  border-bottom: 1px solid var(--border-color, #e3e6e5);
  background: #fff;
}

.news-page-head-band .blogs-approval-page-head__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 0 20px;
}

.news-page-head-band .blogs-approval-page-head__title {
  grid-column: 2;
  text-align: center;
  font-family: var(--fontstack-heading);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  margin: 0;
}

.news-page-head-band .blogs-approval-page-head__tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.news-page-head-band .blogs-approval-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-page-head-band .blogs-approval-subnav a.is-active {
  color: var(--primary-color, #b01c2e);
  font-weight: 600;
  text-decoration: underline;
}

.news-page-head-band .news-page-head-band__title-link {
  color: inherit;
  text-decoration: none;
}

.news-page-head-band .news-page-head-band__title-link:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .news-page-head-band .blogs-approval-page-head__inner {
    grid-template-columns: 1fr;
  }

  .news-page-head-band .blogs-approval-page-head__title {
    grid-column: 1;
    text-align: left;
    font-size: 28px;
    line-height: 36px;
  }

  .news-page-head-band .blogs-approval-page-head__tools {
    grid-column: 1;
    justify-self: start;
  }
}

/* ==========================================================================
   Shared buttons & filters
   ========================================================================== */

.blogs-all-news-cta {
  margin-top: 24px;
}

.blogs-figma-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--fontstack-heading);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.blogs-figma-btn--primary {
  background: var(--primary-color, #b01c2e);
  color: #fff;
  padding: 16px;
}

.blogs-figma-btn--primary:hover {
  background: #881321;
  color: #fff;
  text-decoration: none;
}

.blogs-figma-btn--light {
  background: #fff;
  color: #333;
  padding: 8px;
}

.blogs-figma-btn--light:hover {
  background: #f6f6f6;
  color: #333;
  text-decoration: none;
}

.news-filters-sidebar .news-filter-categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-page.blogs-page .social-side-navigation-box .social-side-navigation-item img {
  filter: brightness(0);
}

/* ==========================================================================
   Page layout — listing vs single article
   ========================================================================== */

/* Listing only — clip horizontal bleed; singles need default overflow so full-bleed nav isn’t clipped. */
.news-page.blogs-page:not(.news-page--single) {
  overflow-x: clip;
}

/* Single article: 24px top spacing below breadcrumb (Figma); blogs detail tokens via inline CSS. */
.news-page.news-page--single.page-wrapper-body {
  padding-top: 24px;
}

.news-page.news-page--single h1.page-title {
  margin-bottom: 24px;
}

.news-page.news-page--single .blog-article-tags {
  margin-top: 24px;
}

/* News detail has no byline; drop blog meta min-height reserved for author + dates. */
.news-page.blogs-detail-page .blog-article-meta,
.news-page.news-page--single .blog-article-meta {
  min-height: 0;
}

/* ==========================================================================
   Breadcrumbs — grey bar, dark links (not Yoast pink)
   ========================================================================== */

.news-module-frontend .breadcrumb-section .breadcrumbs {
  background-color: var(--grey-color, #f6f6f6);
}

.news-module-frontend .breadcrumb-section .breadcrumbs li a {
  color: #333;
  text-decoration: none;
}

.news-module-frontend .breadcrumb-section .breadcrumbs li a:hover,
.news-module-frontend .breadcrumb-section .breadcrumbs li a:focus {
  text-decoration: underline;
}

.news-module-frontend .breadcrumb-section .breadcrumbs li:last-child span {
  color: #333;
  font-weight: 400;
}

/* ==========================================================================
   Listing cards — title/image links only (no full-card overlay)
   ========================================================================== */

.news-page .blog-card-link::after {
  content: none;
  display: none;
}

.news-page .blog-card-image-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-page .blog-card-image-link:hover {
  text-decoration: none;
}

.news-page .blog-card-image-link img {
  display: block;
  width: 100%;
}

.news-page .blog-meta,
.news-page .blog-description {
  position: relative;
  z-index: 2;
}

.news-page .all-blogs-list > .news-empty-state {
  display: block;
}

.news-page .blog-card-link {
  position: relative;
  z-index: 2;
}

.news-page .blog-card-link,
.news-page .blog-card-link h3 {
  word-break: normal;
  overflow-wrap: anywhere;
}

.news-page .news-post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.news-page .news-post-categories .blog-category {
  text-decoration: none;
  color: #000;
}

.news-page .news-post-categories .blog-category:hover {
  background: #d5d9d8;
  color: #000;
  text-decoration: none;
}

/* ==========================================================================
   Single — external article CTA
   ========================================================================== */

.news-page .news-external-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 32px 0 0;
}

.news-page .news-external-cta__source {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.news-page .news-external-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  word-break: normal;
  /* .cms-card a { color: #b01c2e } in theme style.css overrides .btn-primary otherwise */
  color: var(--white-color, #fff) !important;
  border: 1px solid var(--primary-color, #b01c2e);
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  border-radius: 4px;
}

.news-page .news-external-cta__link:hover,
.news-page .news-external-cta__link:focus,
.news-page .news-external-cta__link:active {
  color: var(--white-color, #fff) !important;
  text-decoration: none;
  background-color: var(--hover-red-color, #881321);
  border-color: var(--hover-red-color, #881321);
}

.news-page .news-external-cta__link .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
  position: static;
  width: auto;
  height: auto;
}

.news-page .news-external-cta__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.news-page .news-external-cta__note {
  margin: 0;
  font-size: 13px;
  opacity: 0.75;
}

/* ==========================================================================
   Listing — H1, pagination, other featured sidebar
   ========================================================================== */

.news-page.news-page--listing h1.blogs-listing-title.page-title,
.news-page.news-page--category h1.blogs-listing-title.page-title {
  border-bottom: 0.25rem double #e3e6e5;
  color: var(--primary-color, #b01c2e);
  margin-bottom: 24px;
  padding-bottom: 12px;
  font-family: "Sora", sans-serif;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
}

/* Listing pagination — grey top rule only; red stroke stays on “Other featured news” card. */
.news-page #news-pagination-wrap:not(:empty) .news-pagination.blogs-pagination {
  margin-top: 32px;
  padding: 24px 0 24px;
  border-top: 1px solid #e3e6e5;
  border-bottom: none;
}

/* Other featured news sidebar card — red top stroke on desktop sidebar (Figma). */
.news-page .news-other-featured.aside-cms-card.cms-card {
  border: 1px solid #e3e6e5;
  border-top: 8px solid var(--primary-color, #b01c2e);
  border-radius: 8px 8px 4px 4px;
  padding: 24px;
  background-color: #fff;
  margin-bottom: 0;
}

.news-page .news-other-featured.aside-cms-card h2.heading-text-xxs {
  font-family: var(--fontstack-heading);
  margin-bottom: 16px;
}

/* ==========================================================================
   Responsive — max-width 991px (tablet / mobile nav drawer)
   ========================================================================== */

@media (max-width: 991px) {
  /* Theme zeros .page-wrapper-body padding on mobile/tablet. */
  .news-page.news-page--single.page-wrapper-body {
    padding-top: 0;
  }

  .news-page.news-page--single .cms-center {
    margin-top: 24px;
  }

  .news-page.news-page--single .row > .col-md-4.col-lg-3 {
    margin-top: 24px;
  }

  .news-page.news-page--single .news-other-featured.aside-cms-card.cms-card {
    margin-top: 24px;
    margin-bottom: 24px;
  }

  .news-page.news-page--listing h1.blogs-listing-title.page-title,
  .news-page.news-page--category h1.blogs-listing-title.page-title {
    font-size: 28px;
    line-height: 36px;
    margin-top: 24px;
  }

  .news-page #news-pagination-wrap:not(:empty) .news-pagination.blogs-pagination {
    margin-top: 24px;
    padding: 16px 0 0;
  }

  .news-page.news-page--listing #news-right-sidebar,
  .news-page.news-page--category #news-right-sidebar {
    margin-top: 24px;
  }

  .news-page.news-page--listing .cms-center,
  .news-page.news-page--category .cms-center {
    margin-top: 24px;
    margin-bottom: 24px;
  }

  /* One red stroke on the card (Figma), not pagination + card. */
  .news-page.news-page--listing .news-other-featured.aside-cms-card.cms-card,
  .news-page.news-page--category .news-other-featured.aside-cms-card.cms-card {
    border: 1px solid #e3e6e5;
    border-top: 8px solid var(--primary-color, #b01c2e);
    border-radius: 8px 8px 4px 4px;
    margin-bottom: 24px;
  }

  .news-page .featured-blogs-list .blog-section--list {
    padding: 16px 0;
    border-top: 1px solid #e3e6e5;
  }

  .news-page .featured-blogs-list .blog-section--list:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .news-page .featured-blogs-list .blog-section--list:last-child {
    padding-bottom: 0;
  }

  .news-page .featured-blogs-list .blog-image img {
    width: 79px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
  }

  .news-page .featured-blogs-list .blog-meta p {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    color: #666;
  }

  /* Slightly larger close/menu tap target on news (same inline drawer behaviour as blogs). */
  .news-page button.mob-nav-toggle {
    width: 72px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .news-page .side-navigation-header {
    padding-right: 76px !important;
  }
}

/* ==========================================================================
   Responsive — max-width 767px (stacked columns)
   ========================================================================== */

@media (max-width: 767px) {
  .news-page.blogs-detail-page .blog-article-meta {
    min-height: 0;
  }

  .news-page .all-blogs-list > .news-empty-state {
    display: block;
  }

  .news-page.news-page--listing h1.blogs-listing-title.page-title,
  .news-page.news-page--category h1.blogs-listing-title.page-title {
    margin-top: 0;
  }
}
