/* =====================================================================
		NBC Article Stylesheet
		Organized, production-ready, using shared CSS variables
		===================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Mada:wght@300;400;500;600;700;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Prata&display=swap");

:root {
  /* Fonts */
  --tertiary-font: "Crimson Pro", "Times New Roman", serif;
  --secondary-font: "Mada", Arial, sans-serif;
  --primary-font: "Prata", Geneva, serif;

  /* Type scale */
  --nbc-font-size-sm: 12px;
  --nbc-font-size-md: 16px;
  --nbc-font-size-xl: 20px;
  --nbc-font-size-2xl: 24px;

  /* Spacing */
  --nbc-spacing-xs: 5px;
  --nbc-spacing-md: 10px;
  --nbc-spacing-lg: 15px;
  --nbc-spacing-2xl: 20px;
  --nbc-spacing-4xl: 30px;
  --nbc-spacing-5xl: 40px;

  /* Misc */
  --nbc-light-gray: #f0f0f0;
  --nbc-transition-fast: 0.2s ease;

  /* Article theme */
  --article-text-color: #2a2a2a;
  --article-hover-color: #7C4E9F;
  --article-muted-color: #555;
  --article-headline-color: #000;
  --article-accent: #ffb186;
  --article-accent-strong: #ff503c;
  --article-button-bg: var(--article-accent);
  --article-button-hover-bg: var(--article-accent-strong);
  --article-button-text: var(--article-text-color);

  /* Links */
  --article-body-list-link-underline-width: 2px;
  --article-body-list-link-underline-color: #ffb186;
  --article-body-list-link-underline-padding: 2px;
  --article-body-link-text-color: #2a2a2a;
  --article-body-link-hover-color: #ff503c;
}

/* =====================
		Global Styles
		===================== */
body {
  font-family: var(--tertiary-font) !important;
  font-size: var(--nbc-font-size-md);
  color: var(--article-text-color);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.article-header-wrapper p {
  margin: 0;
}

/* Headings use primary font */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--primary-font);
  line-height: 1.5 !important;
  font-weight: normal !important;
}

/* Explicit header elements in article views */
.entry-header h1.entry-title,
.article-header-wrapper .article-header-subtitle,
.article-body-content .block-headline,
.article-body-content .block-headline a {
  font-family: var(--primary-font);
  line-height: 1.5 !important;
  font-weight: normal !important;
}

/* Utility: use secondary font when needed */
.font-secondary {
  font-family: var(--secondary-font) !important;
}

/* =====================
		Article Entry Header
		===================== */

:root {
  --nbc-gray: #555;
}

.entry-header h1.entry-title {
  color: var(--article-text-color);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.1;
  margin: 0;
}

@media only screen and (min-width: 758px) {
  .entry-header h1.entry-title {
    font-size: 40px;
  }
}

@media only screen and (min-width: 1000px) {
  .entry-header h1.entry-title {
    font-size: 48px;
  }
}

/* page spacing handled globally */

/* =====================
		Article Details Section
		===================== */
.article-details-wrapper {
  display: flex;
  flex-direction: column;
  padding: var(--nbc-spacing-2xl) 0;
}

.article-details-wrapper .article-details-published-date {
  color: var(--article-muted-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  font-family: var(--secondary-font);
}

.article-unibrow {
  color: var(--article-text-color);
  font-family: var(--secondary-font);
  font-size: var(--nbc-font-size-sm);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.article-unibrow:hover {
  color: var(--article-hover-color);
}

/* featured image spacing not used in current markup */

/* =====================
		Article Author Section
		===================== */

.article-details-authors {
  display: block;
}

@media only screen and (min-width: 758px) {
  .article-details-authors {
    display: flex;
    gap: var(--nbc-spacing-xs);
    flex-wrap: wrap;
  }
}

.article-details-author {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-details-author-wrapper {
  display: flex;
  gap: var(--nbc-spacing-md);
  min-width: 300px;
}

.other-authors {
  display: flex;
}

.other-authors.hidden {
  display: none;
}

@media only screen and (min-width: 758px) {
  .other-authors {
    display: flex;
  }
  .other-authors.hidden {
    display: block;
  }
}

.toggle-authors-btn {
  align-items: center;
  background: none;
  border: none;
  color: var(--article-muted-color);
  cursor: pointer;
  display: flex;
  font-family: var(--secondary-font);
  padding: 0;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 500;
}

@media only screen and (min-width: 758px) {
  .toggle-authors-btn {
    display: none;
  }
}

.toggle-authors-btn .less {
  display: none;
}

.toggle-authors-btn:focus,
.toggle-authors-btn:hover {
  color: var(--article-text-color);
}

.toggle-authors-btn.open svg {
  transform: rotate(180deg);
}

.toggle-authors-btn.open .less {
  display: inline-block;
}

.toggle-authors-btn.open .more {
  display: none;
}

.article-details-author-name-wrapper {
  display: flex;
  flex-direction: column;
}

.article-details-wrapper .article-details-author-avatar {
  width: 45px;
  height: 45px;
  object-fit: cover;
}

.article-details-wrapper p {
  margin: 0;
}

.article-details-wrapper .article-details-author-name {
  color: var(--article-text-color);
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  font-family: var(--secondary-font);
}

.article-details-wrapper .article-details-author-role {
  color: var(--article-muted-color);
  font-size: 14px;
  font-weight: 400;
  line-height: 150%;
  font-family: var(--tertiary-font);
}

/* =====================
		Article Header Section
		===================== */
.post-content .entry-header.article-header {
  margin-bottom: var(--nbc-spacing-5xl);
}

.article-header-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-header-wrapper .article-header-subtitle {
  color: var(--article-muted-color);
  font-size: var(--nbc-font-size-xl);
  font-weight: 400 !important;
  font-family: var(--tertiary-font) !important;
  line-height: 1.5 !important;
}

@media only screen and (min-width: 1000px) {
  .article-header-wrapper .article-header-subtitle {
    font-size: var(--nbc-font-size-2xl);
  }
}

/* =====================
		Article Body Content
		===================== */
.article-body-content {
  max-width: 880px;
  margin: 0 auto;
}

.article-body-content p {
  color: var(--article-text-color);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

.article-body-content p a {
  color: var(--article-body-link-text-color) !important;
  text-decoration: none;
  box-shadow: none !important;
  transition: var(--nbc-transition-fast);
  border-bottom: var(--article-body-list-link-underline-width) solid
    var(--article-body-list-link-underline-color);
  padding-bottom: var(--article-body-list-link-underline-padding);
}

.article-body-content p a:hover {
  color: var(--article-body-link-hover-color) !important;
  box-shadow: none !important;
}

/* Paragraph link styling parity for BEM variant and list items */
body.today .article-body-content .body-list-el > li a,
body.today .article-body-content p a {
  border-bottom: var(--article-body-list-link-underline-width) solid
    var(--article-body-list-link-underline-color);
  padding-bottom: var(--article-body-list-link-underline-padding);
}

.article-body-content .body-list-el > li a,
.article-body-content p a {
  color: var(--article-body-link-text-color);
}

.article-body-content .body-list-el > li a:hover,
.article-body-content p a:hover {
  color: var(--article-body-link-hover-color);
}

/* Support alternate markup class name used elsewhere */
body.today .article-body__content .body-list-el > li a,
body.today .article-body__content p a {
  border-bottom: var(--article-body-list-link-underline-width) solid
    var(--article-body-list-link-underline-color);
  padding-bottom: var(--article-body-list-link-underline-padding);
}

.article-body__content .body-list-el > li a,
.article-body__content p a {
  color: var(--article-body-link-text-color);
}

.article-body__content .body-list-el > li a:hover,
.article-body__content p a:hover {
  color: var(--article-body-link-hover-color);
}

/* Scoped anchor reset for article body */
.article-body-content a {
  background: transparent;
  outline: none;
  text-decoration: none;
}

.article-body-content .block-headline,
.article-body-content .block-headline a {
  color: var(--article-headline-color);
  font-size: var(--nbc-font-size-xl);
  font-family: var(--secondary-font);
  font-weight: 900;
  line-height: 36px;
  transition: var(--nbc-transition-fast);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-decoration-style: solid;
  text-decoration-thickness: 2px;
  text-size-adjust: 100%;
  text-underline-offset: 3px;
  text-underline-position: from-font;
  text-decoration-color: var(--article-accent);
  font-weight: 700 !important;
}

@media only screen and (min-width: 758px) {
  .article-body-content .block-headline a {
    font-size: var(--nbc-font-size-2xl);
  }
}

.article-body-content .block-headline a:hover {
  color: var(--article-accent-strong) !important;
}

/* =====================
		Item Block Grid Layout
		===================== */
.item-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--nbc-spacing-4xl) 50px;
  align-items: start;
  margin-bottom: var(--nbc-spacing-4xl);
}

.item-block .block-headline {
  grid-column: 1 / -1;
  margin: 0;
}

.item-block figure {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* figcaption exists but not displayed */
.item-block figure figcaption {
  display: none;
}

.item-block figure a {
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

@media only screen and (min-width: 758px) {
  .item-block figure a {
    max-width: 270px;
    min-width: 270px;
  }
}

.item-block figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.item-block .item-body {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-bottom: var(--nbc-spacing-lg);
}

/* Ensure any additional descriptive paragraphs span full width and do not occupy the CTA cell */
.item-block p:not(:has(.find_now)) {
  grid-column: 1 / -1;
  grid-row: auto;
}

.item-block p:has(.find_now) br {
  display: none;
}

.item-block p:has(.find_now) {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: var(--nbc-spacing-md);
  min-height: 100%;
  width: 100%;
}

@media only screen and (min-width: 758px) {
  .item-block p:has(.find_now) {
    align-items: flex-start;
  }
}

/* =====================
		Button Links Styling
		===================== */
.item-block .button_link {
  align-items: center;
  background-color: var(--article-button-bg);
  border: none !important;
  color: var(--article-button-text);
  display: flex;
  font-family: var(--secondary-font) !important;
  font-size: var(--nbc-font-size-md);
  font-weight: 400 !important;
  gap: var(--nbc-spacing-xs);
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.5;
  max-width: 335px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  transition: var(--nbc-transition-fast);
  width: 100%;
}

.item-block .button_link:hover {
  background-color: var(--article-button-hover-bg);
  color: var(--article-button-text) !important;
}

/* =====================
		Responsive Design
		===================== */
@media (max-width: 758px) {
  .item-block {
    display: flex;
    flex-direction: column;
    gap: var(--nbc-spacing-lg);
  }

  .item-block .block-headline {
    margin-bottom: var(--nbc-spacing-lg);
    order: 1;
  }

  .item-block figure {
    margin: 0;
    order: 2;
    align-items: center;
    justify-content: center;
  }

  .item-block figure a {
    width: 100%;
    height: auto;
    max-width: 335px;
  }

  .item-block figure img {
    width: 100%;
    height: 100%;
  }

  .item-block p:has(.find_now) {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--nbc-spacing-md);
    width: 100%;
    order: 3;
  }

  .item-block .item-body {
    margin-bottom: var(--nbc-spacing-lg);
    order: 4;
  }
}

/* =====================
		Fallback for browsers that don't support :has()
		===================== */
@supports not (selector(:has(*))) {
  .item-block p:last-child {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--nbc-spacing-md);
    min-height: 100%;
  }

  @media (max-width: 758px) {
    .item-block p:last-child {
      margin: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-start;
      gap: var(--nbc-spacing-md);
      width: 100%;
      order: 3;
    }
  }
}

.article-hero__caption {
  color: #555;
  font-family: var(--secondary-font);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  position: relative;
  margin-top: 1rem;
}

@media (min-width: 758px) {
  .article-hero__caption {
    font-size: 14px;
  }
}

/* =====================
		Disclaimer Section
		===================== */
@media only screen and (min-width: 758px) {
  .disclaimer-container {
    min-height: 61px;
  }
}

@media only screen and (max-width: 758px) {
  .ecommerce-disclaimer p {
    font-size: 14px;
    text-align: left;
  }
  body .ecommerce-disclaimer {
    padding: 20px;
  }
}

.disclaimer-container {
  height: 100%;
}

.ecommerce-disclaimer {
  background-color: #ebebeb;
  color: #555;
  font-family: var(--tertiary-font);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
  margin: initial;
  min-height: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
}

.ecommerce-disclaimer__content {
  margin: 0;
}

.ecommerce-disclaimer__content a {
  color: #555;
  border-bottom: 2px solid #ffb186;
  padding-bottom: 1px;
  transition: color 0.25s;
}

.ecommerce-disclaimer__content a:hover {
  color: #ff503c;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
}

@media (max-width: 1000px) {
  .mobile-only {
    display: flex;
  }
  .desktop-only {
    display: none;
  }
}

.other-authors.hidden {
  display: none;
}

/* =====================
    Prefooter Section
    ===================== */
.article-prefooter h2 {
  font-family: var(--secondary-font);
  font-size: 32px;
  font-weight: 700 !important;
  color: #2a2a2a;
  margin-top: 48px;
  margin-bottom: 24px;
}

.article-prefooter p {
  font-family: var(--tertiary-font);
  font-size: 20px;
  line-height: 30px;
  color: #2a2a2a;
  margin: 24px 0;
}

.article-prefooter a {
  color: #2a2a2a;
  text-decoration: none;
  box-shadow: none !important;
  border-bottom: 2px solid #ffb186;
  margin-bottom: 0;
  padding-bottom: 0;
  transition: color 0.25s ease;
}

.article-prefooter a:hover {
  color: #ff503c;
}

.article-bottom-authors {
  max-width: 560px;
  margin: 0px auto;
}

.article-bottom-authors-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.article-bottom-author {
  display: flex;
  gap: 20px;
  width: 100%;
  padding-top: 32px;
  position: relative;
}

.article-bottom-author:before {
  background: var(--article-accent);
  clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 100%);
  content: "";
  height: 16px;
  position: absolute;
  top: 0;
  width: 100%;
}

.article-bottom-author img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

.article-details-author-name-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.article-details-author-name-wrapper p {
  margin: 0;
}

.article-details-author-name {
  font-size: 20px;
  font-weight: 400;
  font-family: var(--secondary-font);
  line-height: 30px;
  color: #2a2a2a;
}

.article-details-author-role {
  font-size: 12px;
  font-weight: 400;
  font-family: var(--tertiary-font);
  color: #555555;
}

.article-hero__caption {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.article-hero__caption-text {
  font-size: 14px;
  font-family: var(--secondary-font);
  color: #555555;
  font-weight: 400;
  line-height: 1.2;
  margin-right: 4px;
}

.article-hero__source {
  font-size: 12px;
  font-family: var(--secondary-font);
  color: #555555;
  font-weight: 700;
  line-height: 1.2;
  line-height: -0.04em;
}
