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

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

.tph-featured-posts__container {
    max-width: 1408px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 5rem;
}

.tph-featured-posts__left {
    display: flex;
    flex-direction: column;
}

.tph-featured-posts__right {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

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

}

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

.tph-featured-post__image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.tph-featured-post__image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tph-featured-post--large .tph-featured-post__image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tph-featured-post--small {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.tph-featured-post--small .tph-featured-post__image-link {
    flex: 0 0 274px;
    align-self: stretch;
    display: flex;
}

.tph-featured-post--small .tph-featured-post__image-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
}

.tph-featured-post--small .tph-featured-post__image {
    width: 100%;
    height: 101%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tph-featured-post--small .tph-featured-post__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 3rem;
}

.tph-featured-post__content {
    padding: 3rem;
}

.tph-featured-post__categories {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    z-index: 10;
}

.tph-featured-post__category {
    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;
    text-decoration: none;
    border-top-left-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
    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;
    transition: all 0.3s ease;
}

.tph-featured-post__category:hover {
    background: rgba(255, 255, 255, 1);
    color: #050505;
}

.tph-featured-post__title {
    margin: 0 0 0.75rem 0;
    font-size: 2.2rem;
    font-weight: 500;
}

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

.tph-featured-post__title a:hover {
    color: #0052a3;
}

.tph-featured-post__excerpt {
    padding: 2rem 0;
    font-size: 1.6rem;
    font-weight: 200;
    line-height: 140%;
    letter-spacing: 0.25px;
    p{
        font-weight: 200;
        line-height: 140%;
        letter-spacing: 0.25px;
        font-size: 1.6rem;
    }
}

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

.tph-featured-post__type {
    text-transform: uppercase;
}

.tph-featured-post__meta-separator {
    color: #999;
}

.tph-featured-post__time {
    color: #999;
}

/* Large featured post: apply improved font sizes */
.tph-featured-post--large .tph-featured-post__title {
    font-size: 2.8rem;
}

.tph-featured-post--large .tph-featured-post__excerpt,
.tph-featured-post--large .tph-featured-post__excerpt p {
    font-size: 1.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .tph-featured-posts__container {
        grid-template-columns: repeat(2, 2fr);
    }
}

@media (max-width: 768px) {
    .tph-featured-posts {
        padding: 2rem 0;
    }

    .tph-featured-posts__container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .tph-featured-posts__right {
        gap: 2rem;
    }
    
    .tph-featured-post--large .tph-featured-post__image {
        height: 300px;
    }

    /* Stack the "small" cards on mobile */
    .tph-featured-post--small {
        flex-direction: column;
    }
    
    .tph-featured-post--small .tph-featured-post__image {
        min-height: 0;
        height: 220px;
    }

    .tph-featured-post--small .tph-featured-post__image-link {
        flex: 0 0 auto;
        width: 100%;
    }

    .tph-featured-post--small .tph-featured-post__content {
        padding: 2rem;
    }
}

