:root {
    --primary-color: #ff4d4d;
    --secondary-color: #e63939;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-radius: 8px;
}

.section-padding {
    padding: 60px 0;
}

.single-blog {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.image {
    display: flex;
    justify-content: center;
}

    .image img {
        max-width: 100%;
        height: auto;
        max-height: 800px;
        object-fit: contain;
        border-radius: var(--border-radius);
        margin-bottom: 30px;
        transition: transform 0.3s ease;
        cursor: pointer; /* Thêm con trỏ tay để báo hiệu nhấp */
    }

        .image img:hover {
            transform: scale(1.02);
        }

.collect-btn-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.collect-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

    .collect-btn i {
        font-size: 1.2rem;
    }

    .collect-btn:hover {
        background-color: var(--secondary-color);
        border-color: #fff;
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }

    .collect-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

.desc p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: justify;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.tags {
    display: flex;
    align-items: center;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap;
}

    .tags .icon {
        font-size: 1rem;
        color: var(--text-color);
        padding: 8px;
        flex-shrink: 0;
    }

    .tags .tag-text {
        background: var(--light-bg);
        padding: 8px 15px;
        border-radius: 20px;
        font-size: 0.9rem;
        color: var(--text-color);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tags li:not(.icon):not(.tag-text) {
        display: none;
    }

.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.social-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

    .social-list li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--light-bg);
        border-radius: 50%;
        color: var(--text-color);
        transition: all 0.3s ease;
    }

        .social-list li a:hover {
            background: var(--primary-color);
            color: white;
            transform: scale(1.1);
        }

.blog-author {
    display: flex;
    gap: 20px;
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

    .blog-author .thumbnail {
        flex: 0 0 100px;
    }

        .blog-author .thumbnail img {
            width: 100px;
            height: 100px;
            object-fit: cover;
            border-radius: 50%;
        }

    .blog-author .content {
        flex: 1;
    }

    .blog-author .name {
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--text-color);
    }

.related-blog .blog {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

    .related-blog .blog:hover {
        transform: translateY(-5px);
    }

.related-blog .image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-blog .content {
    padding: 15px;
}

.related-blog .meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.Comments-wrapper .comment {
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.Comments-wrapper .thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.Comments-wrapper .content .name {
    font-size: 1.2rem;
    font-weight: 600;
}

.Comments-wrapper .content p {
    font-size: 1rem;
    line-height: 1.6;
}

.Comments-wrapper .actions {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
}

.Comments-wrapper .reply-link {
    color: var(--primary-color);
    text-decoration: none;
}

    .Comments-wrapper .reply-link:hover {
        text-decoration: underline;
    }

.comment-form {
    background: var(--light-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 30px;
}

    .comment-form input,
    .comment-form textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: var(--border-radius);
        margin-bottom: 20px;
        font-size: 1rem;
    }

    .comment-form textarea {
        min-height: 120px;
    }

    .comment-form .btn {
        background: var(--primary-color);
        color: white;
        padding: 12px 30px;
        border: none;
        border-radius: 30px;
        font-size: 1.1rem;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .comment-form .btn:hover {
            background: var(--secondary-color);
            transform: translateY(-2px);
        }

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .collect-btn {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .blog-author {
        flex-direction: column;
        text-align: center;
    }

        .blog-author .thumbnail {
            margin-bottom: 15px;
        }

    .image img {
        max-height: 500px;
    }

    .tags {
        gap: 10px;
    }

    .desc p {
        font-size: 1.3rem;
    }
}

/* Phần thêm mới cho dialog xem hình */
/* Phần thêm mới cho dialog xem hình */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal-content {
    object-fit: contain;
    border-radius: 8px;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
    cursor: grab;
}

    .modal-content.portrait {
        height: 85vh;
        width: auto;
    }

    .modal-content.landscape {
        width: 85vw;
        height: auto;
    }

/* Nút đóng nằm ở góc trên bên phải */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    background-color: transparent;
    z-index: 10000;
}

/*GIAO DIỆN CỦA COMMENT strong PRODUCT_BLOG_DETAIL*/
.reply-form-container {
    margin-top: 10px;
    padding: 12px;
    background-color: #f9f9f9;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.reply-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
}

.reply-actions {
    margin-top: 10px;
    text-align: right;
}

.reply-submit-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

    .reply-submit-btn:hover {
        background-color: #0056b3;
    }

/*REPLY COMMENT*/
.comment-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.comment-item {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .comment-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.comment-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.comment-avatar img,
.reply-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e8ecef;
}

.comment-content {
    flex: 1;
    background-color: #f8f9fa;
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-name {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
}

.comment-date {
    font-size: 12px;
    color: #7f8c8d;
}

.comment-text {
    font-size: 15px;
    color: #34495e;
    line-height: 1.5;
    margin: 0;
}

.reply-section {
    margin-top: 12px;
    padding-left: 60px;
}

.reply-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.reply-content {
    flex: 1;
    background-color: #f1f3f5;
    padding: 10px 14px;
    border-radius: 10px;
}

.reply-header {
    margin-bottom: 6px;
}

.reply-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin: 0;
}

.reply-text {
    font-size: 14px;
    color: #34495e;
    line-height: 1.4;
    margin: 0;
}

.reply-form-container {
    margin-top: 12px;
}

.reply-form-content {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.reply-textarea {
    flex: 1;
    min-height: 80px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dfe6e9;
    resize: vertical;
    font-size: 14px;
    color: #2c3e50;
    transition: border-color 0.2s ease;
}

    .reply-textarea:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

.reply-submit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

    .reply-submit-btn:hover {
        background-color: #2980b9;
    }

.comment-empty {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 16px;
}

/*button REPLY */
.reply-toggle-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px 0;
    background-color: transparent;
    color: #1a1a1a;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    float: right;
    text-align: right;
}

    .reply-toggle-btn:hover {
        color: #0056b3;
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .reply-toggle-btn:active {
        transform: translateY(0);
        box-shadow: none;
    }

    .reply-toggle-btn:focus {
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    }

.reply-form-container {
    margin-top: 10px;
    width: 100%;
}

.reply-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.reply-submit-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

    .reply-submit-btn:hover {
        background-color: #0056b3;
    }