.blog-categories{
    list-style: none;
    padding-left: 0;
    display: flex;
}

.blog-categories li{
    padding: 0.5rem 1rem;
}

.blog-categories li:first-child{
    padding-left: 0;
}

.blog-categories li a{
    position: relative;
    color: var(--theme-red);
}

.blog-categories li a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 3px;
    background: transparent;
    transition: width 0.3s ease;
}

.blog-categories li a:hover{
    transition: ease-in-out .3s;
}

.blog-categories li a:hover::after{
    width: 100%;
    background: var(--theme-red);
    transition: ease-in-out .3s;
}


.blog-categories li a.active::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 3px;
    background: var(--theme-red);
    transition: width 0.3s ease;
}

.blog-img{
    margin-bottom: 1rem;
    border-radius: 16px;
    overflow: hidden;
    height: 200px;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

@media (min-width: 768px) {
    .blog-img { height: 220px; }
}

@media (min-width: 1024px) {
    .blog-img { height: 240px; }
}

.blog-card{
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.blog-title{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-title h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* limit title to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* limit subtitle */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-banner{
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-banner-title{
    z-index: 5;
}

.black-overlay{
    background: rgba(0,0,0,0.3);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.blog-sidebar-wrapper h5,
.blog-sidebar-wrapper h6 {
    font-weight: 700;
    color: var(--theme-black);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-sidebar-list {
    padding-left: 0;
    list-style: none;
}

.blog-sidebar-list li {
    position: relative;
    padding: 0.5rem 0.75rem 0.5rem 1.5rem;
    margin-bottom: 0;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.blog-sidebar-list li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--theme-black);
    font-size: 1.1em;
    line-height: inherit;
}

.blog-sidebar-list li:hover,
.blog-sidebar-list li.toc-active {
    background: var(--theme-red);
}

.blog-sidebar-list li:hover::before,
.blog-sidebar-list li.toc-active::before {
    color: var(--theme-white);
}

.blog-sidebar-list li a {
    color: var(--theme-black);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
}

.blog-sidebar-list li:hover a,
.blog-sidebar-list li.toc-active a {
    color: var(--theme-white);
}


@media (min-width: 1023px) {
    .blog-banner {
        height: 300px;
    }

    .toc{
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
}

.blog-related-sidebar h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.blog-related-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
}

.blog-related-item:first-of-type {
    padding-top: 0;
}

.blog-related-img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.blog-related-info {
    flex: 1;
}

.blog-related-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.blog-related-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-red);
}

.blog-related-compare {
    font-size: 0.8rem;
    color: #999;
    margin-left: 0.25rem;
}

.blog-related-link {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.4rem;
    color: inherit;
}

@media (min-width: 1024px) {
    .blog-related-sidebar {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
}
