/**
 * Popular & Recent Posts Block - Frontend Styles
 * Using specific selectors to avoid conflicts with theme styles
 */

.wp-block-zoxpress-popular-recent-posts.zox-popular-recent-posts {
    padding: 40px 0;
    background: transparent;
    clear: both;
}

.wp-block-zoxpress-popular-recent-posts .zox-body-width {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 30px;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-posts-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 40px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: reverse;
    -ms-flex-direction: row-reverse;
    flex-direction: row-reverse;
}

/* Column Styles */
.wp-block-zoxpress-popular-recent-posts .zox-pr-posts-column {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Recent Posts Column - 2/3 width */
.wp-block-zoxpress-popular-recent-posts .zox-pr-recent-column {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 65%;
    flex: 0 0 65%;
}

/* Popular Posts Column - 1/3 width */
.wp-block-zoxpress-popular-recent-posts .zox-pr-popular-column {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 32%;
    flex: 0 0 32%;
}

/* Header Styles */
.wp-block-zoxpress-popular-recent-posts .zox-pr-posts-header {
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-posts-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: #1a1a1a !important;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-title-underline {
    width: 50px;
    height: 3px;
    background: currentColor;
    position: absolute;
    bottom: -2px;
    left: 0;
}

/* Posts List */
.wp-block-zoxpress-popular-recent-posts .zox-pr-posts-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 20px;
}

/* Post Item */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-item {
    margin: 0;
    padding: 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-link {
    display: block;
    text-decoration: none;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* Recent Posts - Large Posts Section */
.wp-block-zoxpress-popular-recent-posts .zox-pr-large-posts {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-large {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    margin: 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large {
    position: relative;
    width: 100%;
    height: 204px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large .zox-pr-post-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large .zox-pr-post-image-link:hover img {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large .zox-pr-post-category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-title-large {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-title-large a {
    color: #1a1a1a !important;
    text-decoration: none;
    -webkit-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-title-large a:hover {
    color: #666666 !important;
}

/* Recent Posts - Small Posts Section */
.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-small {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    width: 50%;
}

/* Small Posts - Recent Column */
.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-small {
    margin: 0;
    padding: 0 10px;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-small:nth-child(odd) {
    padding-left: 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-small:nth-child(even) {
    padding-right: 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-small {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: 12px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin-bottom: 15px;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    position: relative;
    width: 112px;
    height: 88px;
    margin-bottom: 0;
    border-radius: 4px;
    overflow: hidden;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small .zox-pr-post-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small .zox-pr-post-image-link:hover img {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small .zox-pr-post-category-small {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2;
}

/* Small Posts - Popular Column */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-numbered .zox-pr-post-link {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 12px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    padding: 15px 0;
    border-radius: 0;
    -webkit-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-numbered .zox-pr-post-link:hover {
    opacity: 0.8;
}

/* Hide images in Popular Posts column */
.wp-block-zoxpress-popular-recent-posts .zox-pr-popular-column .zox-pr-post-image-small {
    display: none;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-small {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 80px;
    height: 65px;
    overflow: hidden;
    border-radius: 4px;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-small img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-link:hover .zox-pr-post-image-small img {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}

/* Post Number for Popular Posts */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-number {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #999999;
}

/* Post Content */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

/* Category Badge */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-category {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    z-index: 2;
    color: #999999 !important;
    background: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-category:hover {
    background: #ffffff;
    color: #666666 !important;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-category-small {
    display: inline-block;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    color: #999999 !important;
    background: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-category-small:hover {
    background: #ffffff;
    color: #666666 !important;
}

/* Category in meta for Popular Posts */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-numbered .zox-pr-post-meta .zox-pr-post-category-small {
    background: transparent;
    padding: 0;
    font-size: 11px;
}

/* Post Title */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-title a {
    color: #1a1a1a !important;
    text-decoration: none;
    -webkit-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-title a:hover {
    color: #666666 !important;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-first .zox-pr-post-title {
    font-size: 18px;
    font-weight: 700;
}

/* Post Meta */
.wp-block-zoxpress-popular-recent-posts .zox-pr-post-meta {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: #999999;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-date {
    display: inline-block;
    color: #999999;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-author {
    display: inline-block;
    color: #999999;
    text-decoration: none;
    -webkit-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    transition: color 0.3s ease;
}

.wp-block-zoxpress-popular-recent-posts .zox-pr-post-author:hover {
    color: #1a1a1a;
}

/* Smaller meta for small posts */
.wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-meta {
    font-size: 10px;
    gap: 8px;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .wp-block-zoxpress-popular-recent-posts .zox-body-width {
        padding: 0 20px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-container {
        gap: 25px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-column {
        padding: 20px;
    }
}

@media screen and (max-width: 1024px) {
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-container {
        gap: 20px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large {
        height: 170px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small {
        width: 100px;
        height: 78px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-title-large {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .wp-block-zoxpress-popular-recent-posts .zox-body-width {
        padding: 0 15px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-container {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 25px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-recent-column,
    .wp-block-zoxpress-popular-recent-posts .zox-pr-popular-column {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-column {
        padding: 18px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-large-posts {
        gap: 15px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large {
        height: 180px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small {
        width: 105px;
        height: 82px;
    }
}

@media screen and (max-width: 480px) {
    .wp-block-zoxpress-popular-recent-posts.zox-popular-recent-posts {
        padding: 25px 0;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-body-width {
        padding: 0 15px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-column {
        padding: 15px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-posts-title {
        font-size: 18px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-large-posts {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-image-large {
        height: 160px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-title-large {
        font-size: 16px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-title {
        font-size: 14px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-small {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        width: 100%;
        padding: 0;
        margin-bottom: 12px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-small-posts .zox-pr-post-image-small {
        width: 100px;
        height: 80px;
    }
    
    .wp-block-zoxpress-popular-recent-posts .zox-pr-post-numbered .zox-pr-post-link {
        gap: 10px;
        padding: 12px 0;
    }
}

