/* Style cho blog */
.blog-section {
    padding: 40px 0;
    background-color: white;
    position: relative;
}

.blog-card {
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    margin-bottom: 30px;
}

.blog-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-img {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.blog-card:hover .blog-img img {
    transform: scale(1.1);
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(90deg, var(--primary-color), #ff9d00);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
    z-index: 1;
}

.blog-content {
    padding: 25px;
}

.blog-date {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.blog-date i {
    margin-right: 5px;
    color: var(--primary-color);
}

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

.blog-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--gray-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.blog-link i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.blog-link:hover {
    color: #e86100;
}

.blog-link:hover i {
    transform: translateX(5px);
}

/* Style cho trang chi tiết blog */
.blog-detail {
    padding: 40px 0;
}

.blog-detail-img {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-detail-img img {
    width: 100%;
    object-fit: cover;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.blog-meta-item {
    margin-right: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.blog-meta-item i {
    margin-right: 5px;
    color: var(--primary-color);
}

.blog-meta-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.blog-meta-item a:hover {
    color: var(--primary-color);
}

.blog-content {
    line-height: 1.8;
    color: var(--dark-color);
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
}

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

.blog-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.blog-content li {
    margin-bottom: 10px;
}

.blog-content blockquote {
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 10px 10px 0;
}

/* Style cho code block */
.code-block {
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #282c34;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #21252b;
    color: #abb2bf;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-bottom: 1px solid #323842;
}

.code-header-left {
    display: flex;
    align-items: center;
}

.code-language {
    font-weight: 600;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
}

.code-language i {
    color: #61afef;
}

.code-title {
    font-style: italic;
    color: #98c379;
}

.code-header-right {
    display: flex;
    align-items: center;
}

.btn-copy {
    background: transparent;
    border: none;
    color: #abb2bf;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.btn-copy:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-copy.copied {
    color: #98c379;
}

.code-block pre {
    margin: 0;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    font-size: 0.9rem;
}

.code-block code {
    display: block;
    color: #abb2bf;
}

/* Highlight.js Theme (One Dark Pro) */
.hljs {
    color: #abb2bf;
    background: #282c34;
}

.hljs-keyword,
.hljs-operator {
    color: #c678dd;
}

.hljs-function,
.hljs-params {
    color: #61afef;
}

.hljs-string {
    color: #98c379;
}

.hljs-number {
    color: #d19a66;
}

.hljs-comment {
    color: #5c6370;
    font-style: italic;
}

.hljs-tag,
.hljs-name {
    color: #e06c75;
}

.hljs-attr {
    color: #d19a66;
}

.hljs-variable {
    color: #e06c75;
}

.hljs-built_in {
    color: #56b6c2;
}

.hljs-class {
    color: #e5c07b;
}

/* Sidebar Blog */
.blog-sidebar {
    margin-bottom: 40px;
}

.sidebar-section {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 10px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    margin-bottom: 10px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}

.sidebar-categories li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-categories a:hover {
    color: var(--primary-color);
}

.category-count {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 50px;
    font-weight: 600;
}

.sidebar-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-post {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
}

.sidebar-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-post-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.sidebar-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-info {
    flex: 1;
}

.sidebar-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.sidebar-post-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-post-title a:hover {
    color: var(--primary-color);
}

.sidebar-post-date {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f5f5f5;
    border-radius: 50px;
    color: var(--gray-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-tag:hover {
    background-color: var(--primary-color);
    color: white;
}
