/**
 * Block Name: TPH - Most Recent Posts
 * Styles for the Most Recent Posts block
 */

.tph-most-recent-posts {
    width: 100%;
    padding: 3rem 0;
}

.tph-most-recent-posts__container {
    max-width: 1408px;
    margin: 0 auto;
    padding: 0;
}

.tph-most-recent-posts__title {
    margin: 0 0 2rem 0;
    font-weight: 600;
    font-size: 30px;
    line-height: 120%;
    letter-spacing: 0px;
    color: #053b81;
}

.tph-most-recent-posts__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4rem;
}

.tph-most-recent-posts__filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 18px 3px 18px;
    background: #ffffff;
    text-decoration: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 8px;
    border: 1px solid;
    border-color: #d0d0d0;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0px;
    box-sizing: border-box;
    color: #053b81;
}

.tph-most-recent-posts__filter:hover {
    background: #f5f5f5;
}

.tph-most-recent-posts__filter.is-active {
    padding: 8px 30px;
    background: #053b81;
    color: #ffffff;
    border: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 8px;
    font-family: "Nunito Sans", sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0px;
    text-align: center;
}

.tph-most-recent-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.tph-post-card {
    background: #ffffff;
    border-radius: 8px 0 8px 0;
    overflow: hidden;
    box-shadow: 8px 8px 20px 0px #97979740;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tph-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tph-post-card__image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.tph-post-card__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.tph-post-card__category-label {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.8rem 0.3rem 1.8rem;
    background: rgba(255, 255, 255, 0.95);
    color: #050505;
    min-width: 11.9rem;
    height: 3.4rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: "Nunito Sans", sans-serif;
    line-height: 1.8rem;
    letter-spacing: 0;
    border-top-left-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
}

.tph-post-card__category-label:hover {
    background: rgba(255, 255, 255, 1);
    color: #050505;
}

.tph-post-card__content {
    padding: 3rem;
}

.tph-post-card__title {
    margin: 0 0 0.75rem 0;
    font-size: 2.2rem;
    font-weight: 500;
    padding: 1.5rem 0 0 0;
}

.tph-post-card__title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.tph-post-card__title a:hover {
    color: #0052a3;
}

.tph-post-card__excerpt {
    padding: 2rem 0;
    font-size: 1.6rem;
}

.tph-post-card__excerpt p {
    font-size: 1.6rem;
}

.tph-post-card__meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 1.4rem;
    color: #666;
    font-weight: 500;
    font-family: "Nunito Sans", sans-serif;
    padding: 1.5rem 0 0 0;
}

.tph-post-card__type {
    text-transform: uppercase;
}

.tph-post-card__meta-separator {
    color: #999;
}

.tph-post-card__time {
    color: #999;
}

.tph-most-recent-posts__load-more {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    padding-bottom: 1rem;
}


.tph-most-recent-posts__load-more-button {
    display: inline-block;
    padding: 8px 30px;
    background: #053b81;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 8px;
    font-family: "Nunito Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    letter-spacing: 0px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tph-most-recent-posts__load-more-button:hover {
    background: #0052a3;
    color: #ffffff;
}

.tph-most-recent-posts__load-more-button:disabled,
.tph-most-recent-posts__load-more-button.is-loading {
    opacity: 0.8;
    cursor: wait;
}

.tph-most-recent-posts__no-posts {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Responsive */
@media (max-width: 1024px) {
    .tph-most-recent-posts__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tph-most-recent-posts {
        padding: 2rem 0;
    }
    
    .tph-most-recent-posts__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tph-most-recent-posts__filters {
        gap: 0.5rem;
    }
    
    .tph-most-recent-posts__filter {
        padding: 0.4375rem 1rem;
    }
}

