/**
 * RSF News Block Widget Styles
 *
 * Elementor Pro widget for displaying news/blog posts
 */

/* Base Styles */
.rsf-news-block {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #111;
    margin-bottom: 30px;
    background-color: transparent;
}

/* Featured Posts Layout */
.featured-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.featured-post {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

/* Featured One (left) */
.featured-post.featured-one .news-thumbnail {
    height: 400px;
    position: relative;
}

/* Featured Two (right) */
.featured-post.featured-two {
    background-color: #f5f5f5;
    border-radius: 0;
    height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.featured-post.featured-two .news-content-wrapper {
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.featured-post.featured-two .category-top-right {
    position: absolute;
    top: 0;
    right: 0;
}

.featured-post.featured-two .content-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.featured-post .news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Featured One Content */
.featured-post.featured-one .news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%);
    color: #fff;
}

.featured-post.featured-one .news-title {
    font-size: 28px;
    line-height: 1.3;
    margin: 0;
    font-weight: 700;
}

.featured-post.featured-one .news-title a {
    color: #fff;
    text-decoration: none;
}

/* Featured One Meta Info */
.featured-post.featured-one .meta-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.featured-post.featured-one .content-type-label {
    color: #fff;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
}

.featured-post.featured-one .content-duration {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0;
    font-size: 12px;
    position: relative;
    padding-left: 10px;
}

.featured-post.featured-one .play-text .content-date {
    position: relative;
    padding-left: 0;
}

.featured-post.featured-one .play-text .content-duration {
    position: relative;
    padding-left: 10px;
}

.featured-post.featured-one .play-text .content-duration:before {
    content: '•';
    position: absolute;
    left: 3px;
    top: -1px;
    color: inherit;
}

/* Featured Two Content */
.featured-post.featured-two .news-title {
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 15px;
    font-weight: 700;
}

.featured-post.featured-two .news-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post.featured-two .news-title a:hover {
    color: #333;
}

.featured-post.featured-two .news-excerpt {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Featured Two Play Button */
.featured-post.featured-two .play-button-below {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    z-index: 10;
    position: relative;
}

.featured-post.featured-two .play-button-left {
    display: flex;
    align-items: center;
}

.featured-post.featured-two .play-button-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-post.featured-two .play-button-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    background-color: transparent;
}

.featured-post.featured-two .play-icon-wrap {
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.featured-post.featured-two .play-icon-wrap:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.featured-post.featured-two .play-button-link i {
    font-size: 10px;
    color: #333;
}

.featured-post.featured-two .play-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.featured-post.featured-two .play-text .content-date {
    position: relative;
    padding-left: 0;
}

.featured-post.featured-two .play-text .content-duration {
    position: relative;
    padding-left: 10px;
    color: #666;
}

.featured-post.featured-two .play-text .content-duration:before {
    content: '•';
    position: absolute;
    left: 3px;
    top: -1px;
    color: inherit;
}

.featured-post.featured-two .content-type-label {
    color: #333;
}

.featured-post.featured-two .play-button-right .content-date {
    color: #666;
    position: relative;
    padding-left: 0;
}

.featured-post.featured-two .play-button-right .content-category {
    color: #666;
    position: relative;
    padding-left: 0;
    transition: color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.featured-post.featured-two .play-button-right .content-category:hover {
    color: #000;
    text-decoration: none;
}

/* Standard Posts Grid */
.rsf-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 10px;
}

.standard-post {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.standard-post-wrapper {
    display: flex;
    flex-direction: row;
    height: 100%;
    gap: 15px;
    border-left: 2px solid #D8D8D8;
    padding-left: .25rem;
}

.standard-post .news-thumbnail {
    width: 100px;
    /* height: 100px; */
    position: relative;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.standard-post .news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.standard-post .news-content {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.standard-post .news-title {
    font-size: 16px;
    line-height: 1.3;
    margin: 5px 0 10px;
    font-weight: 600;
}

.standard-post .news-title a {
    color: #000;
    text-decoration: none;
}

.standard-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Meta Information */
.meta-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 12px;
    margin-bottom: 5px;
}

.content-type-label {
    color: #666;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
}

.featured-post .content-type-label {
    color: #fff;
}

.standard-post .content-type-label {
    color: #666;
}

.content-date {
    color: #888;
    position: relative;
    padding-left: 10px;
    font-size: 12px;
}

.content-date:before {
    content: '•';
    position: absolute;
    left: 3px;
    top: -1px;
    color: inherit;
}

.standard-post .content-date:before {
    display: none;
}

.standard-post .content-date {
    padding-left: 5px;
}

.featured-post.featured-one .play-button-right .content-date {
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-left: 0;
}

.featured-post.featured-one .play-button-right .content-date:before {
    display: none;
}

.featured-post.featured-one .play-button-right .content-category {
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-left: 0;
    transition: color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.featured-post.featured-one .play-button-right .content-category:hover {
    color: #ffffff;
    text-decoration: none;
}

.featured-post .content-date {
    color: rgba(255, 255, 255, 0.8);
}

.content-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    margin-top: 0;
}

.featured-post .content-duration {
    color: rgba(255, 255, 255, 0.8);
}

.standard-post .content-duration {
    color: #888;
    font-size: 12px;
}

/* Play Button */
.play-button {
    position: relative;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    z-index: 2;
    transition: background-color 0.2s;
}

.standard-post-footer-right {
    margin-left: auto;
}

.featured-post.featured-one .play-button-below {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    z-index: 10;
    position: relative;
}

.featured-post.featured-one .play-button-left {
    display: flex;
    align-items: center;
}

.featured-post.featured-one .play-button-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-post.featured-one .play-button-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    background-color: transparent;
}

.featured-post.featured-one .play-icon-wrap {
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.featured-post.featured-one .play-icon-wrap:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.featured-post.featured-one .play-button-link i {
    font-size: 10px;
    color: #fff;
}

.featured-post.featured-one .play-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Small play button styles removed for standard posts */

.play-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Category Filter Buttons */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-filter {
    padding: 5px 15px;
    border-radius: 20px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.category-filter.active {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* Saved Badge */
.saved-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.standard-post .saved-badge {
    top: 5px;
    left: 5px;
    font-size: 10px;
    padding: 2px 6px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .rsf-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-post.featured-one .news-title {
        font-size: 24px;
    }

    .featured-post.featured-two .news-title {
        font-size: 20px;
    }

    /* In tablet view, featured posts should be side-by-side */
    .featured-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Standard post styles for tablet */
    .standard-post .news-thumbnail {
        width: 90px;
        /* height: 90px; */
    }

    .standard-post .news-title {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .featured-posts {
        grid-template-columns: 1fr;
    }

    .rsf-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-post.featured-one .news-thumbnail {
        height: 300px;
    }

    .featured-post.featured-two {
        height: 300px;
    }

    .standard-post .news-thumbnail {
        width: 80px;
        height: 80px;
    }

    .featured-post.featured-one .news-title,
    .featured-post.featured-two .news-title {
        font-size: 20px;
    }

    .featured-post.featured-one .meta-info {
        flex-wrap: wrap;
    }

    .standard-post .news-title {
        font-size: 14px;
        margin: 3px 0 5px;
    }

    .standard-post-wrapper {
        gap: 10px;
    }
}

@media (max-width: 540px) {
    .news-excerpt {
        display: none;
    }

    .standard-post .news-thumbnail {
        width: 70px;
        height: 70px;
    }

    .standard-post .news-title {
        font-size: 13px;
        line-height: 1.2;
        margin: 2px 0 5px;
    }

    .standard-post .meta-info {
        font-size: 11px;
    }

    .standard-post .content-duration {
        font-size: 11px;
    }

    /* Play button styles removed */

    .rsf-news-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .standard-post-wrapper {
        border-left: 0px solid transparent;
        padding-left: 0rem;
    }

    /* Add bottom border to standard posts */
    .standard-post {
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 10px;
        margin-bottom: 0px;  
    }

    /* Remove border from the last post */
    .standard-post:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}
