/* STORIES ARCHIVE PAGES */
.leading-uu-story-container {
    display: flex;
    flex-flow: row wrap;
    max-width: 1400px;
    margin: 0px auto 30px auto;
}
/* 4-up override, scoped to the widget wrapper */
.uu-4col-container .leading-uu-story-block {
  flex-basis: 23%;
}


.leading-uu-story-block {
    flex: 0 1 31.333%; 
    display: flex;
    flex-flow: column nowrap;
    box-shadow: 0px 6px 16px 0px rgba(84, 117, 145, 0.1);
    transition: all 0.3s ease-out;
    margin: 1%;
}

.leading-uu-story-block.highlighted {
    position: relative;
    flex: 0 1 48%;
    min-height: 450px;
}

.leading-uu-story-block.featured {
    position: relative;
    flex: 0 1 31.333%;
    min-height: 450px;
}

.leading-uu-story-block.featured:first-child {
    position: relative;
    flex: 0 1 64.666%;
    min-height: 450px;
}

.leading-uu-story-block.highlighted .leading-uu-story-img, .leading-uu-story-block.featured:first-child .leading-uu-story-img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.leading-uu-story-block.highlighted .leading-uu-story-details, .leading-uu-story-block.featured:first-child .leading-uu-story-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: calc(100% - 160px);
    z-index: 2;
}

.leading-uu-story-block.highlighted .leading-uu-story-img::after, .leading-uu-story-block.featured:first-child .leading-uu-story-img::after {
    display: none;
}

.leading-uu-story-block a, .leading-uu-story-block a:visited, .leading-uu-story-block a:focus, .leading-uu-story-block a:hover {
    text-decoration: none;
}

.leading-uu-story-block.video:hover, .leading-uu-story-block.article:hover, .leading-uu-story-block.podcast:hover {
    box-shadow: 0px 10px 30px 0px rgba(84, 117, 145, 0.3);
}

.leading-uu-story-block.article:hover .leading-uu-story-img::before, .leading-uu-story-block.video:hover .leading-uu-story-img::before, .leading-uu-story-block.podcast .leading-uu-story-img::before {
    background-color: rgba(0, 0, 0, .5);
}

.leading-uu-story-block.article .leading-uu-story-img::after, .leading-uu-story-block.video .leading-uu-story-img::after, .leading-uu-story-block.podcast .leading-uu-story-img::after {
    position: absolute;
    top: 140px;
    left: auto;
    right: 5px;
    margin: 0px auto;
    width: 20px;
    height: 20px;
    content: '';
    transition: all 0.3s ease-out;
    opacity: .8;
    z-index: 3;
}

.leading-uu-story-block.article .leading-uu-story-img::after {
    background: url('https://leading.utah.edu/wp-content/uploads/sites/50/2020/04/read-icon-min.svg') top left no-repeat;
}

.leading-uu-story-block.video .leading-uu-story-img::after {
    background: url('https://leading.utah.edu/wp-content/uploads/sites/50/2020/04/video-icon-min.svg') top left no-repeat;
    top: calc(50% - 40px);
    left: auto;
    right: calc(50% - 40px);
    width: 80px;
    height: 80px;
    opacity: 1;
}

.leading-uu-story-block.podcast .leading-uu-story-img::after {
    background: url('https://leading.utah.edu/wp-content/uploads/sites/50/2020/04/podcast-icon-min.svg') top left no-repeat;
    top: calc(50% - 40px);
    left: auto;
    right: calc(50% - 40px);
    width: 80px;
    height: 80px;
    opacity: 1;
}

.leading-uu-story-block.article:hover .leading-uu-story-img::after {
    top: calc(50% - 40px);
    left: auto;
    right: calc(50% - 40px);
    width: 80px;
    height: 80px;
    opacity: 1;
}

.leading-uu-story-block.video:hover .leading-uu-story-img::after {
    top: calc(50% - 40px);
    left: auto;
    right: calc(50% - 40px);
    width: 80px;
    height: 80px;
    opacity: 1;
}

.leading-uu-story-block.stat {
    flex: 1 1 23%;
    justify-content: center;
    align-content: center;
}

.leading-uu-story-block .leading-uu-story-img {
    position: relative;
    flex: 0 0 160px;
    width: 100%;
    height: 160px;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
}

.leading-uu-story-img::before {
    position: absolute;
    height: 100%;
    width: 100%;
    content: '';
    background-color: rgba(0, 0, 0, 0);
    transition: all 0.3s ease-out;
    z-index: 2;
}

.leading-uu-story-details {
    flex: 1 1 auto;
    position: relative;
    background-color: #FFFFFF;
    padding: 20px 20px 60px 20px;
}

.leading-uu-story-details h2 {
    font-size: 16px;
    line-height: 1.5;
    text-transform: none;
    color: #2F2D28;
    margin-bottom: 5px;
    margin-top: 0px;
}

.leading-uu-story-details h2 span {
    display: block;
    font-size: 16px;
    line-height: 21px;
    font-weight: 700;
    text-transform: none;
    position: relative;
    margin-top: 5px;
}

.leading-uu-story-details p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    color: #65635C;
    text-align: left;
    margin-bottom: 20px;
}

.leading-uu-story-details .leading-uu-story-cat {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #be0000;
    margin-bottom: 20px;
}

.leading-uu-story-block.stat .leading-uu-story-details {
    flex: 0 0 auto;
    background-color: transparent;
    padding: 30px;
    color: #FFFFFF;
    text-align: center;
}

.leading-uu-story-block.stat .leading-uu-story-details h2 {
    font-size: 50px;
    line-height: 52px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* .leading-uu-story-block.stat .leading-uu-story-details h2 span {} */

.leading-uu-story-block.stat .leading-uu-story-details h2, .leading-uu-story-block.stat .leading-uu-story-details h2 span, .leading-uu-story-block.stat .leading-uu-story-details p {
    color: #FFFFFF;
}

.leading-uu-story-block.stat .leading-uu-story-cat {
    display: none;
}

.leading-uu-story-btn-and-date {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
}

.leading-uu-story-btn, .leading-uu-story-btn:focus, .leading-uu-story-btn:visited {
    position: absolute;
    bottom: 20px;
    display: inline-block;
    margin: 10px auto;
    background: #be0000;
    color: #FFFFFF !important;
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-out;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
}

.leading-uu-story-btn:hover {
    background: #890000;
    color: #FFFFFF;
    text-decoration: none;
}

.leading-uu-story-date {
    position: absolute;
    margin: 10px auto;
    right: 20px;
    bottom: 24px;
    color: #707271;
    font-style: italic;
    font-size: 13px;
}

@media only screen and (max-width: 1200px) {
    .leading-uu-story-block {
        flex: 1 1 31%;
        margin: 1%;
    }

    .leading-uu-story-block.highlighted .leading-uu-story-details, .leading-uu-story-block.featured:first-child .leading-uu-story-details {
        height: 100%;
    }
}

@media only screen and (max-width: 900px) {
    .leading-uu-story-block {
        flex: 1 1 48%;
        margin: 1%;
    }

    .leading-uu-story-block.highlighted, .leading-uu-story-block.featured, .leading-uu-story-block.featured:first-child {
        position: relative;
        flex: 1 1 48%;
        min-height: 0px;
    }

    .leading-uu-story-block.highlighted .leading-uu-story-img, .leading-uu-story-block.featured:first-child .leading-uu-story-img {
        position: relative;
        height: 160px;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }

    .leading-uu-story-block.highlighted .leading-uu-story-details, .leading-uu-story-block.featured:first-child .leading-uu-story-details {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        height: auto;
    }

    .leading-uu-story-block.highlighted .leading-uu-story-img::after, .leading-uu-story-block.featured:first-child .leading-uu-story-img::after {
        display: block;
    }
}

@media only screen and (max-width: 600px) {
    .leading-uu-story-block, .leading-uu-story-block.featured, .leading-uu-story-block.featured:first-child {
        flex: 1 1 98%;
        margin: 1%;
        border: 1px solid #e2e2e2;
        border-bottom: 4px solid #e2e2e2;
    }
}


/* STORIES CPT FILTER */
.stories-filter {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0 10px;
  margin-bottom: -10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.stories-filter-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 50rem;
  box-sizing: border-box;
}

.stories-search { position: relative; flex: 1 1 0; min-width: 0; }

#stories-search-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  font-style: italic;
  padding: 0.5rem 1rem;
  border: 1.2px solid #707271;
  border-radius: 22px;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #707271;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.stories-search .stories-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  background-color: #000;
  -webkit-mask: url('../icons/Search.svg') no-repeat center;
          mask: url('../icons/Search.svg') no-repeat center;
  -webkit-mask-size: 18px 18px;
          mask-size: 18px 18px;
  pointer-events: none;
}
#stories-search-input:hover + .stories-search-icon,
#stories-search-input:focus + .stories-search-icon { background-color: #707271; }

/* Toggle (Filter / Close) with masked icons */
#stories-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background-color: #be0000;
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
#stories-filter-toggle .icon { width: 20px; height: 20px; display: block; }

#stories-filter-toggle .icon-filter {
  background-color: #fff;
  -webkit-mask: url('../icons/Filter.svg') no-repeat center;
          mask: url('../icons/Filter.svg') no-repeat center;
  -webkit-mask-size: 20px 20px;
          mask-size: 20px 20px;
}
#stories-filter-toggle .icon-close {
  display: none;
  background-color: #707271;
  -webkit-mask: url('../icons/Close.svg') no-repeat center;
          mask: url('../icons/Close.svg') no-repeat center;
  -webkit-mask-size: 20px 20px;
          mask-size: 20px 20px;
}
#stories-filter-toggle:hover {
  background-color: #000;
  color: #fff;
}
#stories-filter-toggle:hover .icon-filter,
#stories-filter-toggle:hover .icon-close {
  background-color: #fff;
}

/* Open state: swap icons */
#stories-filter-toggle.is-open { background-color: #be0000; color: #fff; }
#stories-filter-toggle.is-open .icon-filter { display: none; }
#stories-filter-toggle.is-open .icon-close  { display: block; background-color: #fff; }
#stories-filter-toggle.is-open:hover { background-color: #000; }

/* Toggle Panel */
#stories-filter-panel[hidden] { display: none !important; }
#stories-filter-panel:not([hidden]) {
  position: absolute;
  top: 4rem;
  width: 100%;
  max-width: 50rem;
  box-sizing: border-box;
  z-index: 10;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border-radius: 22px;
  padding: 5px 30px 40px 30px;
  display: block;
}

.unews-filter-title {
  margin-top: 1.9rem;
  margin-bottom: 0;
  padding-bottom: 0;
  font-weight: 700;
  font-size: 1rem;
  color: #2f2d28;
}

.stories-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.stories-filter-grid > .stories-filter-group:nth-child(3) { grid-column: 1 / -1; }

/* Year / Month dropdown selects */
#stories-year-select,
#stories-month-select {
  margin-top: 8px;
  width: 100%;
  max-width: 355px;
  padding: 0.5rem 1rem;
  border: 1.5px solid #be0000;
  border-radius: 22px;
  font-size: 1rem;
  line-height: 1.5;
  color: #707271;
  background-color: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23495057' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 10px;
  cursor: pointer;
}

/* Category pills filter buttons */
.stories-filter-cats-list {
  margin-top: 8px; margin-bottom: 0; padding-bottom: 5px;
  display: flex; flex-wrap: wrap; gap: 4px 8px;
}
.stories-filter-cats-list label {
  display: inline-flex; align-items: center; position: relative;
  padding: 4px 18px;
  margin: 4px 8px 4px 0;
  border: 2px solid #D9D9D9; border-radius: 4px;
  background-color: #fff; color: #47494A;
  text-transform: uppercase; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all .3s ease;
}
.stories-filter-cats-list input[type="checkbox"] { display: none; }

.stories-filter-cats-list label:hover {
  border-color: #be0000; background-color: #fff; color: #be0000;
}
.stories-filter-cats-list input[type="checkbox"]:checked + span { color: #000; }
.stories-filter-cats-list input[type="checkbox"]:checked + span::after {
  content: '×'; position: absolute; top: -2px; right: 5px; font-size: 14px; cursor: pointer;
}
@supports selector(:has(*)) {
  .stories-filter-cats-list label:has(input[type="checkbox"]:checked) { border-color: #be0000; }
}

/* Filter Actions */
.stories-filter-actions {
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap;
  gap: 20px; margin-top: 30px;
}
#stories-apply, #stories-clear {
  margin: 0; padding: .55rem 1.8rem; border-radius: 8px; font-weight: 700; max-width: 200px; width: 100%;
  cursor: pointer; border: 1.5px solid transparent;
}
#stories-apply { border-radius: 22px; border-color: #be0000; }
/* #stories-apply:hover { background: #000; border-color: #000; color: #fff; } */
#stories-clear { border-radius: 22px; }
#stories-clear:hover { background: #707271; color: #fff; border-color: #707271; }

/* A11y + No results */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.stories-no-results { text-align: center; padding-top: 200px; padding-bottom: 400px }

/* Responsive */
@media screen and (max-width: 1024px) {
  #stories-search-input { font-size: .8rem; line-height: 1; }
  .uu-4col-container .leading-uu-story-block { flex-basis: 31.333%; }
}
@media screen and (max-width: 780px) {
  .stories-filter { margin-bottom: -20px; }
  .stories-filter-grid { grid-template-columns: 1fr; }
  .stories-filter-actions {
    display: flex; align-items: center; justify-content: center; flex-wrap: nowrap;
  }
  #stories-apply, #stories-clear {
    max-width: 50%; width: 100%;
  }
  .uu-4col-container .leading-uu-story-block { flex-basis: 48%; }
}
@media screen and (max-width: 575px) {
  .stories-filter { margin-bottom: -30px; }
  .unews-filter-title { font-size: 16px; margin-bottom: 0; padding-bottom: 10px; }
  .stories-filter-actions {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  }
  #stories-apply, #stories-clear {
    max-width: 100%; width: 100%;
  }
  .uu-4col-container .leading-uu-story-block { flex-basis: 100%; }
}
@media screen and (max-width: 460px) {
  .stories-filter { margin-bottom: -40px; }
  .stories-filter-row { flex-wrap: wrap; }
}