/* Styles for search results */
.post-results {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

@media (min-width: 768px) {
    .post-results {
        margin-right: -20px; /* counter the gap */
    }
}

.post-result-item{
    position: relative;
    display: block;
}

.post-result-item h3 {
    margin: 0 0 10px;
}

body a.post-result-item  {
    text-decoration: none;
    color: var(--text-carbon);
}

a.post-result-item:hover {
    /* text-decoration: underline; */
    color: var(--color-brand-blue-classic)
}

.post-result-item img{
    width: 100%;
}

/* Styles for list view */
.post-results.list-view {
    display: flex;
    flex-direction: column; 
    gap: 20px; 
}

.thumb-container .copy {
    padding-top: 1rem;
}

.post-results.list-view .post-result-item-container {
    display: flex; 
    flex-direction: row; 
    gap: 20px; 
    width: 100%; 
    align-items: flex-start; 
}

.post-results.list-view .thumb-container {
    display: flex;
    flex-direction: row; 
    width: 100%;
    margin-bottom: 40px;
}

.post-results.list-view .thumb {
    flex: 0 0 275px; 
    max-width: 275px; 
    height: auto; 
    margin-right: 20px;
}

.post-results.list-view .copy {
    flex: 1 1 auto; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 0;
}

.post-results .post-result-item .item-excerpt{
    display: none;
}
.post-results.list-view .post-result-item .item-excerpt{
    display: block;
}

.post-result-item-container{
    position: relative;
}

.post-result-item, .post-result-item-container  {
    flex: 1 1 100%; /* Adjust for grid view */    
    position: relative;
}

.post-result-item .thumb{
    aspect-ratio: 16 / 9;
    /* display: flex; */
    overflow: hidden;
    position: relative;
}

.tile-flag{
    display: flex;
    align-items: center;
    font-family: "IntelOne Text";
    font-size: 14px;
    font-style: normal;
    font-weight: 500 !important;
    line-height: 20px;
    color: var(--main-nav-blue);
    top: 0;
    left: 0;
    transition: top 0.5s ease-in-out, left 0.5s ease-in-out;
}

button.tile-flag{
    border: none;
}

button.tile-flag.hero{
    width: 100%;
    justify-content: flex-start;
}

button.tile-flag:hover{
    border: none;
}

.keyboard-active .tile-flag.link{
    top: 4px;
    left: 4px;
}

.tile-flag.link:focus-visible {
    outline: 2px solid var(--main-nav-blue);
    outline-offset: 0px;
    border-radius: 0px;
}

.tile-flag img{
    display: inline;
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.post-result-item-container .tile-flag{
    position: absolute;
    display: inline-flex;
    background: #fff;
    z-index: 99;
    top: 0;
    left: 0;
    padding: 5px;  
}

.category-tiles .tile-flag{
    display:none !important;
}

.post-result-item .copy .tile-flag{
    position: relative;
    padding-left: 0px;
    margin-bottom: .5rem;
}

.post-result-item .thumb > img{
    object-fit: cover;
    width: 100%;
    transition: transform 0.7s ease-in-out;
}

.thumb-container:hover .thumb > img {
  transform: scale(1.04); /* Zoom image by 4% */
}
/* overwrites for Home Hero Slider */
.wpcpro-row .post-result-item .thumb-container .tile-flag{
    background: var(--color-light-grey);
}
.grid-view .post-result-item .thumb-container .tile-flag{
    background: var(--color-light-grey);
}
.post-results .post-result-item .thumb-container .tile-flag{
    background: var(--color-light-grey);
}
/* Overwrites for Latest Articles Cards */
.home-flex .post-result-item .thumb-container .tile-flag{
    background: #fff;
}

@media (min-width: 768px) {

    .post-results:not(.list-view) .post-result-item-container {
        flex: 1 1 calc(50% - 20px); 
        max-width: calc(50% - 20px);
    }

    .post-results.list-view .post-result-item-container {
        width: 100%;
    }
}

@media (min-width: 1280px) {
    .post-results:not(.list-view) .post-result-item-container {
        max-width: calc(33.333% - 20px);
        flex: 1 1 calc(33.333% - 20px);
    }
}

.copy h1{
    font-family: "IntelOne";
    font-size: 40px;
    font-style: normal;
    font-weight: 300 !important;
    line-height: 48px;
}

.copy h2{
    font-family: "IntelOne";
    font-size: 24px;
    font-style: normal;
    font-weight: 300 !important;
    line-height: 30px;
}

.copy h3{
    font-family: "IntelOne";
    font-size: 24px;
    font-style: normal;
    font-weight: 300 !important;
    line-height: 30px;
    margin-top: .5rem;
}

.category-tiles .copy h3{
    font-family: "IntelOne Text";
    font-size: 16px;
    font-style: normal;
    font-weight: 400 !important;
    line-height: 22px; 
}

.copy h1, .copy h2, .copy h3{
    margin-bottom: 0.5rem;
}

.copy h1, .copy h2, .copy h3{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3; 
}

.post-date-wrapper{
    display: flex;
    
    flex-direction: column;
}

@media screen and (min-width: 500px) {
    .post-date-wrapper{
        flex-direction: row;
        align-items: center;
    }
    
}

.item-post-date{
    font-family: "IntelOne Text";
    font-size: 12px;
    font-style: normal;
    font-weight: 500 !important;
    line-height: 14px;
    text-transform: uppercase;
    color: var(--share-grey);
    margin-right: 0.25rem;
    margin-bottom: 0;
}

.item-post-date-secondary{
     font-size: 12px;
     font-style: normal;
     color: var(--share-grey);
}

.category-tiles .copy .item-post-date{
    display: none;
}

.copy .upperDate .item-post-date{
    margin-bottom: 0.5rem;
}

.copy .item-excerpt{
    display: none;
    line-height: 22px;
}


/** Hero Grid Styles **/

.hero-tiles{
    margin-right: calc(-1 * var(--mobile-gutter));
}

.intel-tiles .wpcpro-row > div {
    margin-bottom: 2rem;
}

@media screen and (min-width: 768px) {

    .intel-tiles.hero-tiles .wpcpro-row > div {
        margin-bottom: 0rem;
    }
    
}

.hero-tiles .post-result-item .thumb-container{
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media screen and (min-width: 768px) {

    .hero-tiles {
        margin-right: 0px;
    }

    .hero-tiles .post-result-item .thumb-container {
        flex-direction: row !important;
    }
    
}

.hero-tiles .wpcpro-row > div {
    flex: 1 1 100%; 
    max-width: unset;
}


@media (min-width: 768px) {
    .hero-tiles .wpcpro-row > div:first-child {
        flex: 1 1 100%; 
    }
    .hero-tiles .wpcpro-row > div:nth-child(n+2){
        flex: 1 1 50%; 
    }
}

.hero-tiles .wpcpro-row > div .thumb {
    aspect-ratio: 16 / 9;
    align-self: flex-start;
    width: 100%;
}

.hero-tiles .thumb{
    padding-right: 0;
}

@media screen and (min-width: 768px) {

    .hero-tiles .thumb{
        margin-right: 1rem;
    }

    .hero-tiles .wpcpro-row > div:first-child .thumb {
        width: 60%;
        min-width: 60%;
    }
    .hero-tiles .wpcpro-row > div:nth-child(n+2) .thumb {
        width: 50%;
        min-width: 50%;
    }
}

/** Related Posts Styles **/

.related-posts {
    margin-top: 4rem;
}

.related-posts hr{
    margin-bottom: 1rem;
}

@media (min-width: 1280px) {
    .related-posts .post-results .post-result-item-container:nth-of-type(4){
        display:none;
    }
}

#customPagination.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    gap: 10px;
}

#customPagination.pagination form{
    width: unset;
}

#customPagination.pagination a {
    width: 40px;
    height: 40px;
    background-color: var(--text-carbon);
    color: white;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#customPagination.pagination span.disabled {
    width: 40px;
    height: 40px;
    color: white;
    border: none;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
} 

#customPagination.pagination span.count{
    background: #fff;
    font-family: "IntelOne Text";
    font-size: 16px;
    font-style: normal;
    font-weight: 400 !important;
    line-height: 25px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#customPagination.pagination a:hover {
    background-color: var(--text-carbon);
}

#customPagination.pagination input[type="text"] {
    width: 40px;
    height: 40px; /* Set width as needed */
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 0px;
    padding: 5px;
}



/* Styles for the results toggle buttons */

.count-toggle{
    display: flex;
    justify-content: space-between;
}

.results-toggle {
    display: none;
}


@media screen and (min-width: 768px) {
    .results-toggle {
        margin-bottom: 20px;
        display: flex;
        flex-direction: row;
    }
    
}

.listToggle {
    background: var(--color-light-grey);
    display: flex;
    padding: 10px 20px;
    border-radius: 0px;
    cursor: pointer;
    border: 1px solid transparent;
}

.listToggle:hover {
    background: var(--color-light-grey);
    border: 1px solid transparent;
}

.listToggle path{
    fill: var(--text-carbon);
}

.listToggle.active{
    background: var(--text-carbon);
    padding: 10px;
}

.listToggle.active:before{
    content: '';
    display: inline;
    background: url(/wp-content/themes/genesis-child-theme/images/toggle-check.svg) no-repeat;
    width: 19px;
    height: 18px;
    margin-right: 5px;
}

.listToggle.active path{
    fill: #fff;
}

/* Mobile styles for Posts List View */
@media (max-width: 768px) {
    .post-results.list-view .post-result-item .thumb-container{
        flex-direction: column; 
        gap: 10px; 
        margin-bottom: 10px;
    }

    .post-results.list-view .thumb {
        flex: 0 0 auto; 
        max-width: 100%;
        margin-right: 0;
    }

    .post-results.list-view .copy {
        flex: 0 0 auto; 
        width: 100%; 
        display: block; 
        margin-top: 10px; 
    }
}

/* Remove category tags from story cards on category pages */
body.category .tile-flag{
    display: none;
}