/* Home layout */

.main-home {
  padding-bottom: var(--gutter);
}

@media screen and (min-width: 54em) {
  .grid-home-news {
    grid-template:
        "topnews  today" auto
        "topnews  audio" auto
        "promobox audio" auto
        "morenews audio" 1fr
        / 1fr 20rem;
  }
  .home-topnews {
    grid-area: topnews;
  }
  .home-today {
    grid-area: today;
    padding-top: var(--line-height-md);
  }
  .home-promobox {
    grid-area: promobox;
  }
  .home-morenews {
    grid-area: morenews;
  }
  .home-audio {
    grid-area: audio;
  }
}


/* Home reused component styles */

.home-segment {
  margin-block: var(--gutter);
}

.home-segment .ad {
  text-align: center;
}

@media (min-width: 75em) {
  .home-segment .ad_textWrapper {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);

  }
  .home-segment .ad_textWrapper * {
    display: inline-block;
    color: var(--color-mpr-dark-gray);
  }
  .election-embeds {
    display: flex;
  }
}

.home-card {
  margin-inline: calc(-1 * var(--gutter));
  padding: var(--line-height-md) var(--gutter);
  background-color: #fff;
  box-shadow: var(--subtle-shadow);
}

@media screen and (min-width: 40em) {
  .home-card {
    margin-inline: 0;
    padding: var(--line-height-md);
    border-radius: 0.313rem;
    overflow: hidden;
  }
}

.home-time-ago {
  color: var(--color-mpr-dark-gray);
  font-size: var(--font-size-sm);
  padding-bottom: .25rem;
}

.home-view-all {
  margin-top: 1.5rem;
}

@media (min-width: 75em) {
  .home-view-all {
    margin-top: 3rem;
  }
}

.container-triangle-bg {
  background-size: 60vh;
  background-image: url('/img/halfTriangle.png');
  background-repeat: no-repeat;
  background-position: right bottom;
}

@media (max-width: 87.5em) {
  .container-triangle-bg {
    background-image: none;
  }
}

@media (min-width: 75em) {
  .container-triangle-bg {
    padding-bottom: 1.25rem;
  }
}

@media (min-width: 87.5em) {
  .container-triangle-bg {
    padding-bottom: 5rem;
  }
}


/* Greeting and banner ad */

.home-top {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  width: 100%;
  gap: 1.25rem;
  align-items: baseline;
  justify-content: flex-start;
  text-wrap: balance;
}

.home-top .header-ad {
  width: fit-content;
  flex-grow: 0;
}

.home-top-greeting-container {
  font-size: var(--font-size-md);
  line-height: var(--line-height-md);
  text-wrap: balance;
  flex-grow: 1;
}

.home-top-greeting-container > * + * {
  margin-top: .25rem;
}

.home-weather-glance {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .25rem;
}

.home-weather-glance-temp {
  font-size: var(--font-size-3x);
}

.home-weather-glance-conditions {
  width: 2.5rem;
  height: 2.5rem;
}

@media (min-width: 54em) {
  .home-top-greeting-container {
    font-size: var(--font-size-xl);
    line-height: var(--line-height-xl);
    padding-left: var(--line-height-md);
  }
  .home-weather-glance {
    display: none;
  }
}

@media (min-width: 75em) {
  .home-top {
    width: 100%;
    flex-direction: row-reverse;
    align-items: flex-end;
    justify-content: space-between;
  }
}


/* Top story */

.home-main-story-title h2 {
  margin-bottom: var(--line-height-md);
}

.home-primary-visual {
  position: relative;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.home-main-story img {
  border-radius: 0.188rem;
}

.home-main-story-grid-gap.grid {
  gap: var(--line-height-md);
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.home-primary-visual iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.home-time-collection-container {
  display: flex;
  gap: .25rem;
}

.home-main-story-controls,
.home-stories-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.25rem;
}

.home-stories-controls {
  min-height: .5rem;
  margin-top: .5rem;
}

.home-stories-controls button {
  margin-top: 0 !important; /* override margin from btn-audio-sm */
}

.home-main-story-controls_white-text {
  color: var(--color-white);
}

.home-main-story-controls-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.home-main-story-text ul,
.home-story-text ul {
  margin-left: 1rem;
  list-style: url("/img/list-bullet-triangle.svg");
}

.home-main-story-text ul li,
.home-story-text ul li {
  margin: 1rem 0 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
}

.home-main-story-text ul a,
.home-story-text ul a {
  text-decoration: underline;
  text-decoration-color: var(--color-mpr-blue-trans);
}

.home-main-story-text ul a:active,
.home-main-story-text ul a:focus,
.home-main-story-text ul a:hover,
.home-story-text ul a:active,
.home-story-text ul a:focus,
.home-story-text ul a:hover {
  color: var(--color-mpr-button-blue-dark);
  text-decoration-color: var(--color-mpr-button-blue-dark);
}


/* Stories (latest news & more news) */

.home-stories {
  display: flex;
  flex-direction: column;
  padding-block: .5rem;
  gap: var(--line-height-xl);
}

.home-story img {
  border-radius: 0.188rem;
}

.home-story-hdg {
  margin-bottom: .5rem;
}

.home-story button {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
}

.home-story-text {
  margin-top: 1rem;
}

.home-story .category-link {
  margin-bottom: .25rem;
}

.home-story * :has(+ .category-link)::after {
  content: '\b7';
  margin-left: .25rem;
  color: var(--color-mpr-dark-gray);
}

.home-story .category-link:hover,
.homes-story .category-link:focus {
  text-decoration: underline;
}

.home-story .btn-audio-sm {
  margin-top: .5rem;
}

.home-stories-bottom {
  margin-top: .5rem;
  display: flex;
  justify-content: flex-end;
}

.home-latest-news {
  margin-top: var(--line-height-md);
}

@media (min-width: 30em) {
  .home-story-text {
    margin-top: 0;
  }

  .home-story-has-img {
    display: grid;
    grid-template-columns: 1fr 3fr;
    align-items: flex-start;
    column-gap: var(--line-height-sm);
  }

  .home-story-has-img > a:first-child:has(h3) {
    grid-column: 1 / -1;
  }
}


/* Weather */

.home-weather {
  margin-bottom: 1rem;
}

.home-weather h2 {
  font-size: var(--font-size-md);
  line-height: var(--line-height-md);
  margin-bottom: .5rem;
}

.home-weather div {
  margin-bottom: 0.625rem;
}

.home-weather div:last-of-type {
  margin-bottom: 0;
}

.home-weather svg {
  vertical-align: bottom;
}

.home-weather-first-part {
  display: flex;
  gap: var(--gutter);
  justify-content: flex-start;
  align-items: center;
}

.home-weather-first-part-inner {
  font-weight: 600;
}

.home-weather-main-temp {
  font-size: var(--font-size-3x);
  line-height: var(--line-height-3x);
}

.home-weather-time {
  text-wrap: nowrap;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-lg);
}

.home-weather-first-part .weatherIcon {
  height: 6em;
  width: fit-content;
}

.home-updraft {
  padding-bottom: var(--gutter);
}

.home-updraft-meteorologists {
  margin-block: 1rem;
  width: fit-content;
}

.home-updraft-met-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin: var(--line-height-md) 0 .5rem;
}

.home-updraft-met-photos > img {
  display: block;
  width: 100%;
  max-width: 180px;
  border-radius: .188rem;
}

.home-updraft button {
  text-transform: uppercase;
}

.home-updraft-heading {
  display: flex;
  align-items: center;
  margin-bottom: .5rem;
}

.home-updraft-subtitle {
  font-weight: 600;
  text-wrap: pretty;
}

.home-updraft-heading svg {
  padding-right: .5rem;
}

.home-updraft-inner-container {
  display: grid;
  align-items: flex-start;
  grid-template-columns: 25% 75%;
  margin: 0.5rem auto 0;
}


/* Sidebar ad */

.home-sidebar-ad {
  width: fit-content;
  margin-inline: auto;
  padding-bottom: 1rem;
}

.home-sidebar-ad .ad_textWrapper {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  padding: .25rem;
  background-color: transparent;
}

.home-sidebar-ad .ad_textWrapper a {
  color: var(--color-mpr-button-blue-dark);
}
.home-sidebar-ad .ad_textWrapper a:active
.home-sidebar-ad .ad_textWrapper a:focus
.home-sidebar-ad .ad_textWrapper a:hover {
  color: var(--color-mpr-charcoal);
}

@media screen and (min-width: 42em) {
  .home-weather-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--line-height-md);
  }
  .home-sidebar-ad {
    margin-top: 4rem;
  }
}
@media screen and (min-width: 54em) {
  .home-weather-sidebar {
    display: block;
  }
  .home-sidebar-ad {
    margin-top: 0;
  }
}

/* Minnesota Today */

.home-mn-today {
  background-color: var(--color-mpr-charcoal);
  color: #fff;
  padding: var(--line-height-md);
  border-radius: 3px;
  margin-top: 1rem;
}

.home-mn-today-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  margin-bottom: 1rem;
}

.home-mn-today-img img {
  border-radius: 3px;
  max-width: 7rem;
  max-height: 7rem;
}

.home-mn-today-player-controls .btn-round {
  flex-direction: column;
}

.home-mn-today-player-controls .btn-round-inner {
  width: 4.25rem;
  height: 4.25rem;
}

.home-mn-today-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-mn-today .btn-slim {
  max-width: max-content;
  padding-inline: 0.9rem;
}

.home-mn-today .openable-list {
  margin-bottom: 0;
}


/* Promo boxes slider */

.home-promobox {
  width: calc(100% + 2* var(--gutter));
  overflow: hidden;
  margin-inline: calc(-1 * var(--gutter));
}

.home-boxes-title {
  padding: 1rem var(--line-height-md) 0;
}

.home-boxes {
  position: relative;
  background-color: var(--color-mpr-charcoal);
  color: #fff;
  padding-block: .5rem;
  width: 100%;
  overflow-x: hidden;
}
.home-boxes::before,
.home-boxes::after {
  content: '';
  position: absolute;
  z-index: 1;
  top: 0.5rem;
  bottom: 1.5rem;
  width: var(--gutter);
}
.home-boxes::before {
  left: 0;
  background: linear-gradient(to right, var(--color-mpr-charcoal), transparent);
}
.home-boxes::after {
  right: 0;
  background: linear-gradient(to left, var(--color-mpr-charcoal-trans), transparent);
}

.home-boxes-slider {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--line-height-md);
  max-width: 100%;
  padding: 0.5rem var(--gutter);
  overflow-x: auto;
  scrollbar-color: var(--color-mpr-blue) var(--color-mpr-charcoal-trans);
}

@media screen and (min-width: 54em) {
  .home-promobox {
    width: 100%;
    margin-inline: 0;
    border-radius: .313rem;
  }

  .home-boxes::before,
  .home-boxes::after {
    width: var(--line-height-md);
  }

  .home-boxes-slider {
    margin: 0;
    padding: 0.5rem var(--line-height-md);
  }
}

.home-boxes-box {
  border-radius: .188rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.home-boxes-box-img {
  width: 18rem;
  max-width: 70vmin;
  flex-shrink: 0;
}

.home-boxes img {
  border-radius: .188rem;
}

.home-boxes-box-content {
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
}

.home-boxes-label {
  padding: 0 .188rem .5rem;
  text-align: center;
}
@media screen and (min-width: 28em) {
  .home-boxes-label {
    text-align: left;
  }
}

.home-boxes-box:active h3,
.home-boxes-box:focus h3,
.home-boxes-box:hover h3 {
  color: var(--color-mpr-yellow);
}


/* On-Air and Podcasts */

.grid-home-on-air,
.grid-home-podcasts {
  align-items: flex-start;
  row-gap: var(--line-height-md);
  margin-block: var(--line-height-md);
}

.grid-home-on-air li,
.grid-home-podcasts li {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: 600;
}

.home-on-air-and-podcasts-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: var(--line-height-sm);
}

.home-on-air-and-podcasts-body:first-child {
  grid-column: span 2;
}

@media screen and (min-width: 32em) {
  .home-on-air-and-podcasts-item {
    grid-template-columns: 1fr 3fr;
  }
}
@media screen and (min-width: 40em) {
  .grid-home-on-air-podcasts {
    grid-template-columns: 1fr 1fr;
  }
  .home-on-air-and-podcasts-item {
    grid-template-columns: 1fr 2fr;
  }
}
@media screen and (min-width: 54em) {
  .grid-home-on-air-podcasts {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}


/* Wander & Wonder (fancy slider) */

.home-segment .hdg-block.fancy-slider-hdg {
  padding-block: 0;
}
.home-wander-wordmark {
  color: var(--color-mpr-charcoal);
  height: calc(1.5 * var(--font-size-3x));
}


/* What next/share ideas CTA */

.home-what-next {
  display: flex;
  justify-content: center;
}

.share-ideas-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: #fff;
  padding: 1.5rem;
  position: relative;
  border-radius: 0.188rem;
  max-width: 80rem;
}

.share-ideas-btn {
  display: flex;
  justify-content: end;
}

.share-ideas-banner svg {
  position: absolute;
  bottom: 0;
  left: calc(50% - 1.5rem);
}

.share-ideas-banner svg:last-child {
  position: absolute;
  top: 0;
  left: calc(75% - 9rem);
}

@media (max-width: 68.37em) {
  .share-ideas-banner {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .share-ideas-banner svg {
    display: none;
  }

  .share-ideas-banner:first-child h2 {
    display: flex;
    justify-content: center;
  }

  .share-ideas-inner {
    padding-bottom: 1rem;
  }

  .share-ideas-btn {
    justify-content: center;
  }
}


/* Special coverage */

.home-special-coverage {
  position: relative;
}

.home-special-coverage img {
  max-width: 100%;
  object-fit: fill;
}

.home-special-coverage-grid {
  display: grid;
  grid-template-columns: 40rem 1fr 1fr 1fr 1fr;
}

.home-special-coverage-upper {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.home-special-coverage-upper > div:first-child {
  display: flex;
  justify-content: center;
  background-color: var(--color-mpr-yellow);
  text-transform: uppercase;
  padding: .85rem;
}

.home-special-coverage-upper > div:last-child {
  background-color: transparent;
}

.home-special-coverage-bottom {
  background-color: var(--color-mpr-charcoal);
  color: var(--color-white);
  border-radius: 0px 0.188rem;
  padding: 2rem
}

.home-special-coverage-primary {
  padding-bottom: .5rem;
}

.home-special-coverage-button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-special-coverage-button-container div:last-child {
  display: flex;
  align-items: center;
  padding-left: 1rem;
}

.home-special-coverage-button-container div:last-child svg {
  padding-left: 1rem;
}

.home-special-coverage > div {
  position: absolute;
  object-fit: cover;
  bottom: 0;
}

@media (max-width: 42rem) {
  .home-special-coverage-button-container {
    justify-content: left;
  }

  .home-special-coverage-upper {
    grid-template-columns: 1fr;
  }

  .home-special-coverage > div {
    position: static !important;
    bottom: auto !important;
  }

  .home-special-coverage-grid {
    grid-template-columns: unset;
  }

  .home-special-coverage-bottom {
    padding: 1rem
  }

  .home-special-coverage-bottom div:first-child {
    display: none;
  }
}

@media (max-width: 75em) {
  .home-special-coverage-bottom {
    padding: 1rem;
  }

  .home-special-coverage-upper > div:first-child {
    padding: .5rem;
    overflow: hidden;
  }

  .home-special-coverage-bottom > p {
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (min-width: 75em) {
  .main {
    padding-top: 0;
  }

  .home-top {
    grid-template: "greeting ad" auto / 1fr 728pxfr;
    align-items: flex-end;
    justify-content: space-between;
  }

  .home-main {
    display: grid;
    grid-template-areas: "sidebar-1 main main sidebar-2";
    gap: 4.5rem;
  }

  .home-main-sidebar-1 {
    grid-area: sidebar-1;
  }

  .home-main-sidebar-2 {
    grid-area: sidebar-2;
  }

  .home-latest-news ul {
    border-radius: 0.313rem;
  }

  .home-latest-news .border-between {
    padding-bottom: 1.625rem;
    margin: 1.5rem 0;
    margin-top: 1.625rem;
  }

  .home-segment .ad_textWrapper {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);

  }
  .home-segment .ad_textWrapper * {
    display: inline-block;
    color: var(--color-mpr-dark-gray);
  }

  .home-view-all {
    margin-top: 3rem;
  }
}

/* Page overrides for small screens only */

@media screen and (max-width: 39.98em) {
  /* When everything's one column, make all teaser headlines bigger */
  .home-latest-news-headline h4,
  .home-story-text,
  .grid-home-on-air li,
  .grid-home-podcasts li {
    font-size: var(--font-size-md);
    line-height: var(--line-height-md);
  }
  /* but not the Listen buttons / More information links */
  .home-story-text .btn-audio-sm,
  .home-on-air-and-podcasts-item .btn-audio-sm {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-sm);
  }
  /* and make the teaser image sizes consistent too */
  .home-more-stories-teaser {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: flex-start;
    margin-inline: calc(-0.5 * var(--gutter));
  }
}

/* Sizing hints to reduce layout shift while loading */
.home-stories,
.home-boxes,
.home-fancy-slider,
.home-special-coverage,
.home-on-air:has(li),
.home-podcasts:has(li) {
  min-height: fit-content;
  transition: min-height .3s ease-in;
}

.home-stories:has(.spinner) {
  min-height: 160rem;
}
.home-boxes:has(.spinner) {
  min-height: 18rem;
}
.home-fancy-slider:has(.spinner) {
  min-height: 32rem;
}
.home-special-coverage:has(.spinner) {
  min-height: 30rem;
}
.home-mn-today:has(.spinner) {
  min-height: 18rem;
}
.home-on-air ul:not(:has(.home-on-air-and-podcasts-item)),
.home-podcasts ul:not(:has(.home-on-air-and-podcasts-item)) {
  min-height: 39rem;
}
.home-weather-sidebar {
  min-height: 35rem;
}

@media screen and (min-width: 30rem) {
  .home-stories:has(.spinner) {
    min-height: 65rem;
  }
  .home-boxes:has(.spinner) {
    min-height: 20rem;
  }
  .home-fancy-slider:has(.spinner) {
    min-height: 36rem;
  }
  .home-special-coverage:has(.spinner) {
    min-height: 33rem;
  }
}

@media screen and (min-width: 42rem) {
  .home-fancy-slider:has(.spinner) {
    min-height: 36rem;
  }
}

@media screen and (min-width: 54rem) {
  .home-stories:has(.spinner) {
    min-height: 72rem;
  }
  .home-special-coverage:has(.spinner) {
    min-height: 35rem;
  }
}

@media screen and (min-width: 64rem) {
  .home-stories:has(.spinner) {
    min-height: 65rem;
  }
  .home-special-coverage:has(.spinner) {
    min-height: 42rem;
  }
}

@media screen and (min-width: 72rem) {
  .home-special-coverage:has(.spinner) {
    min-height: 48rem;
  }
}

@media screen and (min-width: 85rem) {
  .home-stories:has(.spinner) {
    min-height: 75rem;
  }
  .home-special-coverage:has(.spinner) {
    min-height: 53rem;
  }
}
