.editorial-card {
  --card-height-default: 213px;
  --card-scale-default: 1.03;

  border: 1px solid var(--color-gray-300);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateZ(0);
}

.editorial-card,
.editorial-card::after,
.editorial-card::before {
    box-sizing: border-box;
}

.section.masonry-layout > .editorial-card[class*='grid-span-'] {
  display: flex;
}

.dark .editorial-card,
.editorial-card.dark {
  color: #fff;
  border-color: var(--color-gray-700);
}

.light .editorial-card,
.editorial-card.light {
  color: var(--text-color);
  border-color: var(--color-gray-300);
}

.editorial-card.no-bg { background: none !important; }
.editorial-card.no-bg .background { display: none; }
.editorial-card.no-border { border: none; }

.editorial-card.click {
  cursor: pointer;
}

.editorial-card.click.hover-scale {
  transition: all .2s ease-in-out;
}

.editorial-card.click.hover-scale:hover {
  transform: scale(var(--card-scale-default));
}

.editorial-card:not(.no-bg).click.hover-scale:hover {
  box-shadow: 0 3px 6px 0  rgba(0 0 0 / 16%);
}

.editorial-card .action-area a:not([class*="button"]) {
  font-size: var(--type-body-s-size);
}

.editorial-card.static-links-copy .foreground a:not([class*="button"]) {
  color: inherit;
  text-decoration: underline;
}

[class*=-up] .editorial-card {
  max-width: none;
  width: 100%;
  min-width: initial;
}

.editorial-card.equal-height {
  height: 100%;
}

.editorial-card .media-area picture,
.editorial-card .foreground picture {
  line-height: 0;
  display: block;
  height: 100%;
}

.editorial-card .media-area img,
.editorial-card .media-area video {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
  max-height: var(--card-height-default);
}

.editorial-card .video-icon-container {
  position:relative;
}

.editorial-card .video-icon-container img.video-icon {
  pointer-events: none;
  position:absolute;
  bottom: -15px;
  right: 15px;
  height: 50px;
  width: auto;
}

.editorial-card.no-foreground,
.editorial-card.no-foreground .media-area {
  height: 100%;
}

.editorial-card.no-foreground .media-area img,
.editorial-card.no-foreground .media-area video {
  max-height: unset;
}

.editorial-card .media-area .modal-img-link {
  display: block;
}

.editorial-card .foreground,
.editorial-card .card-footer {
  padding: var(--spacing-xs);
}

.editorial-card .extra-row {
  padding: 0 var(--spacing-xs);
}

.editorial-card .card-footer {
  padding-top: 0;
  margin-top: auto;
}

.editorial-card .vp-media .tablet-only,
.editorial-card .vp-media .desktop-only {
  display: none;
}

.editorial-card .card-footer > div {
  display: flex;
  flex-direction: column;
  text-align: end;
  justify-content: end;
  row-gap: var(--spacing-xxs);
}

.editorial-card .card-footer.empty { padding: 0; }

.editorial-card.no-bg.no-border .foreground {
  padding: var(--spacing-s) 0;
}

.editorial-card.no-bg.no-media > .foreground {
  padding-top: 0;
}

.editorial-card.no-bg.no-border .static,
.editorial-card.no-bg.no-border .card-footer {
  padding-inline: 0;
}

.editorial-card .foreground > div {
  display: flex;
  flex-direction: column;
  row-gap: var(--spacing-xxs);
}

.editorial-card .background > div {
  height: 100%;
}

.editorial-card .media-area > div {
  line-height: 0;
}

.editorial-card.no-foreground {
  border: none;
}

.editorial-card.no-foreground .media-area > div {
  height: 100%;
}

.editorial-card.footer-align-left .card-footer > div { text-align: start; }
.editorial-card.footer-align-center .card-footer > div { text-align: center; }

.editorial-card.no-bg.no-border .foreground > div {
  row-gap: var(--spacing-xs);
}

.editorial-card .background img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.editorial-card .background .milo-video,
.editorial-card .background .milo-iframe {
  height: 100%;
  padding-bottom: 0;
}

.editorial-card .lockup-area,
.editorial-card .device {
  margin: 0;
}

.editorial-card .device {
  font-size: var(--type-body-xxs-size);
  line-height: var(--type-body-xxs-lh);
}

.editorial-card .lockup-area {
  row-gap: var(--spacing-xxs);
}

.editorial-card .lockup-label {
  line-height: initial;
}

.editorial-card .action-area,
.editorial-card .card-footer > .action-area {
  display: flex;
  align-items: center;
  justify-content: right;
  gap: var(--spacing-xs) var(--spacing-s);
  flex-flow: wrap;
  flex-direction: row;
}

.editorial-card .action-area .con-button { 
  white-space: nowrap;
}

.editorial-card.center .action-area {
  justify-content: center;
}

.editorial-card hr {
  background-color: currentcolor;
  border: none;
  height: 1px;
  width: 100%;
  margin: var(--spacing-xxs) 0;
}

.editorial-card .background {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.editorial-card .media-area {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.editorial-card .media-area.background {
  position: relative;
  z-index: initial;
}

.editorial-card .media-area.background video {
  position: relative;
}

.editorial-card:is(.media-square, .media-wide, .media-standard, .media-tall) .media-area .milo-video {
  height: auto;
  padding: 0;
}

/* Aspect Ratio */
.editorial-card.media-square .media-area img,
.editorial-card.media-square .media-area video {
  aspect-ratio: var(--aspect-ratio-square);
  max-height: unset;
}

.editorial-card.media-wide .media-area img,
.editorial-card.media-wide .media-area video {
  aspect-ratio: var(--aspect-ratio-wide);
  max-height: unset;
}

.editorial-card.media-standard .media-area img,
.editorial-card.media-standard .media-area video {
  aspect-ratio: var(--aspect-ratio-standard);
  max-height: unset;
}

.editorial-card.media-tall .media-area img,
.editorial-card.media-tall .media-area video,
.editorial-card.media-tall .media-area .milo-video {
  aspect-ratio: var(--aspect-ratio-tall);
  max-height: unset;
}

/* Media Height */
.editorial-card.media-height-auto .media-area img,
.editorial-card.media-height-auto .media-area video {
  max-height: unset;
}

/* Align */
.editorial-card.center {
  text-align: center;
  justify-items: center;
}

.editorial-card.footer-align-left .action-area { justify-content: start; }
.editorial-card.footer-align-center .action-area { justify-content: center; }

/* s2a */
.editorial-card .s2a-card-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #fff;
  padding: 56px 50px;
}

.editorial-card .s2a-card-overlay button {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 26px;
  right: 16px;
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 50%;
}

.editorial-card .s2a-card-overlay button .overlay-btn-icon {
  display: block;
  text-align: center;
  color: black;
  font-size: 24px;
  font-weight: 900;
  height: 100%;
  width: 100%;
  line-height: 1;
}

.editorial-card .s2a-card-overlay h1 {
  all: unset;
  font-size: 28px;
  font-weight: 900;
}

.editorial-card .s2a-card-overlay p {
  visibility: hidden !important;
  all: unset;
  font-size: 20px;
  font-weight: 400;
}

.editorial-card .s2a-card-overlay {
  transition: background 1s;
}

.editorial-card .s2a-card-overlay.active {
  background: rgba(0, 0, 0, 0.6);
}

.editorial-card .s2a-card-overlay p {
  opacity: 0;
  visibility: hidden !important;
  transition: opacity 1s;
}

.editorial-card .s2a-card-overlay.active p {
  opacity: 1;
  visibility: visible !important;
}

/* Tablet up */
@media screen and (min-width: 600px) {
  .editorial-card .vp-media .mobile-only,
  .editorial-card .vp-media .desktop-only {
    display: none;
  }

  .editorial-card .vp-media .tablet-only { display: block; }

  .editorial-card .action-area .con-button {
    white-space: nowrap;
  }
}

/* desktop up */
@media screen and (min-width: 1200px) {
  .editorial-card .vp-media .mobile-only,
  .editorial-card .vp-media .tablet-only {
    display: none;
  }

  .editorial-card.s2a-editorial-accordion .lockup-area {
    margin-bottom: 12px;
  }

  .editorial-card .vp-media .desktop-only { display: block; }
}

/* mobile only */
@media screen and (max-width: 700px) {
  .section.two-up-mobile:has(.editorial-card) {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
  }
}


body .editorial-card .s2a-card-overlay button.s2a-card-overlay-btn  .overlay-btn-icon {
  display: inline-block;
}

body .editorial-card .s2a-card-overlay.active button.s2a-card-overlay-btn  span.overlay-btn-icon.open { 
  display: none !important;
}

body .editorial-card .s2a-card-overlay.active button.s2a-card-overlay-btn  span.overlay-btn-icon.close { 
  display: inline-block ! important;
}

body .editorial-card .s2a-card-overlay:not(.active) button.s2a-card-overlay-btn  span.overlay-btn-icon.close { 
  display: none !important;
}

/* media stacking */
@media screen and (max-width: 599px) {
  .editorial-card.s2a-media-bottom-mobile .media-area {
    order: 2;
  }

  .editorial-card.s2a-media-bottom-mobile .video-icon-container {
    order: 3;
    bottom: 32px;
  }
}
@media screen and (min-width: 600px) and (max-width: 1199px) {
  .editorial-card.s2a-media-bottom-tablet .media-area {
    order: 2;
  }

  .editorial-card.s2a-media-bottom-tablet .video-icon-container {
    order: 3;
    bottom: 32px;
  }
}

@media screen and (min-width: 1200px) {
  .editorial-card.s2a-media-bottom-desktop .media-area {
    order: 2;
  }

  .editorial-card.s2a-media-bottom-desktop .video-icon-container {
    order: 3;
    bottom: 32px;
  }
}

/* s2a overlay height settings */
@media screen and (min-width: 600px) and (max-width: 1560px) {
  .editorial-card.s2a-overlay {
    min-height: 550px !important;
  }
}

/* accordion card styling */
@media screen and (max-width: 599px) {
  .editorial-card.s2a-editorial-accordion {
    border-radius: 8px !important;
  }

  .editorial-card > .foreground > [class*="body-"] {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .editorial-card.s2a-editorial-accordion > .foreground > [class*="body-"] {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .editorial-card > .foreground > [class*="body-"] > .lockup-area {
    display: flex;
    width: 13%;
  }

  .editorial-card > .foreground > [class*="body-"] > :is(h1, h2, h3, h4, h5, h6) {
    display: flex;
  }

  .editorial-card.s2a-editorial-accordion > .foreground > [class*="body-"] > :is(h1, h2, h3, h4, h5, h6) {
    width: 76.5%;
  }

  .editorial-card > .foreground > [class*="body-"] > .s2a-card-accordion-btn {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    width: 10%;
    margin-left: 5px;
    background: none;
    border: none;
    padding-right: 0;
  }

  .editorial-card > .foreground > [class*="body-"] > .s2a-card-accordion-btn > div {
    height: 19px;
    width: 19px;
    border-radius: 100px;
    background: var(--color-gray-300);
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
  }

  .editorial-card.editorial-card.s2a-editorial-accordion > .foreground > [class*="body-"] > .lockup-area picture > img {
    height: 25px !important;
    width: 25px !important;
    margin-right: 10px;
  } 

  .editorial-card.s2a-editorial-accordion .editorial-accordion-item.active {
    display: flex; 
    margin-left: 12.5%;
  }

  .editorial-card.s2a-editorial-accordion .editorial-accordion-item {
    display: none;
  }
}

@media screen and (min-width: 600px) {
  .editorial-card.s2a-editorial-accordion .s2a-card-accordion-btn {
    display: none;
  }

  .editorial-accordion-item.active, .editorial-accordion-item {
    display: block;
  }
}

.s2a-card-accordion-btn:not(.active) .accordion-btn-icon.open {
  display: flex;
}

.s2a-card-accordion-btn:not(.active) .accordion-btn-icon.close {
  display: none;
}

.s2a-card-accordion-btn.active .accordion-btn-icon.open {
  display: none;
}

.s2a-card-accordion-btn.active .accordion-btn-icon.close {
  display: flex;
}

/* no spacing on editorial within other blocks */
.section.s2a-editorial-no-margins[class*="-up"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* media button styling when nested */
.editorial-card.s2a-editorial-compact .lockup-area {
  margin-bottom: var(--spacing-xxs) !important;
}

.editorial-card.s2a-editorial-compact .foreground > div > p[class*="body-"] > a {
  text-decoration: none;
  font-family: var(--heading-font-family) !important;
  font-weight: 900 !important;
}

.editorial-card.s2a-editorial-compact .foreground > div > p[class*="body-"] > a:hover {
  text-decoration: underline;
}

.editorial-card.s2a-editorial-compact .lockup-area picture > img  { 
  height: 30px; 
  width: 30px;
}

.editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > [class*="body-"],
.editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > [class*="heading-"],
.editorial-card.s2a-editorial-compact .foreground > div[class*="body-"],
.editorial-card.s2a-editorial-compact .foreground[class*="body-"] {
  margin-bottom: 0 !important;
}

.editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > [class*="body-"] > a:not(button),
.editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > [class*="heading-"] > a:not(button) {
  text-decoration: none;
  margin-left: 5px;
}

@media screen and (min-width: 1200px) {
  .aside.s2a-background .foreground > div.text:has(.editorial-card.s2a-editorial-compact) {
    max-width: 100% !important;
    flex: 0 0 47.72% !important; 
  }
}

@media screen and (max-width: 1199px) {
  .aside.s2a-background .foreground > div.text:has(.editorial-card.s2a-editorial-compact) {
    min-width: 100% !important;
  }
}

@media screen and (max-width: 599px) {
  .section.three-up:has(.editorial-card.s2a-editorial-compact) {
    grid-template-columns: repeat(auto-fit, minmax(47%, 1fr));
  }

  .editorial-card.s2a-editorial-compact > .foreground > [class*="body-"] {
    flex-direction: column;
  }

  .editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > [class*="body-"],
  .editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > [class*="heading-"] {
    display: flex;
    justify-content: space-between;
  }
}

/* individual card look in mobile for homepage */
@media screen and (max-width: 599px) {
  .section.s2a-full-width-mobile:has(.editorial-card.s2a-editorial-separate-mobile) {  
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .editorial-card.s2a-editorial-separate-mobile {
    /* background: #171624 !important; */
    background: #171624 !important;
    border-radius: 16px;
  }

  .editorial-card.s2a-editorial-separate-mobile .foreground {
    padding: 30px 16px 0 16px !important;
  }

  .editorial-card.s2a-editorial-separate-mobile .card-footer {
    padding: 16px 16px 24px 16px !important;
  }

  .editorial-card.s2a-editorial-separate-mobile .foreground > div[class*="body-"] {
    display: flex;
    flex-direction: column;
  }

  .editorial-card.s2a-editorial-separate-mobile .media-area {
    border-radius: 0 0 16px 16px;
  }
}

/* aside overrides when used with editorial-card */
@media screen and (max-width: 599px) {
  .aside.s2a-background .editorial-card.editorial-card.s2a-editorial-compact {
    height: 100% !important;
  }

  .hero-marquee.s2a-hero-marquee .editorial-card.s2a-editorial-accordion .foreground {
    padding: 16px 19px !important;
  }

  .section.s2a-editorial-no-margins:has(.s2a-editorial-accordion) {
    gap: var(--spacing-xxs) !important;
  }
  
  .editorial-card.s2a-media-bottom-mobile.s2a-editorial-separate-mobile div[class*="body-"] > .lockup-area {
    width: 100% !important;
  }

  .editorial-card.s2a-editorial-accordion > .foreground > [class*="body-"] > :is(h1, h2, h3, h4, h5, h6) {
    flex: 0 1 74%;
    font-size: var(--type-heading-xs-size) !important;
  }
}

/* overrides for homepage spacing */
@media screen and (min-width: 1200px) {
  .section.s2a-full-width-mobile:has(.editorial-card.s2a-editorial-separate-mobile) {
    row-gap: 84px;
  }
}

:root .aside.s2a-background .editorial-card.editorial-card.s2a-editorial-compact .foreground > div[class*="body-"] > :is(h1 , h2, h3, h4, h5, h6) {
  font-size: var(--type-heading-s-size) !important;
}

/* homepage lockup size override */
:root .editorial-card.s2a-editorial-separate-mobile .lockup-area img {
  --icon-size-xs: 20px;
}

/* clickable area feature */
:root .editorial-card.s2a-click.s2a-click-area:hover {
  cursor: pointer;
}

:root .editorial-card.s2a-click > .card-footer:hover {
  cursor: default;
}

@media screen and (min-width: 600px) {
  :root .editorial-card.s2a-editorial-separate-mobile > .foreground {
    padding-top: 46px !important;
    padding-bottom: calc(var(--spacing-s) / 2);
  }

  :root .editorial-card.s2a-editorial-separate-mobile > .card-footer {
    padding-top: calc(var(--spacing-s) / 2);
  }
}
