/**
 * P4U Blog - Frontend Styles
 * Matched to presta4you.com homepage design
 *
 * @author    Presta4you.com
 * @copyright 2020-2025 Presta4you.com
 */

/* Blog List */
.p4ublog-list,
.p4ublog-single,
.p4ublog-category-page {
    padding: 20px 0;
}

/* Post Card */
.p4ublog-post-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.p4ublog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.p4ublog-post-image {
    display: block;
    overflow: hidden;
}

.p4ublog-post-image img {
    width: 100%;
    height: 208px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.p4ublog-post-card:hover .p4ublog-post-image img {
    transform: scale(1.03);
}

.p4ublog-post-content {
    padding: 24px;
}

.p4ublog-post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #94a3b8;
}

.p4ublog-post-meta i {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 3px;
}

.p4ublog-post-meta a {
    color: #0596a6;
}

.p4ublog-post-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.p4ublog-post-title a {
    color: #0f172a;
    text-decoration: none;
}

.p4ublog-post-title a:hover {
    color: #0596a6;
}

.p4ublog-post-excerpt {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.p4ublog-post-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
}

.p4ublog-post-footer span {
    color: #94a3b8;
}

.p4ublog-post-footer i {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 3px;
}

.p4ublog-read-more {
    margin-left: auto;
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.p4ublog-read-more:hover {
    color: #0596a6;
}

.p4ublog-read-more i {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.p4ublog-read-more:hover i {
    transform: translateX(3px);
}

/* Single Post */
.p4ublog-article {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.p4ublog-featured-image img {
    width: 100%;
    height: auto;
}

.p4ublog-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #94a3b8;
}

.p4ublog-article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.p4ublog-article-meta i {
    font-size: 16px;
}

.p4ublog-article-meta a {
    color: #0596a6;
}

.p4ublog-article-content {
    padding: 32px;
    line-height: 1.8;
    font-size: 16px;
    color: #334155;
}

.p4ublog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.p4ublog-article-content h2,
.p4ublog-article-content h3,
.p4ublog-article-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #0f172a;
}

/* Tags */
.p4ublog-tags {
    padding: 20px 32px;
    border-top: 1px solid #f1f5f9;
}

.p4ublog-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin: 3px;
    transition: background 0.2s;
}

.p4ublog-tag:hover {
    background: #e2e8f0;
    color: #334155;
    text-decoration: none;
}

/* Social Share */
.p4ublog-share {
    padding: 20px 32px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.p4ublog-share > strong {
    margin-right: 5px;
    color: #334155;
}

/* Share buttons from P4uBlogSocialClass */
.p4ublog-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.p4ublog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}

.p4ublog-share-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    color: #fff !important;
    text-decoration: none !important;
}

.p4ublog-share-btn i {
    font-size: 15px;
}

/* Fallback old-style share icons */
.p4ublog-share a:not(.p4ublog-share-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.p4ublog-share a:not(.p4ublog-share-btn):hover {
    transform: scale(1.1);
}

.p4ublog-share-fb { background: #3b5998; }
.p4ublog-share-tw { background: #1da1f2; }
.p4ublog-share-li { background: #0077b5; }
.p4ublog-share-email { background: #6c757d; }

@media (max-width: 576px) {
    .p4ublog-share-btn span {
        display: none;
    }
    .p4ublog-share-btn {
        padding: 10px;
        border-radius: 50%;
    }
}

@keyframes p4ublogFadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

.p4ublog-copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 9999;
    animation: p4ublogFadeOut 2s forwards;
}

/* Rating Section */
.p4ublog-rating-section {
    padding: 24px 32px;
    border-top: 1px solid #f1f5f9;
}

.p4ublog-rating-section h4 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Comments */
.p4ublog-comments-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 32px;
    margin-bottom: 30px;
}

.p4ublog-comments-section h3 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}

.p4ublog-comment {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.p4ublog-comment:last-child {
    border-bottom: none;
}

.p4ublog-comment-avatar {
    flex-shrink: 0;
}

.p4ublog-comment-avatar i {
    font-size: 48px;
    color: #e2e8f0;
}

.p4ublog-comment-content {
    flex: 1;
}

.p4ublog-comment-meta {
    margin-bottom: 8px;
}

.p4ublog-comment-meta strong {
    color: #0f172a;
}

.p4ublog-comment-date {
    color: #94a3b8;
    font-size: 13px;
    margin-left: 10px;
}

.p4ublog-comment-text {
    color: #475569;
    line-height: 1.6;
}

.p4ublog-comment-replies {
    margin-left: 60px;
    border-left: 2px solid #f1f5f9;
    padding-left: 20px;
}

.p4ublog-reply {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px !important;
    margin: 10px 0;
}

.p4ublog-comment-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
}

.p4ublog-comment-form h4 {
    margin-bottom: 20px;
    color: #0f172a;
    font-weight: 700;
}

.p4ublog-comment-form .form-group {
    margin-bottom: 20px;
}

.p4ublog-comment-form label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #334155;
}

.p4ublog-comment-form .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    transition: border-color 0.2s;
}

.p4ublog-comment-form .form-control:focus {
    border-color: #0596a6;
    box-shadow: 0 0 0 3px rgba(5, 150, 166, 0.1);
    outline: none;
}

.p4ublog-no-comments {
    color: #94a3b8;
    font-style: italic;
    padding: 20px 0;
}

/* Related Products */
.p4ublog-related-products {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 32px;
    margin-bottom: 30px;
}

.p4ublog-related-products h3 {
    margin-bottom: 25px;
    color: #0f172a;
    font-weight: 700;
}

/* Sidebar */
.p4ublog-sidebar {
    position: sticky;
    top: 20px;
}

.p4ublog-widget {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 20px;
}

.p4ublog-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0596a6;
    color: #0f172a;
}

/* Search Widget */
.p4ublog-search-form .input-group {
    display: flex;
}

.p4ublog-search-form .form-control {
    border-radius: 10px 0 0 10px;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
}

.p4ublog-search-form .form-control:focus {
    border-color: #0596a6;
    box-shadow: none;
    outline: none;
}

.p4ublog-search-form .btn {
    border-radius: 0 10px 10px 0;
    background: #0596a6;
    border-color: #0596a6;
    color: #fff;
}

.p4ublog-search-form .btn:hover {
    background: #047a87;
    border-color: #047a87;
}

/* Categories Widget */
.p4ublog-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.p4ublog-categories-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.p4ublog-categories-list li:last-child {
    border-bottom: none;
}

.p4ublog-categories-list a {
    color: #475569;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: color 0.2s ease;
    font-size: 14px;
}

.p4ublog-categories-list a:hover,
.p4ublog-categories-list li.active a {
    color: #0596a6;
}

.p4ublog-categories-list .count {
    color: #94a3b8;
    font-size: 13px;
}

/* Recent Posts Widget */
.p4ublog-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.p4ublog-recent-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.p4ublog-recent-list li:last-child {
    border-bottom: none;
}

.p4ublog-recent-image {
    flex-shrink: 0;
    width: 70px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.p4ublog-recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p4ublog-recent-content {
    flex: 1;
}

.p4ublog-recent-title {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    margin-bottom: 5px;
}

.p4ublog-recent-title:hover {
    color: #0596a6;
}

.p4ublog-recent-date {
    color: #94a3b8;
    font-size: 12px;
}

/* Pagination */
.p4ublog-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.p4ublog-pagination .pagination {
    display: flex;
    gap: 5px;
}

.p4ublog-pagination .page-item .page-link {
    border-radius: 8px;
    padding: 8px 14px;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.p4ublog-pagination .page-item .page-link:hover {
    background: #f8fafc;
    border-color: #0596a6;
    color: #0596a6;
}

.p4ublog-pagination .page-item.active .page-link {
    background: #0596a6;
    border-color: #0596a6;
    color: #fff;
}

/* Homepage Section */
.p4ublog-home-section {
    padding: 50px 0;
    background: #f8fafc;
}

.p4ublog-home-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    color: #0f172a;
    font-weight: 700;
}

.p4ublog-home-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.p4ublog-home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.p4ublog-home-image img {
    width: 100%;
    height: 208px;
    object-fit: cover;
}

.p4ublog-home-content {
    padding: 24px;
}

.p4ublog-home-date {
    color: #94a3b8;
    font-size: 12px;
}

.p4ublog-home-post-title {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
}

.p4ublog-home-post-title a {
    color: #0f172a;
    text-decoration: none;
}

.p4ublog-home-post-title a:hover {
    color: #0596a6;
}

.p4ublog-home-excerpt {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.p4ublog-home-link {
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.p4ublog-home-link:hover {
    color: #0596a6;
}

.p4ublog-home-more {
    margin-top: 20px;
}

/* Subcategories */
.p4ublog-subcategories {
    margin-bottom: 30px;
}

.p4ublog-subcategory-card {
    display: block;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.p4ublog-subcategory-card:hover {
    border-color: #0596a6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.p4ublog-subcategory-card .name {
    display: block;
    color: #0f172a;
    font-weight: 600;
}

.p4ublog-subcategory-card .count {
    color: #94a3b8;
    font-size: 13px;
}

/* Category Description */
.p4ublog-category-description {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 991px) {
    .p4ublog-sidebar {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .p4ublog-post-meta,
    .p4ublog-article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .p4ublog-post-footer {
        flex-wrap: wrap;
    }

    .p4ublog-share {
        flex-wrap: wrap;
    }

    .p4ublog-article-content,
    .p4ublog-tags,
    .p4ublog-share {
        padding-left: 20px;
        padding-right: 20px;
    }

    .p4ublog-comments-section,
    .p4ublog-related-products {
        padding: 20px;
    }
}
