/* Blog Styles for Optprice Theme */

/* Main Blog Container */
.block_blog,
.block_blog_single {
    background-color: #fff;
}

.icon-calendar:before {
    width: 20px;
    height: 20px;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 991px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.blog-post-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 0;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.blog-post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-post-item.related {
    margin-bottom: 20px;
}

/* Blog Post Image */
.blog-post-image {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.blog-post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.blog-post-item:hover .blog-post-image img {
    transform: scale(1.05);
}

/* Blog Post Header Image (Single Post) */
.blog-post-header-image img,
.blog-featured-image img,
.blog-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

/* Blog Post Content */
.blog-post-content {
    padding: 20px;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.blog-post-meta .post-date,
.blog-post-meta .post-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-post-meta .post-author a {
    color: #666;
    text-decoration: none;
}

.blog-post-meta .post-author a:hover {
    color: #ff6f00;
}

.blog-post-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: #ff6f00;
}

.blog-post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-read-more {
    display: inline-block;
    padding: 10px 25px;
    background-color: #ff6f00;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-read-more {
    background-color: #e66400 !important;
    color: #fff !important;
}

.btn-read-more:hover {
    background-color: #e66400;
    color: #fff;
}

/* Single Blog Post */
.blog-post-single {
    background: #fff;
    border-radius: 8px;
}

.blog-post-header {
    margin-bottom: 30px;
}

.blog-post-single .blog-post-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.blog-post-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

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

.blog-post-single .blog-post-content {
    padding: 0;
    line-height: 1.8;
    color: #333;
}

.blog-post-single .blog-post-content h2,
.blog-post-single .blog-post-content h3,
.blog-post-single .blog-post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.blog-post-single .blog-post-content p {
    margin-bottom: 20px;
}

.blog-post-single .blog-post-content ul,
.blog-post-single .blog-post-content ol {
    margin: 0 0 20px 24px;
    padding-left: 18px;
}

.blog-post-single .blog-post-content ul {
    list-style: disc outside !important;
}

.blog-post-single .blog-post-content ol {
    list-style: decimal outside !important;
}

.blog-post-single .blog-post-content li {
    display: list-item !important;
    margin-bottom: 8px;
}

.blog-post-single .blog-post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Blog Tags */
.blog-post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.blog-post-tags .tag {
    display: inline-block;
    padding: 6px 15px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.blog-post-tags .tag:hover {
    background-color: #ff6f00;
    color: #fff;
}

/* Sidebar */
.blog-sidebar {
    padding-left: 20px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6f00;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list li a {
    color: #333;
    text-decoration: none;
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    transition: color 0.3s ease;
}

.category-list li a:hover {
    color: #ff6f00;
}

.category-list .count {
    color: #999;
    font-size: 14px;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud .tag {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-cloud .tag:hover {
    background-color: #ff6f00;
    color: #fff;
}

.tag-cloud .tag .count {
    color: inherit;
    margin-left: 5px;
}

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

.recent-posts li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.recent-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts li a {
    display: flex;
    gap: 15px;
    color: #333;
    text-decoration: none;
}

.recent-post-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.recent-post-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.recent-posts li a:hover h4 {
    color: #ff6f00;
}

.recent-post-content .post-date {
    font-size: 13px;
    color: #999;
}

/* Comments Section */
.blog-comments-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e5e5e5;
}

.blog-comments-section .section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

.comments-list {
    margin-bottom: 40px;
}

.comment-item {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    color: #333;
    font-weight: 600;
}

.comment-date {
    color: #999;
    font-size: 14px;
}

.comment-body {
    color: #666;
    line-height: 1.6;
}

/* Comment Form */
.comment-form-section {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.comment-form-section h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
}

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

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

.comment-form .required {
    color: #ff0000;
}

.comment-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #1f2937;
    cursor: text;
    caret-color: #000;
    transition: border-color 0.3s ease;
}

textarea.comment-form .form-control {
    padding: 12px 15px 40px 12px;
}

.comment-form .form-control:focus {
    outline: none;
    border-color: #ff6f00;
}

.comment-form .btn-primary {
    background-color: #ff6f00;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form .btn-primary:hover {
    background-color: #e66400;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e5e5e5;
}

.related-posts-section .section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

/* Pagination */
.blog-pagination {
    margin-top: 40px;
    text-align: center;
}

/* No Posts Message */
.no-posts-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

.category-description {
    background: #f9f9f9;
    border-left: 4px solid #ff6f00;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.category-description p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.blog-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-top: 15px;
    margin-bottom: 30px;
    max-width: 900px;
}

.blog-sidebar .category-list a img.social-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.blog-sidebar .category-list a:hover img.social-icon {
    transform: scale(1.1);
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.blog-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-post-meta svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.blog-post-meta strong {
    font-weight: 500;
}

.blog-post-meta a {
    color: #007bff;
    text-decoration: none;
}

.blog-post-meta a:hover {
    text-decoration: underline;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.comment-reply-trigger {
    order: 2;
    border: 1px solid rgb(255, 111, 0);
    border-radius: 18px;
    background: #fff7ef;
    color: rgb(255, 111, 0) !important;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 12px !important;
    line-height: 1.1;
}

.comment-reply-trigger:hover {
    color: rgb(255, 111, 0) !important;
    background: #ffe8cf;
    text-decoration: none;
}

.comment-reactions {
    order: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 2px;
}

.comment-reaction-btn {
    border: 0;
    background: transparent;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9098a5;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.comment-reaction-btn.like {
    color: #1ca34a;
}

.comment-reaction-btn.dislike {
    color: #d5353b;
}

.comment-reaction-btn.like:hover {
    background: rgba(28, 163, 74, 0.12);
}

.comment-reaction-btn.dislike:hover {
    background: rgba(213, 53, 59, 0.12);
}

.comment-reaction-btn.like.active {
    background: rgba(28, 163, 74, 0.16);
    color: #1ca34a;
}

.comment-reaction-btn.dislike.active {
    background: rgba(213, 53, 59, 0.16);
    color: #d5353b;
}

.comment-reaction-btn .reaction-icon {
    font-size: 14px;
    line-height: 1;
}

.reaction-count {
    min-width: 14px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.comment-children {
    margin-top: 12px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #d6d6d6;
}

.comment-item-reply {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 8px 0 10px;
    margin-bottom: 10px;
}

.comment-item-reply .comment-header {
    margin-bottom: 6px;
}

.comment-item-reply .comment-body {
    margin-bottom: 0;
}

.comment-children .comment-item {
    margin-bottom: 14px;
}

.comment-children .comment-item:last-child {
    margin-bottom: 0;
}

.comment-reply-target {
    display: none;
    border-left: 3px solid #ff9f1c;
    background: #fff8ef;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.comment-reply-target.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.comment-reply-target .cancel-reply {
    border: 0;
    background: transparent;
    color: #d04f16;
    font-weight: 600;
    cursor: pointer;
}

.comment-textarea-wrap {
    position: relative;
}

.comment-textarea-wrap textarea#comment.form-control {
    box-sizing: border-box;
    line-height: 1.45;
    padding: 12px !important;
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    color: #1f2937;
    cursor: text;
    caret-color: #000;
}

.comment-editor-tools {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid #d8dbe1;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: #f7f8fa;
}

.emoji-picker {
    position: relative;
    margin: 0;
    z-index: 2;
}

.emoji-picker-toggle {
    border: 1px solid #d8dbe1;
    border-radius: 50%;
    background: #f2f3f5;
    color: #1c1e21;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.emoji-picker-toggle .emoji-icon {
    font-size: 16px;
}

.emoji-picker-toggle:hover {
    background: #e9ebee;
    border-color: #cfd2d8;
    transform: scale(1.04);
}

.emoji-toolbar {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: auto;
    z-index: 20;
    width: 300px;
    border: 1px solid #d7dbe2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.emoji-toolbar.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.emoji-toolbar-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
    padding: 10px;
    max-height: 190px;
    overflow-y: auto;
    background: #fff;
}

.emoji-toolbar-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-toolbar-grid::-webkit-scrollbar-thumb {
    background: #d9dde5;
    border-radius: 10px;
}

.emoji-btn {
    border: 0;
    background: transparent;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    line-height: 1;
    font-size: 20px;
    padding: 0;
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.emoji-btn:hover {
    background: #f2f3f5;
    transform: scale(1.08);
}

/* Responsive Design */
@media (max-width: 991px) {
    .blog-sidebar {
        padding-left: 0;
        margin-top: 50px;
    }
}

@media (max-width: 767px) {
    .blog-post-single .blog-post-title {
        font-size: 28px;
    }

    .blog-post-title {
        font-size: 16px;
    }

    .blog-post-content {
        padding: 5px;
    }

    .blog-post-excerpt{
        font-size: 13px;
    }


    .blog-post-meta {
        font-size: 13px;
        gap: 5px;
    }

    .related-posts-section .col-md-6 {
        margin-bottom: 20px;
    }
}

@media (max-width: 575px) {
    .emoji-toolbar {
        width: 280px;
        left: 0;
        right: auto;
    }

    .emoji-toolbar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .comment-children {
        margin-left: 12px;
        padding-left: 12px;
    }
}

.article-rating-wrap {
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    padding: 20px 0;
    margin: 22px 0;
}

.article-rating-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
}

.article-rating-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.article-rating-stars {
    display: inline-flex;
    gap: 2px;
}

.article-rating-star {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0 2px;
    font-size: 0;
    line-height: 1;
}

.article-rating-star .icon {
    font-size: 20px;
}

.article-rating-meta {
    color: #777;
    font-size: 14px;
}

.article-rating-message {
    margin-top: 8px;
    color: #2d7f1f;
    font-size: 14px;
}
